Why it is so slowly?

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?

Hi
Not enough info to say something.Give more details.What is your card ? What are you doing ? How ?

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.

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

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?

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?

Yes i think so. Why it can be?

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

Wihtout lines its about 2,5 sec.

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).]

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.

Yes i know it. I found in Inet version to w2k with support OpenGL.

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

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

  • Tom

No i didn’t have both in the machine at the same time. I just check on Ati Rage 128 and when on GeForce2.

Thanx guys, you are kind peaple