Skip to content

Commit

Permalink
Render buffer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrett Hoofman committed Apr 22, 2018
1 parent 4970a38 commit 110fc36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Human/src/Platform/opengl/OPframebufferAPIGL.cpp
Expand Up @@ -44,13 +44,17 @@ OPframeBuffer* _OPframeBufferAPIGLInit(OPframeBuffer* framebuffer, OPtextureDesc
OPframeBufferGL* frameBufferGL = OPNEW(OPframeBufferGL());
framebuffer->internalPtr = frameBufferGL;
framebuffer->count = 1;
framebuffer->desc = textureDesc;

OPGLFN(glGenFramebuffers(1, &frameBufferGL->Handle));
OPGLFN(glBindFramebuffer(GL_FRAMEBUFFER, frameBufferGL->Handle));

framebuffer->texture = OPRENDERER_ACTIVE->Texture.Create(textureDesc);
OPtextureGL* textureGL = (OPtextureGL*)framebuffer->texture->internalPtr;

framebuffer->renderBuffer = OPRENDERER_ACTIVE->RenderBuffer.Create();
framebuffer->renderBuffer->Bind();

// Texture Buffer
textureDesc.mipmap = false;

Expand Down

0 comments on commit 110fc36

Please sign in to comment.