Jump to content
  • Advertisement
Sign in to follow this  
BMW

OpenGL OpenGL Rendering Issues

This topic is 2034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!