Why are my framebuffer textures black?

Started by
-1 comments, last by QQemka 6 years, 12 months ago

Hello. I am struggling with moving to deferred shading with framebuffers. I got forward rendering working perfectly. I am following this tutorial

http://ogldev.atspace.co.uk/www/tutorial35/tutorial35.html

My code is doing the same thing, but the textures (position, texcoord, normal, diffuse) are black, just like nothing gets rendered (but i know the draw calls are executed). The uniforms are correct, textures also, i have extensive error checking in all modules

Pieces of code:

framebuffer.hpp https://pastebin.com/292A92zt

framebuffer.cpp https://pastebin.com/DdJC1xDF

function responsible for rendering https://pastebin.com/t1p6Ft11

deffered shader https://pastebin.com/LV8Fg50u

forward shader https://pastebin.com/nAMvZpfi

What may be wrong? Thanks in advance

Edit: Being a master of copypasta, for some reason I've ommited " glBindFramebuffer(GL_FRAMEBUFFER, fbo_); " call. Now everything works just fine.... :D

LeJafC5.png

This topic is closed to new replies.

Advertisement