Jump to content
  • Advertisement
Sign in to follow this  
mcastrillo

OpenGL is gldrawarrays faster than inmediate mode?

This topic is 5153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I'm writing a opengl application to show OBJ files and I found that glDrawArrays is faster than inmediate mode on some computers and slower with another better graphics cards :( Inm. DrawArrays ----------- ------- ------- ATI 9600Pro 320fps 550fps (+ARB_vertex_buffer_object) NVidia 5200 230fps 300fps (old drivers) NVidia 5200 230fps 150fps (last drivers) ATI 9100IGP 250fps 80fps (laptop HP Pavilion zv5000) ATI 7000 150fps 120fps I'm sure than the computers have the last drivers for the graphic card, chipset, etc etc but I dont understand what is wrong... is not a good idea use glDrawArrays instead inmediate mode? ARB_vertex_buffer_object is not a solution because the program MUST work with computers without this extension. I'm using diffetent (heavy) obj files with 256*256*32 textures using the common piece of code GL.glEnableClientState( GL.GL_VERTEX_ARRAY ); GL.glEnableClientState( GL.GL_TEXTURE_COORD_ARRAY ); GL.glVertexPointer( 3, GL.GL_FLOAT, 0, vert ); GL.glTexCoordPointer( 2, GL.GL_FLOAT, 0, vertTexure ); GL.glDrawArrays( GL.GL_TRIANGLES , 0, poligons ); GL.glDisableClientState( GL.GL_VERTEX_ARRAY ); GL.glDisableClientState( GL.GL_TEXTURE_COORD_ARRAY ); thanks

Share this post


Link to post
Share on other sites
Advertisement
glDrawArrays is slower than immediate mode calls, if you have to do less than ~300 of them ( on my geforce fx 6800 gt; detonator 1.0.6111, but also is ~300 on my 5600 ).

Share this post


Link to post
Share on other sites
Quote:
Original post by 666_1337
glDrawArrays is slower than immediate mode calls, if you have to do less than ~300 of them ( on my geforce fx 6800 gt; detonator 1.0.6111, but also is ~300 on my 5600 ).


It's the part that I don't understand... I tried the program on ATI 9600pro and GeForce 3Ti without ARB_vertex_buffer_object, using glDrawArrays and the result is abour 25-30% faster than inmediate mode... :( why?

Note: Obj = 7400 triangles = 22200 verts + 14800 texture verts

thanks

Share this post


Link to post
Share on other sites
see my reply in the thread DL or VBO
for the commands of querying the max recommended number of verts/indices to pass in a call

it sounds like youre using to many

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!