PDA

View Full Version : Why it is so slowly?



Sanya
04-25-2001, 06:11 AM
My program on OpenGL so slowly. I use windowed software (MS Generic) and hardware rendering. So hardware rendering a little faster than software. I waited for 3 - 10 times increase perfomance. Whats wrong? Or it is ok?

Michail Bespalov
04-25-2001, 06:41 AM
Hi
Not enough info to say something.Give more details.What is your card ? What are you doing ? How ?

Sanya
04-25-2001, 08:46 PM
I have W2k Ati Rage 128 32 Mb and GeForce2 MX
I render a lot of cubes and lines around it. Its about 50000 cubes and render time about 5 sec on hardware and software rendering.

Tom Nuydens
04-25-2001, 11:43 PM
I would suspect that the lines are to blame. Line drawing is quite slow. Also, don't forget that 50K cubes equal 600K triangles. If you're drawing that in immediate mode (i.e. without display lists or vertex arrays), performance won't be too impressive.

- Tom

Sanya
04-26-2001, 12:44 AM
I'll try display list and perfomance improved in about 1,3 times. But its still so slowly. Is it draw 600K triangles so much - 5 second on GeForce 2? http://www.opengl.org/discussion_boards/ubb/confused.gif

Dodger
04-26-2001, 03:37 AM
Check if you have the latest nVidia-drivers installed. 600,000 triangles in 5 seconds doesn't sound too good to me, maybe your app falls back into software for some reason?

Sanya
04-26-2001, 04:00 AM
Yes i think so. Why it can be?

Tom Nuydens
04-26-2001, 04:05 AM
Yes, 5 spf is obviously too slow for 600K polygons, but how many lines are you drawing? You say you're drawing "a lot of cubes and lines around it". If this means that you're drawing all 50K cubes both shaded and in wireframe, then I don't think your performance is that unusual.

Try getting rid of the lines to see if that speeds things up.

- Tom

Sanya
04-26-2001, 04:16 AM
Wihtout lines its about 2,5 sec.

Michail Bespalov
04-26-2001, 04:21 AM
Hello.

I already have his binary.

Here is gltrace.txt



Call Counts:
glBegin 29002
glCallLists 131
glClear 6
glClearColor 8
glClearDepth 2
glColor3f 46668
glDepthFunc 9
glDisable 121
glEnable 17
glEnd 29002
glFrontFace 4
glGetIntegerv 122
glLineStipple 2
glLineWidth 137
glListBase 109
glLoadIdentity 18
glMatrixMode 28
glPointSize 108
glPolygonMode 4
glPolygonOffset 2
glPopMatrix 10
glPopName 29575
glPushMatrix 10
glPushName 29575
glRasterPos2d 23
glRasterPos3d 108
glRenderMode 4
glSelectBuffer 7
glVertex2d 6
glVertex2f 3318
glVertex3d 1536
glVertex3f 130792
glVertex3fv 60
glViewport 6
wglCreateContext 6
wglGetCurrentDC 11
wglMakeCurrent 49
wglUseFontBitmapsA 5

He is using selection plus worst possible immediate mode glVertex3f + glBegin/glEnd per quad and glBegin(GL_LINES) right after it.I think the reasons of such performance are almost obvious.But he doesn't belive me.



[This message has been edited by Michail Bespalov (edited 04-26-2001).]

Kilam Malik
04-26-2001, 04:30 AM
The standard NVidia drivers coming along with w2k have no hardware accellaration! You should check the driver. Simply check, if you have an nvidia folder in the display settings.

Sanya
04-26-2001, 04:38 AM
Yes i know it. I found in Inet version to w2k with support OpenGL.

bsenftner
04-26-2001, 06:02 AM
Did I see that you have two video cards? An ATI and an Nvidia card? If they are both in the machine at the same time, then OGL acceleration doesn't work. At least that's what I've been told- have not tried it myself.

-Blake

Tom Nuydens
04-26-2001, 06:17 AM
Originally posted by Sanya:
Yes i know it. I found in Inet version to w2k with support OpenGL.

You're drawing 50,000 cubes in immediate mode, you're using selection, line stippling and font bitmaps, and it seems you're calling glBegin() for every single polygon.

Of course your performance sucks!

Either learn to live with it or stick your polygons in a vertex array http://www.opengl.org/discussion_boards/ubb/smile.gif

- Tom

Sanya
04-26-2001, 06:17 AM
No i didn't have both in the machine at the same time. I just check on Ati Rage 128 and when on GeForce2.

Sanya
04-26-2001, 09:02 PM
Thanx guys, you are kind peaple http://www.opengl.org/discussion_boards/ubb/wink.gif