Archived

This topic is now archived and is closed to further replies.

Seemingly random bugs.

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

I''ve been trying to program OpenGL for the past three years now and I haven''t got very far at all. I''ve read numerous tutorials, including the ones by NeHe Productions, and several books, including ''OpenGL Game Programming'' by Hawkings and Astle. I have copied source code and cut and paste sources together to make new stuff. The problems I''m having come when I try to start my own program off, I have managed to make several ''black screen frameworks'' over the past couple of years and a lot of simple incomplete programs that may be classifiable as demos, however nothing has ever gotten completed because seemingly at random my code... or a part of my code just stops working. For instance... earlier today I quickly put together a small fullscreen app displaying a rotating cube using lines and quads without any texturing. I decided to add a bitmap font ''glPrint'' function to this and it worked fine. Next I added an fps counter.. now suddenly my glPrint prints all of my text squashed to about 50% height with uneven colouration.. I tried deleteing all of the code that I had added for my fps counter but this did nothing to remedy the situation. I added the fps counter again and just decided to live with the flawed text. Next I tried to add a splash screen that blended out during the first few thousand frames... simple stuff... then when I compiled it my FPS counter had disappeared completely and once again removing the added code did not fix it. I haven''t just had this problem with my own frameworks but also with the NeHe framework and the www.game-tutorials.com framework. I have also had numerous random things just suddenly stop working... not just bitmapped fonts, once the depth test randomly stopped working... even after placing glEnable(GL_DEPTH_TEST);glDepthFunc(GL_LEQUAL); regularly throughout my code, also I''ve had texturing randomly fail leaving my polygons flat shaded. The strange thing is that I get no compiler errors or warnings when these things happen, in fact when these things start to happen I generally go through my code to remove even the small warnings like ''truncation from ''float'' to ''int'' ''. If anyone wants to look at the source for my doomed fps counter then just ask me and I can email it to you (its a fairly big project and i''d assume that you''d want to see all of it) Any help that can be given would be much appreciated, I have a fairly good knowledge of c/c++ and (presumably) rather poor knowledge of OpenGL. -- Jheriko http://jheriko.deviantart.com ''''Everything around us can be represented and understood through numbers.''''

Share this post


Link to post
Share on other sites
Sorry.. I did not make myself clear... the program with the fps counter was not built by copying and pasting code together. The errors popped up after I added something which I personally typed in to my code.

I guess that my problem is a little vague though. I was kind of hoping that it was quite common and that it was the fault of my compiler or .lib files and there was some update somewhere that would fix this.

-- Jheriko
http://jheriko.deviantart.com/

''''Everything around us can be represented and understood through numbers.''''

Share this post


Link to post
Share on other sites
Some compilers have that kind of problem. You hit the ''undo'' button a couple of times, compile, and the errors are still there. You reload your source code only to find that the ''undo'' button didn''t undo the things. Hence I make backup copies of my source code.

Share this post


Link to post
Share on other sites