Ok this is kind of strange, im using opengl, and my code seems fine. when i compile the project and run it, it just gives me a black screen, so i debug it. however as soon as i run the program using the dev c++ debugger, it suddenly works, displaying all the stuff i want on the screen. Why does my program only run correctly when running through the dev c++ debugger ??!
chears!
Well there's your problem... you're using Dev-C++... a dead compiler that is no longer supported and isn't even updated anymore. Bloodshed.net isn't even up anymore. Use a better compiler.
Um dev c++ is open source of course it's going to have a problem! >:)
...Just because it's open source doesn't mean it's going to have a problem lol, Dev C++ uses the GNU C++ Compiler g++, and the GNU Linker ld, and the GNU Debugger gdb. It also has MinGW as an option. The GNU dev tools are probably the best command line tools available to programmers and many modern IDEs use them.
Mozilla Firefox, and all flavours of Linux are open source so being open source does not mean that it's going to be better or worse than a closed source project/commercial project.
I would recommend switching to Code::Blocks and a recent version of MinGW (comes with Code::Blocks). As far as I know, Code::Blocks can import Dev-C++ projects.
There are many reasons why it could work while debugging, but not otherwise.
First, when debugging, are you using the debug build?
Try the release build instead, even though there will be no symbol data. Does it work? Draw your conclusions.
Check if perhaps certain files can't be loaded. Use more error checking in your code. Do check if the functions you call actually succeed.
Perhaps you have uninitialized variables. The debugger will initialize free memory with a repeating pattern (0xBADF00D), whereas without the debugger there'll be more or less random data (and often 0). This can lead to different program behaviour.