mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:24:36 +02:00
use glDrawElements() to draw the particles - no major speedup so far, but less code
This commit is contained in:
parent
2bc588f4d0
commit
5536f539b0
1 changed files with 1 additions and 10 deletions
11
main.cpp
11
main.cpp
|
@ -618,16 +618,7 @@ void display(void)
|
||||||
glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE );
|
glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE );
|
||||||
glEnable( GL_POINT_SPRITE_ARB );
|
glEnable( GL_POINT_SPRITE_ARB );
|
||||||
if (!display_head) {
|
if (!display_head) {
|
||||||
glBegin( GL_POINTS );
|
glDrawElements(GL_POINTS, NUM_TRIS, GL_FLOAT, tris.vertices);
|
||||||
{
|
|
||||||
for (i = 0; i < NUM_TRIS; i++)
|
|
||||||
{
|
|
||||||
glVertex3f(tris.vertices[i*3],
|
|
||||||
tris.vertices[i*3+1],
|
|
||||||
tris.vertices[i*3+2]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
}
|
}
|
||||||
glDisable( GL_POINT_SPRITE_ARB );
|
glDisable( GL_POINT_SPRITE_ARB );
|
||||||
glDisable( GL_TEXTURE_2D );
|
glDisable( GL_TEXTURE_2D );
|
||||||
|
|
Loading…
Reference in a new issue