Where's the bug?
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
Jim
-X-
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);
try adding the line
readstr(filein,oneline);
just after: sscanf(oneline, "ROWS %i\n", &numrows);
October 19, 2000 04:00 PM
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);
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);
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:
And you have:
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
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
Popular Topics
Advertisement