Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

GLBsp (Rendering)

Recommended Posts

I am working on a opengl port, the gwa files from glbsp are loaded, linedefs are drawn (no textures) but what I can't figure out is how to render the floors, ceiling planes... anyone know anything reply to this post.

-James Pezold

Share this post

Link to post

basically, it looks like this:

for (i = 0; i < subSector->numlines; i++)
   seg = segs[subSector->firstline + i];
   glVertex3f(seg->v1->x / (FRACUNIT * 1.f), floorheight, seg->v1->y / (FRACUNIT * 1.f));
for one plane you go 0..numlines and the other is the opposite. You could also bitshift the x/y values (>> FRACBITS), but you get better precision by dividing by FRACUNIT (and converting to floating point).

For ZDoomGL, you have to query the sector plane for the height at a location (because of the slopes), but if you don't have to worry about slopes then just grab the floor/ceiling height normally.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now