Jump to content
  • Advertisement
Sign in to follow this  
GutenTag

OpenGL Bizzare bug with OpenGL

This topic is 637 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

So I've been hammering away at my code for a while, trying to resolve this bug, with absolutely no progress being made.

Mostly due to how utterly random and unpredictable this bug is.

 

So this is how the scene works when everything is working fine

eTrQok0.png

 

And when the bug kicks in

NZ84JpU.png

 

As you can see, the bug only prevents my cubemap skybox, model, and light source mesh from rendering, but the orthogonally projected 2d elements are just fine.

 

I've ruled out shaders, as even the simplest of shader programs still experience this problem. I use ASSIMP to load in mesh files and SOIL to load textures, but up until about a day ago they have worked flawlessly.

 

There is absolutely no pattern to when this happens, the only way to resolve it is to just keep restarting the program until the desired output appears. That is obviously not a good solution. I'm at a complete loss and need help, as opengl doesn't push out an error or anything. I don't know where to even begin looking for a solution. Could EBO's or frame buffers cause this? As I have started implementing those recently.

Share this post


Link to post
Share on other sites
Advertisement

Never mind, turns out that my mouse look code was running into problems where if delta time was zero it caused all kinds of strange issues.

 

This has since been fixed.

Share this post


Link to post
Share on other sites

Whenever I fix a bug, particularly one that takes a lot of time, I spend a moment thinking about how it could be avoided or caught faster in the future. Usually that involves adding some asserts.

In this case, the trick is to enable floating point exceptions - at least on your PC build - with floating point exceptions enabled you'd have crashed immediately on the divide-by-zero and would have fixed the bug in just a few moments : https://randomascii.wordpress.com/2012/04/21/exceptional-floating-point/

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!