|
|
Vertex Array Implementation
Could someone please explain the best way to use vertex arrays.
I am writing a 3D engine, each surface has an array of vertices, normals and
indices. Should I:
a) Create one huge vertex/normal/.. array with
glVertexPointer/glNormalPointer when I start up then use glDrawElements
giving an offset to each objects indices each frame?
b) use many smaller glVertexPointer's which are called each frame?
when is data actually copied across to the card? glDrawElements?
Many regards
Mike
|
|
0
|
|
|
|
Reply
|
Michael
|
11/17/2004 3:38:44 AM |
|
Michael wrote:
> Could someone please explain the best way to use vertex arrays.
> I am writing a 3D engine, each surface has an array of vertices, normals and
> indices. Should I:
> a) Create one huge vertex/normal/.. array with
> glVertexPointer/glNormalPointer when I start up then use glDrawElements
> giving an offset to each objects indices each frame?
> b) use many smaller glVertexPointer's which are called each frame?
There's no right answer to that, it depends:
a) On your graphics card - a big array might not
fit on the graphics card all at once.
b) On your program - if you're culling objects
against the view then only a small part of
the vertices are needed. If you make one big
array then you're transferring a lot of useless
vertices.
> when is data actually copied across to the card? glDrawElements?
>
Again, it depends on the driver.
The vertex_buffer_object extension lets you put the
arrays on the card so they never need copying.
--
<\___/> For email, remove my socks.
/ O O \
\_____/ FTB. The Cheat is not dead!
|
|
0
|
|
|
|
Reply
|
fungus
|
11/17/2004 7:02:32 AM
|
|
Michael wrote:
> Could someone please explain the best way to use vertex arrays.
> I am writing a 3D engine, each surface has an array of
> vertices, normals and indices. Should I:
Depends, as so often in OpenGL.
> a) Create one huge vertex/normal/.. array with
> glVertexPointer/glNormalPointer when I start up then use
> glDrawElements giving an offset to each objects indices each
> frame?
This is probably the right method if you want to draw a lot of
different, not too complex objects, sharing the texture(s), e.g.
plants or particle systems. Actually it's robably the best
method for particle systems.
> b) use many smaller glVertexPointer's which are called
> each frame? when is data actually copied across to the card?
> glDrawElements?
IMHO the better method for rather complex objects having >=500
vertices.
Suggestion: Use the capabilities of modern GPUs. E.g. in our game
there are only about 10 different base meshes for humans,
however every character looks different. The magic behind it:
For every character's body a set of "morphers" is set globally.
These morphers control mesh deformation in a vertex program.
Currently there are 6 morphers
- arm strengh
- leg strengh
- fat
- muscle
- proportion1
- proportion2
and as every NPC has slightly different morphers they look all
different. The head itself has it's own set of morphers, as
these also have their own influence on look and mimic system's
bones.
Wolfgang
|
|
0
|
|
|
|
Reply
|
Wolfgang
|
11/19/2004 2:16:24 PM
|
|
|
2 Replies
210 Views
(page loaded in 0.051 seconds)
Similiar Articles: Vertex Array Implementation - comp.graphics.api.openglCould someone please explain the best way to use vertex arrays. I am writing a 3D engine, each surface has an array of vertices, normals and indices. ... Vertex Arrays and Texturing - comp.graphics.api.openglVertex Array Implementation - comp.graphics.api.opengl Vertex Arrays and Texturing - comp.graphics.api.opengl Vertex Array Implementation - comp.graphics.api.opengl Could ... Graph implementation - comp.lang.c++.moderatedVertex Array Implementation - comp.graphics.api.opengl Could someone please explain the best way to use vertex arrays. I am writing a 3D engine, each surface has an array ... Finding all cycles in a directed graph - comp.lang.rubyDo you need the minimum cycles passing through each vertex of the graph, or ... Finding all cycles in a directed graph - comp.lang.ruby Vertex Array Implementation - comp ... Generating volume coordinates of an irregular polyhedron using ...Vertex Array Implementation - comp.graphics.api.opengl Generating volume coordinates of an irregular polyhedron using ... Hi, I'm not sure whether this is something that ... [OT] OpenGL games? - comp.graphics.api.openglVertex Array Implementation - comp.graphics.api.opengl [OT] OpenGL games? - comp.graphics.api.opengl Vertex Array Implementation - comp.graphics.api.opengl Suggestion: Use ... Using 3D Textures - the best way - comp.graphics.api.opengl ...Vertex Array Implementation - comp.graphics.api.opengl Could someone please explain the best way to use vertex arrays. I am writing a 3D engine, each surface ... lot of ... is it usefull to multithread an opengl game - comp.graphics.api ...Vertex Array Implementation - comp.graphics.api.opengl [OT] OpenGL games? - comp.graphics.api.opengl Vertex Array Implementation - comp.graphics.api.opengl Suggestion: Use ... Surface normals? - comp.graphics.api.openglVertex Array Implementation - comp.graphics.api.opengl Could someone please explain the best way to use vertex arrays. I am writing a 3D engine, each surface has an array ... A problem with performance - comp.graphics.api.openglAs for vertex buffers (vertex arrays?), I looked into this, but there are enough ... I am decreasing the resolution on my arcs and implementing an algorithm to combine ... Vertex Array Implementation - comp.graphics.api.opengl | Computer ...Could someone please explain the best way to use vertex arrays. I am writing a 3D engine, each surface has an array of vertices, normals and indices. ... GL_ATI_vertex_array_objectShould this just sit on top of the existing vertex array implementation, instead of introducing a new set of API calls? RESOLUTION: NO. Trying to fit something on top ... 7/24/2012 3:09:16 PM
|
|
|
|
|
|
|
|
|