OpenGL Rendering Issues

Started by
1 comment, last by BMW 10 years, 1 month ago

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

Advertisement

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.

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.

This topic is closed to new replies.

Advertisement