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

OpenGL Rendering Issues

Started by BMW Mar 20, 2014 at 8:01 AM 1 replies 2.3k views
Original Post
BMW
BMW

Hello All,

I am developing a Minecraft clone in C++/OpenGL on Linux. I am using SDL2 for creating a window and an OpenGL context.

Everything seems to be working - except not all the time. Sometimes when I run my game, it works. The next time I run it, it won't render anything (just the clear color).

You can view the source code of the game on GitHub here: http://github.com/brettmw/cubed

Screenshot of when it's functioning correctly:

Working.png

And when it's not:

Not_working.png

Ashaman73
Ashaman73

Inconsistent behavior is often the result of missing initialisation, in this example it could be the render state or some variable. So, double check your initialisation first, try to explicitly set a needed renderstate just before starting rendering etc. to narrow down the potential bug.

BMW
BMW

Inconsistent behavior is often the result of missing initialisation, in this example it could be the render state or some variable. So, double check your initialisation first, try to explicitly set a needed renderstate just before starting rendering etc. to narrow down the potential bug.

Thank you Sir.

I hadn't initialised my translation vector in the Transform class.

Topic Locked

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

Sign in to reply to this topic.