Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


help!!! - opengl performance


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
17 replies to this topic

#1 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 October 2001 - 10:40 PM

Help!!! I have < 15 FPS at 2000-3000 triangles drawn! On a Athlon Thunderbird 800 with nVidia geForce 2 GTS with the newest detonator-driver!!! What''s going on? No texturing, only smooth shaded coloured triangles in COMPILED DISPLAY LISTS. There is one display list for each node of my octree. howdy, gahre

Sponsor:

#2 Maximus   Members   -  Reputation: 124

Like
Likes
Like

Posted 21 October 2001 - 01:26 AM

Perhaps something else in your code?

With my engine, Im doing 5700+ triangles at 120fps, using a quad-tree for culling, using textured tri-strips in display lists for drawing. Also taking care of collision detection and direct input for both keyboard and mouse, running without optimizations, etc.

Im running a GeForce, p3-600, latest DetonatorXP drivers.

#3 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 01:33 AM

Whoah! What the hell? I''ve already searched for some expensive stuff in my code, but didn''t really find anything. there must be a mistake in my code that slows the whole thing down. The funny thing is:

If I reduce the number of triangles I get ~75 FPS at 40 tris drawn and ~75 FPS at 600 tris drawn. Maybe it is because I use allegro+win32api??? Or my timer measures wrong (but it has always worked before) maybe the win32api doesn''t like my timer??? I found out that if I give hDC to my octree-building finc to put out some text stuff it is f**king slow if timing is enabled - why that?

#4 phueppl1   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 01:34 AM

Are you sure you aren''t regenerating the displaylists every frame? If so, change that :o). Also, what about fillrate? what''s the size of the triangles? It might be that you have too much overdraw.. use some kind of occlusion culling for that.. (Occluders might be an idea..)

cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states


#5 Dactylos   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 01:50 AM

quote:
Original post by gahre
Whoah! What the hell? I''ve already searched for some expensive stuff in my code, but didn''t really find anything. there must be a mistake in my code that slows the whole thing down. The funny thing is:

If I reduce the number of triangles I get ~75 FPS at 40 tris drawn and ~75 FPS at 600 tris drawn. Maybe it is because I use allegro+win32api??? Or my timer measures wrong (but it has always worked before) maybe the win32api doesn''t like my timer??? I found out that if I give hDC to my octree-building finc to put out some text stuff it is f**king slow if timing is enabled - why that?

The FPS locking at 75 is probably because you have your monitor refresh set at 75Hz and OpenGL waits for the vertical retrace. Nothing is wrong with that. If you want to see the true FPS you should change the "Vertical sync" option in the OpenGL settings for your driver to "Off by default" or "Always off" (the exact names may differ for you).

#6 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 01:59 AM

Well, that 75 FPS problem is solluted now, but the overdraw stuff not yet. The size of my tirangles is indeed one of my problems, because if I want to prevent triangles from being drawn twice of several times, There is zig-zag where the frustum is culled, I have to include some triangle splitting stuff for my octree nodes. Now I get about 140 FPS at 90 triangles drawn - not very fast! I can''t find any expensive stuff in my code (it''s pretty messy) - but I''m not THE programmer, it''s just a little hobby, so the code is not optimized.

#7 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 02:01 AM

mybe I should use triangle strips in my display lists? Will this be much faster?

#8 phueppl1   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 02:31 AM

Yes, use triangle strips.. they will not speed up rendering _alot_ but they''ll save quite some memory from the display list... I didn''t exactly mean splitting up your triangles is that important.. I wonder how much each triangle covers the screen (-> how much overdraw you''ve got)..

cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states


#9 phueppl1   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 02:32 AM

Another thing: Is there a lot of Alpha blending and stuff like that going on? Disable Alpha test if not needed :o))

cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states


#10 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 03:09 AM

No, no alpha blending going on (so far) and no alpha testing enabled (of course).

I reached ~160 FPS at 90 tris now. I altered the far value in gluPerpective. (to 35.0 :-((((( )

#11 jocke   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 04:05 AM

When you draw your text, do you use bitmapped fonts?
This may be part of your problem. I''m no expert, just started
learing OpenGL myself recently, but when i use the bitmapped
fonts to draw my text it kills the frame-rate. Although i think
that is a problem related to my Voodoo2 card, i''m not sure.
Has anyone else experiensed problems with bitmapped fonts?

#12 jocke   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 04:08 AM

BTW, when i say bitmapped fonts i mean the stuff
that NeHe show in one of his tutorials.

#13 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 21 October 2001 - 04:39 AM

gahre:

There is something *very* wrong with your engine. On optimal programming (vertex array range, DrawRangeElements, tristrips, direct AGP DMA''s, etc) my engine renders around 180000 triangles at ~40 fps on a GeForce2 GTS. But only very small ones, or you''ll get fillrate limited.

- AH


#14 Vlion   Members   -  Reputation: 151

Like
Likes
Like

Posted 21 October 2001 - 05:45 PM

Yeah.
You should be getting nice framrates...hmmm.
What exactly is your program doing ?
What OpenGL commands, what data structures, whats the rendering doing, what ai stuffs going on, blah blah blah blah.
I know you said octrees, smooth shaded tris, compiled display lists, but could you list more of whats going on ?
~V''lion


I came, I saw, I got programmers block.
~V''''lion

#15 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 October 2001 - 10:30 PM

Well, actually there''s not much going on besides Input stuff, drawing and collision detection. No AI, nothing. I just check for input, transform, draw, do collision detection and then move the player. In my octree I am using compiled display lists for drawind, but the other mothod with glBegin and glEnd brings better results, don''t ask me why, I don''t have the slightest idea. Maybe there''s some other stuff that is faster, because the version with the conventional (???) method is older.

cheers,

Gahre

#16 Maximus   Members   -  Reputation: 124

Like
Likes
Like

Posted 21 October 2001 - 10:48 PM

How are you doing your collision detection? Are you testing every triangle or just a couple?

Have you tried profilling your project to see whats taking up all the time?

Care to post the source so we can have a look through to try spot whats going on?

#17 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 October 2001 - 01:11 AM

I only test a couple, only the node the player is in and only the triangles with whose bounding boxes the player collides.

Post the source? where? in the forum? -> too big, isn''t it?

#18 Terran Marine   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 October 2001 - 02:20 AM

You might be using a software-only feature. Check for any usage of the accumulation buffer... Also, don''t do any stipple transparency.

Also try reinstalling DirectX. Microsoft made Windows require it even for OpenGL.

I once disabled DirectDraw and got the same type of performance problems.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS