Advertisement

Where's the bug?

Started by October 19, 2000 03:24 PM
4 comments, last by DiSTuRBeD9 24 years, 1 month ago
I''m working on a basic terrain engine, but there''s a bug in there that i can''t find =( I think it''s somewhere in the file loading code, maybe not. I''ve been searching real hard for this, but no luck. It''s based on Nehe''s 1st tutorial, and a little on tutorial 10. I hope someone can find the bug for me and let me know what i''m doing wrong! Get the code here: http://home.online.no/~mschultz/terraint.zip
Well if you are talking about the Assertion error. I got it to work by putting the map.txt into the data/ directory. Program runs fine then, execept for that I can''t see anything.

Jim
-X-
Advertisement
just browsing through your source... think I found the loading bug:

try adding the line

readstr(filein,oneline);

just after: sscanf(oneline, "ROWS %i\n", &numrows);
just browsing through your source... think I found the loading bug:

try adding the line

readstr(filein,oneline);

just after: sscanf(oneline, "ROWS %i\n", &numrows);
just browsing through your source... think I found the loading bug:

try adding the line

readstr(filein,oneline);

just after: sscanf(oneline, "ROWS %i\n", &numrows);
Not sure why you are doing this but you changed the below lines.
NeHe had:

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer

And you have:

glClear(GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer


also pretty sure you have to call glEnd(); When you do a glBegin(XXXX);
Also, a few misc things, that I''m sure is because you aren''t done yet

Later

-X-

This topic is closed to new replies.

Advertisement