PDA

View Full Version : Rendering Entities



nukem
07-12-2003, 07:52 PM
I am currently creating a BSP engine. I am now onto the part of loading and displaying entities. The problem is im not quite sure how to do it. What do all of you think is the best route to go?

Thanks
Nuke

rgpc
07-13-2003, 01:01 AM
Use Opengl?

nukem
07-13-2003, 07:33 PM
Yes I am. I was wondering what the best way would be to put it into memory and then how to tell OGL to render it when its in the users view.

[This message has been edited by nukem (edited 07-13-2003).]

SirKnight
07-13-2003, 09:04 PM
Vertex Array Object extention and using glDrawElements and friends. A good thing to note; if you are interested in speed, don't use immediate mode. Oh and try to keep your number of state changes to a minimum.

-SirKnight

jwatte
07-14-2003, 10:00 AM
I'd suggest loading the data file from disk (not OpenGL related) and then turning the file-format-specific data into normalized vertex arrays (not OpenGL related) and then drawing the vertex arrays, typically using DrawRangeElements().

There's a few ways of representing vertex arrays: NV_VAR, ARB_VBO, plain system memory, or display lists. I recommend plain system memory to start, and then either display lists or ARB_VBO if you find you need to optimize (because they're cross-vendor, and display lists are very portable, but won't allow any kind of animation).

In other words: what we're trying to say is that this is the wrong forum to ask questions about Quake file formats. Try planetquake.com or gamedev.net or flipcode.com.