Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


OpenGL Rendering Issues


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 BMW   Members   -  Reputation: 160

Like
0Likes
Like

Posted 20 March 2014 - 02:01 AM

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

 



Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7987

Like
3Likes
Like

Posted 20 March 2014 - 02:12 AM

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.



#3 BMW   Members   -  Reputation: 160

Like
0Likes
Like

Posted 20 March 2014 - 11:06 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS