what's wrong with this?

My opengl program runs only 7 FPS on Radeon 8500. I have trimmed the code so that it only draws a cube with no texturing, no buffer clear, no vertex buffer.

This program can reach over 200 FPS on TNT2, Geforce, G450, etc, with the only exception of 7 FPS on Radeon 8500. I am sure I have installed the latest driver.

This program calls ogl functions in MFC’s CChildView::OnPaint().

Other glut programs run well.

Can anyone tell me what may cause the problem?

  1. Have you got the latest ATI drivers for your radeon?
  2. Perhaps some form of memory leak?
  3. Perhaps something with the stencil buffer or a non HW accelerated feature on the Radeon (SW Pixelformat)?

I guess it would be the best to give us a short look into your source .

Diapolo

Perhaps you request pixelformatdescriptor which is not available for hardware rendering on the Radeon.

Well, here is the pixel format init code…

BOOL CGLWindow::InitPixel(HDC hdc)
{
PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
1, // version number
PFD_DRAW_TO_WINDOW | // support window
PFD_SUPPORT_OPENGL | // support OpenGL
PFD_DOUBLEBUFFER ,

  	PFD_TYPE_RGBA,             // RGBA type 
  	16,                        // 24-bit color depth 
  	0, 0, 0, 0, 0, 0,          // color bits ignored 
  	0,                         // no alpha buffer 
  	0,                         // shift bit ignored 
  	0,                         // no accumulation buffer 
  	0, 0, 0, 0,                // accum bits ignored 
  	32,                        // 32-bit z-buffer	 
  	0,                         // no stencil buffer 
  	0,                         // no auxiliary buffer 
  	PFD_MAIN_PLANE,            // main layer 
  	0,                         // reserved 
  	0, 0, 0                    // layer masks ignored 

};
int iPixelFormat = ChoosePixelFormat(hdc, &pfd );
BOOL bResault = SetPixelFormat(hdc, iPixelFormat , &pfd );
m_hGlRC = wglCreateContext( hdc );
wglMakeCurrent( hdc, m_hGlRC );
glDepthFunc( GL_LEQUAL );
return TRUE;
}

[b]
			16,                        // 24-bit color depth 
...
			32,                        // 32-bit z-buffer    

[/b]

Don’t know the Radeon (I’m on GF2), but 16 bit color combined with 32 bit depth may be the prob.

HTH

Jean-Marc

[This message has been edited by JML (edited 03-13-2002).]

Try this, if the if-key is true, then you only have got SW mode.

int iPFDFormat = pfd.dwFlags & PFD_GENERIC_FORMAT;
int iPFDAccelerated = pfd.dwFlags & PFD_GENERIC_ACCELERATED;
if(iPFDFormat && ! iPFDAccelerated)
{
// SW mode
}

Diapolo