News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

To Vertex-list or not to Vertex-list....

Started by Draakie, November 09, 2006, 07:21:30 AM

Previous topic - Next topic

Draakie

Hiya,

I wrote a file parser for DeleD 3D (download and license free) modeling program - created a pseudo world and loaded the
various textures, coords (texture,vertex,xyz-coords) into respective memory pointer array structures. Tested and working   :bg

Now....

What's the correct way of setting up OpenGL with the Data in the DRAW loop ?

1.
I see Hitchhiker in one of his examples uses Vertex etc. lists in a seemingly non-chalant fashion - nice compact code - with references
to OpenGL functions that don't make any sense to me at present. EX. OpenGL.hlp specifies a number of paramaters for Vertex etc. list
functions - Hitchhiker's code ignore's some of the parameters. Is the ASM includes diffirent to the way the HLP describes?
2.
The other method's I've seen implement a brute force multi level control break method -
--> Per object ... per vertex ... per normal ... per coordinate ... describe it to OPENGL.

hmmmmmm..... how would a game / demo programmer do it ?  :bdg

PS: What would the Pro's and Con's of each method be ?

Thanks loads
Draakie
Does this code make me look bloated ? (wink)

hitchhikr

You don't want to display a complete vx world in one go, you'll need to partition it (usually with a bsp tree) and then only display the relevant parts (selected via a frustum culling).

At a first glance, i'd say to fastest way would be to use vertex buffer objects as they allow programs to statically & permanently upload the vertices geometry into the gfxcard memory thus avoiding the bottleneck of the transfers during the drawing process. On top of that, using shaders to modify the vertices (if necessary) located in the gfxcard memory should give the best performances.

I planned to create some examples about all that.


Draakie

Thanx hitchhikr.

Ca'nt wait for the examples !!

Vertex Buffers heh ?

[Draakie runs off to learn about those] :P
Does this code make me look bloated ? (wink)

Draakie

#3
Found this floating on the net in regards view frustrum culling.
Just thought I'd share it - as the research continues.....

http://www.lighthouse3d.com/opengl/

[/edit]
Found this nice tutorial on Vertex Buffer Objects
http://www.ozone3d.net/tutorials/opengl_vbo.php
Does this code make me look bloated ? (wink)