mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
Merge branch 'master' of https://github.com/worklist/hifi
This commit is contained in:
commit
ecc6d41523
9 changed files with 63 additions and 44 deletions
|
@ -4,6 +4,9 @@ project(hifi)
|
||||||
|
|
||||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{QT_CMAKE_PREFIX_PATH})
|
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{QT_CMAKE_PREFIX_PATH})
|
||||||
|
|
||||||
|
# set our Base SDK to 10.7
|
||||||
|
set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk)
|
||||||
|
|
||||||
# Find includes in corresponding build directories
|
# Find includes in corresponding build directories
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
# Instruct CMake to run moc automatically when needed.
|
# Instruct CMake to run moc automatically when needed.
|
||||||
|
|
|
@ -59,7 +59,7 @@ void main(void) {
|
||||||
vec3 offset = center + rotation * (radius * sampleKernel[i]);
|
vec3 offset = center + rotation * (radius * sampleKernel[i]);
|
||||||
vec4 projected = gl_ProjectionMatrix * vec4(offset, 1.0);
|
vec4 projected = gl_ProjectionMatrix * vec4(offset, 1.0);
|
||||||
float depth = texCoordToViewSpaceZ(projected.xy * 0.5 / projected.w + vec2(0.5, 0.5));
|
float depth = texCoordToViewSpaceZ(projected.xy * 0.5 / projected.w + vec2(0.5, 0.5));
|
||||||
occlusion += 1.0 - step(offset.z, depth); // * step(abs(center.z - depth), radius);
|
occlusion += 1.0 - step(offset.z, depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_FragColor = vec4(occlusion, occlusion, occlusion, 0.0) / 16.0;
|
gl_FragColor = vec4(occlusion, occlusion, occlusion, 0.0) / 16.0;
|
||||||
|
|
|
@ -11,15 +11,14 @@
|
||||||
// the original texture
|
// the original texture
|
||||||
uniform sampler2D originalTexture;
|
uniform sampler2D originalTexture;
|
||||||
|
|
||||||
|
// the scale for the blur kernel
|
||||||
|
uniform vec2 blurScale;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
float ds = dFdx(gl_TexCoord[0].s);
|
vec2 minExtents = gl_TexCoord[0].st + blurScale * vec2(-0.5, -0.5);
|
||||||
float dt = dFdy(gl_TexCoord[0].t);
|
vec2 maxExtents = gl_TexCoord[0].st + blurScale * vec2(1.5, 1.5);
|
||||||
vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
|
gl_FragColor = (texture2D(originalTexture, minExtents) +
|
||||||
for (int i = 0; i < 4; i++) {
|
texture2D(originalTexture, vec2(maxExtents.s, minExtents.t)) +
|
||||||
for (int j = 0; j < 4; j++) {
|
texture2D(originalTexture, vec2(minExtents.s, maxExtents.t)) +
|
||||||
sum += texture2D(originalTexture, gl_TexCoord[0].st +
|
texture2D(originalTexture, maxExtents)) * 0.25;
|
||||||
vec2(ds, dt) * vec2(-2.0 + float(i), -2.0 + float(j)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gl_FragColor = sum / 16.0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,8 @@ VoxelSystem::VoxelSystem(float treeScale, int maxVoxels) :
|
||||||
_falseColorizeBySource = false;
|
_falseColorizeBySource = false;
|
||||||
_dataSourceID = UNKNOWN_NODE_ID;
|
_dataSourceID = UNKNOWN_NODE_ID;
|
||||||
_voxelServerCount = 0;
|
_voxelServerCount = 0;
|
||||||
|
|
||||||
|
_viewFrustum = Application::getInstance()->getViewFrustum();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelSystem::nodeDeleted(VoxelNode* node) {
|
void VoxelSystem::nodeDeleted(VoxelNode* node) {
|
||||||
|
@ -394,7 +396,7 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) {
|
||||||
int voxelsUpdated = 0;
|
int voxelsUpdated = 0;
|
||||||
bool shouldRender = false; // assume we don't need to render it
|
bool shouldRender = false; // assume we don't need to render it
|
||||||
// if it's colored, we might need to render it!
|
// if it's colored, we might need to render it!
|
||||||
shouldRender = node->calculateShouldRender(Application::getInstance()->getViewFrustum());
|
shouldRender = node->calculateShouldRender(_viewFrustum);
|
||||||
|
|
||||||
node->setShouldRender(shouldRender);
|
node->setShouldRender(shouldRender);
|
||||||
// let children figure out their renderness
|
// let children figure out their renderness
|
||||||
|
@ -813,10 +815,8 @@ bool VoxelSystem::falseColorizeInViewOperation(VoxelNode* node, void* extraData)
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelSystem::falseColorizeInView() {
|
void VoxelSystem::falseColorizeInView() {
|
||||||
ViewFrustum* viewFrustum = Application::getInstance()->getViewFrustum();
|
|
||||||
|
|
||||||
_nodeCount = 0;
|
_nodeCount = 0;
|
||||||
_tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)viewFrustum);
|
_tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)_viewFrustum);
|
||||||
qDebug("setting in view false color for %d nodes\n", _nodeCount);
|
qDebug("setting in view false color for %d nodes\n", _nodeCount);
|
||||||
_tree->setDirtyBit();
|
_tree->setDirtyBit();
|
||||||
setupNewVoxelsForDrawing();
|
setupNewVoxelsForDrawing();
|
||||||
|
@ -942,15 +942,13 @@ bool VoxelSystem::getDistanceFromViewRangeOperation(VoxelNode* node, void* extra
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelSystem::falseColorizeDistanceFromView() {
|
void VoxelSystem::falseColorizeDistanceFromView() {
|
||||||
ViewFrustum* viewFrustum = Application::getInstance()->getViewFrustum();
|
|
||||||
|
|
||||||
_nodeCount = 0;
|
_nodeCount = 0;
|
||||||
_maxDistance = 0.0;
|
_maxDistance = 0.0;
|
||||||
_minDistance = FLT_MAX;
|
_minDistance = FLT_MAX;
|
||||||
_tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation, (void*) viewFrustum);
|
_tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation, (void*) _viewFrustum);
|
||||||
qDebug("determining distance range for %d nodes\n", _nodeCount);
|
qDebug("determining distance range for %d nodes\n", _nodeCount);
|
||||||
_nodeCount = 0;
|
_nodeCount = 0;
|
||||||
_tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation, (void*) viewFrustum);
|
_tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation, (void*) _viewFrustum);
|
||||||
qDebug("setting in distance false color for %d nodes\n", _nodeCount);
|
qDebug("setting in distance false color for %d nodes\n", _nodeCount);
|
||||||
_tree->setDirtyBit();
|
_tree->setDirtyBit();
|
||||||
setupNewVoxelsForDrawing();
|
setupNewVoxelsForDrawing();
|
||||||
|
@ -960,6 +958,7 @@ void VoxelSystem::falseColorizeDistanceFromView() {
|
||||||
class removeOutOfViewArgs {
|
class removeOutOfViewArgs {
|
||||||
public:
|
public:
|
||||||
VoxelSystem* thisVoxelSystem;
|
VoxelSystem* thisVoxelSystem;
|
||||||
|
ViewFrustum* thisViewFrustum;
|
||||||
VoxelNodeBag dontRecurseBag;
|
VoxelNodeBag dontRecurseBag;
|
||||||
unsigned long nodesScanned;
|
unsigned long nodesScanned;
|
||||||
unsigned long nodesRemoved;
|
unsigned long nodesRemoved;
|
||||||
|
@ -969,6 +968,7 @@ public:
|
||||||
|
|
||||||
removeOutOfViewArgs(VoxelSystem* voxelSystem) :
|
removeOutOfViewArgs(VoxelSystem* voxelSystem) :
|
||||||
thisVoxelSystem(voxelSystem),
|
thisVoxelSystem(voxelSystem),
|
||||||
|
thisViewFrustum(voxelSystem->getViewFrustum()),
|
||||||
dontRecurseBag(),
|
dontRecurseBag(),
|
||||||
nodesScanned(0),
|
nodesScanned(0),
|
||||||
nodesRemoved(0),
|
nodesRemoved(0),
|
||||||
|
@ -997,7 +997,7 @@ bool VoxelSystem::removeOutOfViewOperation(VoxelNode* node, void* extraData) {
|
||||||
for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
|
for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
|
||||||
VoxelNode* childNode = node->getChildAtIndex(i);
|
VoxelNode* childNode = node->getChildAtIndex(i);
|
||||||
if (childNode) {
|
if (childNode) {
|
||||||
ViewFrustum::location inFrustum = childNode->inFrustum(*Application::getInstance()->getViewFrustum());
|
ViewFrustum::location inFrustum = childNode->inFrustum(*args->thisViewFrustum);
|
||||||
switch (inFrustum) {
|
switch (inFrustum) {
|
||||||
case ViewFrustum::OUTSIDE: {
|
case ViewFrustum::OUTSIDE: {
|
||||||
args->nodesOutside++;
|
args->nodesOutside++;
|
||||||
|
@ -1031,9 +1031,9 @@ bool VoxelSystem::isViewChanging() {
|
||||||
bool result = false; // assume the best
|
bool result = false; // assume the best
|
||||||
|
|
||||||
// If our viewFrustum has changed since our _lastKnowViewFrustum
|
// If our viewFrustum has changed since our _lastKnowViewFrustum
|
||||||
if (!_lastKnowViewFrustum.matches(Application::getInstance()->getViewFrustum())) {
|
if (!_lastKnowViewFrustum.matches(_viewFrustum)) {
|
||||||
result = true;
|
result = true;
|
||||||
_lastKnowViewFrustum = *Application::getInstance()->getViewFrustum(); // save last known
|
_lastKnowViewFrustum = *_viewFrustum; // save last known
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1047,9 +1047,9 @@ bool VoxelSystem::hasViewChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If our viewFrustum has changed since our _lastKnowViewFrustum
|
// If our viewFrustum has changed since our _lastKnowViewFrustum
|
||||||
if (!_lastStableViewFrustum.matches(Application::getInstance()->getViewFrustum())) {
|
if (!_lastStableViewFrustum.matches(_viewFrustum)) {
|
||||||
result = true;
|
result = true;
|
||||||
_lastStableViewFrustum = *Application::getInstance()->getViewFrustum(); // save last stable
|
_lastStableViewFrustum = *_viewFrustum; // save last stable
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1403,7 +1403,7 @@ void VoxelSystem::falseColorizeOccluded() {
|
||||||
myCoverageMap.erase();
|
myCoverageMap.erase();
|
||||||
|
|
||||||
FalseColorizeOccludedArgs args;
|
FalseColorizeOccludedArgs args;
|
||||||
args.viewFrustum = Application::getInstance()->getViewFrustum();
|
args.viewFrustum = _viewFrustum;
|
||||||
args.map = &myCoverageMap;
|
args.map = &myCoverageMap;
|
||||||
args.totalVoxels = 0;
|
args.totalVoxels = 0;
|
||||||
args.coloredVoxels = 0;
|
args.coloredVoxels = 0;
|
||||||
|
@ -1525,7 +1525,7 @@ void VoxelSystem::falseColorizeOccludedV2() {
|
||||||
VoxelProjectedPolygon::intersects_calls = 0;
|
VoxelProjectedPolygon::intersects_calls = 0;
|
||||||
|
|
||||||
FalseColorizeOccludedArgs args;
|
FalseColorizeOccludedArgs args;
|
||||||
args.viewFrustum = Application::getInstance()->getViewFrustum();
|
args.viewFrustum = _viewFrustum;
|
||||||
args.mapV2 = &myCoverageMapV2;
|
args.mapV2 = &myCoverageMapV2;
|
||||||
args.totalVoxels = 0;
|
args.totalVoxels = 0;
|
||||||
args.coloredVoxels = 0;
|
args.coloredVoxels = 0;
|
||||||
|
|
|
@ -43,6 +43,8 @@ public:
|
||||||
void simulate(float deltaTime) { };
|
void simulate(float deltaTime) { };
|
||||||
void render(bool texture);
|
void render(bool texture);
|
||||||
|
|
||||||
|
ViewFrustum* getViewFrustum() const {return _viewFrustum;}
|
||||||
|
void setViewFrustum(ViewFrustum* viewFrustum) {_viewFrustum = viewFrustum;}
|
||||||
unsigned long getVoxelsUpdated() const {return _voxelsUpdated;};
|
unsigned long getVoxelsUpdated() const {return _voxelsUpdated;};
|
||||||
unsigned long getVoxelsRendered() const {return _voxelsInReadArrays;};
|
unsigned long getVoxelsRendered() const {return _voxelsInReadArrays;};
|
||||||
|
|
||||||
|
@ -182,6 +184,7 @@ private:
|
||||||
|
|
||||||
ViewFrustum _lastKnowViewFrustum;
|
ViewFrustum _lastKnowViewFrustum;
|
||||||
ViewFrustum _lastStableViewFrustum;
|
ViewFrustum _lastStableViewFrustum;
|
||||||
|
ViewFrustum* _viewFrustum;
|
||||||
|
|
||||||
int newTreeToArrays(VoxelNode *currentNode);
|
int newTreeToArrays(VoxelNode *currentNode);
|
||||||
void cleanupRemovedVoxels();
|
void cleanupRemovedVoxels();
|
||||||
|
|
|
@ -32,15 +32,6 @@ void AmbientOcclusionEffect::init() {
|
||||||
_occlusionProgram->addShaderFromSourceFile(QGLShader::Fragment, "resources/shaders/ambient_occlusion.frag");
|
_occlusionProgram->addShaderFromSourceFile(QGLShader::Fragment, "resources/shaders/ambient_occlusion.frag");
|
||||||
_occlusionProgram->link();
|
_occlusionProgram->link();
|
||||||
|
|
||||||
_blurProgram = new ProgramObject();
|
|
||||||
_blurProgram->addShaderFromSourceFile(QGLShader::Vertex, "resources/shaders/ambient_occlusion.vert");
|
|
||||||
_blurProgram->addShaderFromSourceFile(QGLShader::Fragment, "resources/shaders/occlusion_blur.frag");
|
|
||||||
_blurProgram->link();
|
|
||||||
|
|
||||||
_blurProgram->bind();
|
|
||||||
_blurProgram->setUniformValue("originalTexture", 0);
|
|
||||||
_blurProgram->release();
|
|
||||||
|
|
||||||
// create the sample kernel: an array of spherically distributed offset vectors
|
// create the sample kernel: an array of spherically distributed offset vectors
|
||||||
const int SAMPLE_KERNEL_SIZE = 16;
|
const int SAMPLE_KERNEL_SIZE = 16;
|
||||||
QVector3D sampleKernel[SAMPLE_KERNEL_SIZE];
|
QVector3D sampleKernel[SAMPLE_KERNEL_SIZE];
|
||||||
|
@ -83,6 +74,17 @@ void AmbientOcclusionEffect::init() {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
|
||||||
|
_blurProgram = new ProgramObject();
|
||||||
|
_blurProgram->addShaderFromSourceFile(QGLShader::Vertex, "resources/shaders/ambient_occlusion.vert");
|
||||||
|
_blurProgram->addShaderFromSourceFile(QGLShader::Fragment, "resources/shaders/occlusion_blur.frag");
|
||||||
|
_blurProgram->link();
|
||||||
|
|
||||||
|
_blurProgram->bind();
|
||||||
|
_blurProgram->setUniformValue("originalTexture", 0);
|
||||||
|
_blurProgram->release();
|
||||||
|
|
||||||
|
_blurScaleLocation = _blurProgram->uniformLocation("blurScale");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AmbientOcclusionEffect::render() {
|
void AmbientOcclusionEffect::render() {
|
||||||
|
@ -131,6 +133,7 @@ void AmbientOcclusionEffect::render() {
|
||||||
glBindTexture(GL_TEXTURE_2D, freeFBO->texture());
|
glBindTexture(GL_TEXTURE_2D, freeFBO->texture());
|
||||||
|
|
||||||
_blurProgram->bind();
|
_blurProgram->bind();
|
||||||
|
_blurProgram->setUniformValue(_blurScaleLocation, 1.0f / size.width(), 1.0f / size.height());
|
||||||
|
|
||||||
renderFullscreenQuad();
|
renderFullscreenQuad();
|
||||||
|
|
||||||
|
@ -138,7 +141,6 @@ void AmbientOcclusionEffect::render() {
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
|
||||||
//glEnable(GL_BLEND);
|
|
||||||
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_CONSTANT_ALPHA, GL_ONE);
|
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_CONSTANT_ALPHA, GL_ONE);
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
|
|
|
@ -32,6 +32,7 @@ private:
|
||||||
int _noiseScaleLocation;
|
int _noiseScaleLocation;
|
||||||
|
|
||||||
ProgramObject* _blurProgram;
|
ProgramObject* _blurProgram;
|
||||||
|
int _blurScaleLocation;
|
||||||
|
|
||||||
GLuint _rotationTextureID;
|
GLuint _rotationTextureID;
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,12 +64,11 @@ GLuint TextureCache::getPermutationNormalTextureID() {
|
||||||
|
|
||||||
QOpenGLFramebufferObject* TextureCache::getPrimaryFramebufferObject() {
|
QOpenGLFramebufferObject* TextureCache::getPrimaryFramebufferObject() {
|
||||||
if (_primaryFramebufferObject == NULL) {
|
if (_primaryFramebufferObject == NULL) {
|
||||||
QSize size = Application::getInstance()->getGLWidget()->size();
|
_primaryFramebufferObject = createFramebufferObject();
|
||||||
_primaryFramebufferObject = new QOpenGLFramebufferObject(size);
|
|
||||||
Application::getInstance()->getGLWidget()->installEventFilter(this);
|
|
||||||
|
|
||||||
glGenTextures(1, &_primaryDepthTextureID);
|
glGenTextures(1, &_primaryDepthTextureID);
|
||||||
glBindTexture(GL_TEXTURE_2D, _primaryDepthTextureID);
|
glBindTexture(GL_TEXTURE_2D, _primaryDepthTextureID);
|
||||||
|
QSize size = Application::getInstance()->getGLWidget()->size();
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size.width(), size.height(),
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size.width(), size.height(),
|
||||||
0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 0);
|
0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 0);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
@ -91,16 +90,14 @@ GLuint TextureCache::getPrimaryDepthTextureID() {
|
||||||
|
|
||||||
QOpenGLFramebufferObject* TextureCache::getSecondaryFramebufferObject() {
|
QOpenGLFramebufferObject* TextureCache::getSecondaryFramebufferObject() {
|
||||||
if (_secondaryFramebufferObject == NULL) {
|
if (_secondaryFramebufferObject == NULL) {
|
||||||
_secondaryFramebufferObject = new QOpenGLFramebufferObject(Application::getInstance()->getGLWidget()->size());
|
_secondaryFramebufferObject = createFramebufferObject();
|
||||||
Application::getInstance()->getGLWidget()->installEventFilter(this);
|
|
||||||
}
|
}
|
||||||
return _secondaryFramebufferObject;
|
return _secondaryFramebufferObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
QOpenGLFramebufferObject* TextureCache::getTertiaryFramebufferObject() {
|
QOpenGLFramebufferObject* TextureCache::getTertiaryFramebufferObject() {
|
||||||
if (_tertiaryFramebufferObject == NULL) {
|
if (_tertiaryFramebufferObject == NULL) {
|
||||||
_tertiaryFramebufferObject = new QOpenGLFramebufferObject(Application::getInstance()->getGLWidget()->size());
|
_tertiaryFramebufferObject = createFramebufferObject();
|
||||||
Application::getInstance()->getGLWidget()->installEventFilter(this);
|
|
||||||
}
|
}
|
||||||
return _tertiaryFramebufferObject;
|
return _tertiaryFramebufferObject;
|
||||||
}
|
}
|
||||||
|
@ -124,3 +121,15 @@ bool TextureCache::eventFilter(QObject* watched, QEvent* event) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QOpenGLFramebufferObject* TextureCache::createFramebufferObject() {
|
||||||
|
QOpenGLFramebufferObject* fbo = new QOpenGLFramebufferObject(Application::getInstance()->getGLWidget()->size());
|
||||||
|
Application::getInstance()->getGLWidget()->installEventFilter(this);
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D, fbo->texture());
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
|
||||||
|
return fbo;
|
||||||
|
}
|
||||||
|
|
|
@ -46,6 +46,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
QOpenGLFramebufferObject* createFramebufferObject();
|
||||||
|
|
||||||
GLuint _permutationNormalTextureID;
|
GLuint _permutationNormalTextureID;
|
||||||
|
|
||||||
QOpenGLFramebufferObject* _primaryFramebufferObject;
|
QOpenGLFramebufferObject* _primaryFramebufferObject;
|
||||||
|
|
Loading…
Reference in a new issue