Rendering Quake2 bsp data to screen
Alright, im trying to load & display a quake2 level. I successfully load all the vertex/face/leaf/ etc data out of the file and know that its correct as ive checked it aginst carmack''s bspinfo utility. But when i go to render the data in opengl i get nothing, just a blank screen. wether it be faces, verticies, or whatever. Any ideas? thanks
~ chris
June 27, 2000 01:40 AM
Probably a bug in your display code...
Nothing much more to say since you didn''t post any details/source code.
Protozone
Nothing much more to say since you didn''t post any details/source code.
Protozone
Sorry for the lack of detail related to the problem.
Basically after createing the window/initializing opengl etc, my routines to load the .bsp data are executed, all the data is loaded into proper structures.
At this point rendering code is called, and that just doesnt work. at this point id jump for joy to even get it to display vertex data. Heres the display code.
btw im using glut for lazyness purposes at the moment.
void RenderMap()
{
GLfloat z;
glClear(GL_COLOR_BUFFER_BIT);
z = -50.0f;
glBegin(GL_POINTS);
for(int i = 0; i < n_vertices; i++, dvertex++)
glVertex3f((GLfloat)dvertex->x, (GLfloat)dvertex->y, (GLfloat)dvertex->z);
glEnd();
glFlush();
}
Im pretty much convinced that it has something to do with my viewing volume, but not positive. any help is appretiated.
Basically after createing the window/initializing opengl etc, my routines to load the .bsp data are executed, all the data is loaded into proper structures.
At this point rendering code is called, and that just doesnt work. at this point id jump for joy to even get it to display vertex data. Heres the display code.
btw im using glut for lazyness purposes at the moment.
void RenderMap()
{
GLfloat z;
glClear(GL_COLOR_BUFFER_BIT);
z = -50.0f;
glBegin(GL_POINTS);
for(int i = 0; i < n_vertices; i++, dvertex++)
glVertex3f((GLfloat)dvertex->x, (GLfloat)dvertex->y, (GLfloat)dvertex->z);
glEnd();
glFlush();
}
Im pretty much convinced that it has something to do with my viewing volume, but not positive. any help is appretiated.
I have never used OpenGL for anything nor do I know how to use all the functions and stuff... I would guess that glFlush() only deallocates the currently allocated memory for the vertices, and that''s about all it does... well then I don''t see your drawing routine that displays the vertices on the screen.. I remember seeing a function like DrawPrimitive() or something like that... So what you''re doing now is basically creating vertices, and then removing them without actualy displaying them on the screen by using one of OpenGL''s funcy''s... anyways... Hope this helps, and good luck to you!
..-=ViKtOr=-..
..-=ViKtOr=-..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement