Jump to content
  • Advertisement

Archived

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

Rendering Quake2 bsp data to screen

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

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Probably a bug in your display code...
Nothing much more to say since you didn''t post any details/source code.

Protozone

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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=-..

Share this post


Link to post
Share on other sites
Where are you swapping your buffer to the screen (where's your call to glutSwapBuffers())? Also, try calling flush after you loop for displaying vertices (not inside the loop).

Morgan

Edited by - Morgan on June 28, 2000 10:10:16 PM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!