Skip to content

Commit 3b4d416

Browse files
author
Dominik Ospelt
committed
Fixed Sampler issue for now, Mipmapping is currently not available
1 parent 4dead18 commit 3b4d416

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

KoRE_GUI.sln

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Global
2323
{8CBE9533-CC62-40C0-AADE-AEF468E41D41}.RelWithDebInfo|Win32.Build.0 = Release|Win32
2424
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.Debug|Win32.ActiveCfg = Debug|Win32
2525
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.Debug|Win32.Build.0 = Debug|Win32
26-
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
27-
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
26+
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.MinSizeRel|Win32.ActiveCfg = Release|Win32
27+
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.MinSizeRel|Win32.Build.0 = Release|Win32
2828
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.Release|Win32.ActiveCfg = Release|Win32
2929
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.Release|Win32.Build.0 = Release|Win32
30-
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
31-
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
30+
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
31+
{03ADC7CD-D9FA-4B74-ABA0-C4CC0E8868C1}.RelWithDebInfo|Win32.Build.0 = Release|Win32
3232
EndGlobalSection
3333
GlobalSection(SolutionProperties) = preSolution
3434
HideSolutionNode = FALSE

src/KoRE/Passes/FrameBufferStage.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include "KoRE/Passes/FrameBufferStage.h"
2121
#include "KoRE/Operations/UseFBO.h"
22-
#include "KoRE/Operations/ClearOp.h"
2322
#include "KoRE/ResourceManager.h"
2423
#include "KoRE/Log.h"
2524
#include <algorithm>
@@ -93,9 +92,6 @@ void kore::FrameBufferStage::
9392
_frameBuffer->getDrawBuffers(),
9493
_frameBuffer->numDrawBuffers());
9594
_internalStartup.push_back(pUseFBO);
96-
// temp test
97-
ClearOp* pCop = new ClearOp(true,true,true,glm::vec4(1,0,0,1));
98-
_internalStartup.push_back(pCop);
9995
}
10096

10197
void kore::FrameBufferStage::removeProgramPass(ShaderProgramPass* progPass) {

src/KoRE/Texture.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ bool kore::Texture::init(const STextureProperties& properties,
168168

169169
void kore::Texture::genMipmapHierarchy() {
170170
if (_handle != KORE_GLUINT_HANDLE_INVALID) {
171-
glBindTexture(_properties.targetType, _handle);
172-
glTexParameteri(_properties.targetType, GL_GENERATE_MIPMAP, GL_TRUE);
173-
glGenerateMipmap(_properties.targetType);
171+
//glBindTexture(_properties.targetType, _handle);
172+
//glTexParameteri(_properties.targetType, GL_GENERATE_MIPMAP, GL_FALSE);
173+
//glGenerateMipmap(_properties.targetType);
174174
}
175175
}

src/KoRE/TextureSampler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace kore {
2727
type(GL_SAMPLER_2D),
2828
wrapping(glm::uvec3(GL_REPEAT)),
2929
magfilter(GL_LINEAR),
30-
minfilter(GL_LINEAR_MIPMAP_LINEAR) {
30+
minfilter(GL_LINEAR) { //GL_LINEAR_MIPMAP_LINEAR
3131
}
3232

3333
bool operator== (const TexSamplerProperties& other) const {

src/KoRE_GUI/FrameBufferStageItem.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "KoRE_GUI/RenderViewer.h"
3535

3636
#include "KoRE/RenderManager.h"
37+
#include "KoRE/Operations/ClearOp.h"
3738

3839
koregui::FrameBufferStageItem::FrameBufferStageItem(QGraphicsItem* parent)
3940
: _frameBuffer(NULL),
@@ -147,6 +148,19 @@ void koregui::FrameBufferStageItem
147148
for (uint i = 0; i < sdata.size(); i++) {
148149
_outputs.push_back(new ShaderDataItem(&sdata[i], NULL, this));
149150
}
151+
152+
std::vector<kore::Operation*>& startop =_bufferstage->getStartupOperations();
153+
bool hasclear = false;
154+
for (uint i = 0; i < startop.size(); i++) {
155+
if (startop[i]->getType() == kore::OP_CLEAR) {
156+
hasclear = true;
157+
}
158+
}
159+
if(hasclear) {
160+
kore::ClearOp* pCop =
161+
new kore::ClearOp(true, true, true, glm::vec4(0.1,0.1,0.1,1.0));
162+
_bufferstage->addStartupOperation(pCop);
163+
}
150164
refresh();
151165
}
152166

0 commit comments

Comments
 (0)