Skip to main content
GameDev.net gamedev.net
🔒 Locked

"check before flight" list - for OpenGL

Started by Yours3!f Feb 26, 2016 at 12:25 PM 5 replies 2.7k views
Original Post
Yours3!f
Yours3!f

hi there,

today I had the idea to write a list of things to check if there's nothing rendered on screen, for newbies.

I think this would tremendously help them, especially if there would be a piece of code that check each of these.

If you have any additions to this list, please comment it below.

-is there any opengl context?

-is any kind of swapbuffer called?

-is it called after everything has been rendered?

-what kind of frame buffer object are you rendering into?

-if you are using shaders, do you bind the correct one?

-are the shader uniforms bound?

-are shaders compiled and linked properly?

-is there any vertex buffer object, vertex array object bound?

-is there any index buffer object bound?

-if you are using textures, are the textures bound?

-are you using the depth state that you want to use?

-is blending enabled?

-are you using the blending function you wanted to use?

-is scissoring enabled?

-is backface culling enabled?

etc.

please contribute to this list :)

WoopsASword
WoopsASword

Couple of additions:

- Is it initialized properly? (For libraries like glew).

- Do you have an extension library? (To load extensions ofc- again glew).

- Do you have the extension you want to use? (Something uncommong but might occur)

Great list, if I had this when i started i'd save myself at least a day worth of work laugh.png

TheUnnamable
TheUnnamable

-Are your matrices correctly set? ( world, view, and most importantly, projection)

Edit: Also, if I'm unsure if things are working, I usually change the clear color from frame to frame. That way I know that the window and the context is working, and the draw calls are actually happening. This can also show that buffers are swapped if necessary.

Sik_the_hedgehog
Sik_the_hedgehog

Subsets of the above:

  • Are you sure you translated along the Z axis in the correct direction? (I should know on this one)
  • Did you translate it far enough from the camera? (i.e. beyond the near plane)
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Katie
Katie
  • Did you clear the depth buffer before trying to using it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.