this is something thats been bugging me for a while , (heres a couple of posts that ive done to the comp.graphics.api.opengl newsgroup) , i have tried everything i know and frankly im at a lose
this is from 19 april this year
sorry bout harping on about this, (i wrote last week)
i found about 6 months ago using drawElements() i was getting bout a
20%increase of speed, but now im getting about a 30 decrease of speed vs
just drawing the vertices intermidiatly (i suck in spelling).
maybe (probably) i aint understanding how it works
but if i go
renderObject()
{ glVertexPointer(3, GL_FLOAT, 0, elements.verts);
glTexCoordPointer(2,GL_FLOAT,0, elements.texCoords);
glNormalPointer(GL_FLOAT,0, elements.normals);
glLockArraysEXT(0, elements.num_of_vertices);
glDrawElements(GL_TRIANGLES, elements.num_elements, GL_UNSIGNED_INT,
elements.indices);
glUnlockArraysEXT();
}
// draw the same object in 10 different places
change_elements(); // just sets 4 ptrs in struct elements to the objects
mesh data
for (i=0;i<10;i++)
{ translate3fv(obj[i].pos);
renderobject();
}
- im obvoiusly doing something wrong so if anyone knows of a good tutorial
on the net that explains drawEleements + how to use them efficiatly, i’ld be
wraped. (btw ive got the red book)
zed
and this is from 19 august this year
i kwno ive brought this subject up at least 5x over the last year on this group,
but ive done so much testing on it with various models, simple shapes etc. but im still yet to find a case where they are actually
render faster than drawing intermediatly. does anyone know of any code that actually runs faster with cvas. im thinking maybe its me
card/computer or maybe its just me
please can someone show me the proof and put me out of my misery (slight exageration)
and a couple of days later
another followup hope youre not getting bored , here is the spheremark demo from nvidia http://www.nvidia.com/marketing/developer/devrel.nsf/TechnicalDemosFrame?OpenPage ±50kb download
heres my results on my vanta
vinilla
Vertex arrays 0.307
displaylist 0.348
immediate 0.400
with textures
Vertex arrays 0.282
displaylist 0.336
immediate 0.393
not using tristrips + no texture
Vertex arrays 0.153
displaylist 0.336
immediate 0.399
results are million tris a second