Hey everyone, I'm working on a current game project right now. I'm receiving some weird problems/errors. Since it is a massive amount of code, I'm going to try to not post any, but if needed, just let me know .
Anyway, I'm using the Win32 and OpenGL APIs. I'm also using the CodeBlocks IDE.
Here's the first error. One of the main models will randomly on a compile, with no changes in code, show extremely abnormal and incorrect colors. (It appears as though it is being textured by another object in the scene. However, this only happens once every 20 compiles or so, without any change to code. Also, when I switch the build target to "Release" in my IDE, it has the error virtually 100% of the time, once again with no change in code.
Another is a very interesting error. In an attempt to draw some 3d text to the screen, I found an error. I bracketed the if statement that checks a boolean determining whether or not to draw the text, and placed a cout with a random sentence to let me know it hasn't crashed before drawing the text. Yet, when I added the cout and brackets, it worked fine. I've continued debugging, but everytime I remove the cout statement, it crashed, yet with it there, it does not. I've left the brackets and commented the cout, it fails, uncomment and it works fine! The cout statement has absolutely nothing to do with the drawing of the text in anyway shape or form.
If anyone can give me some sort of help, I'd grealty appreciate it. I'm a pretty experienced programmer, but my regular techniques of debugging don't seem to work to well on these haha! If you have come across something like this, or know some C++ information that could cause this that I may have skipped over, please feel free to share. Thanks for taking time to read!
Managed to fix the second problem with the text and std::cout. For some reason, my text that I was displaying as a const char* was being deleted deep inside my text class before it was being drawn. Not exactly sure how it worked every few times, but it's fixed now haha.