Jump to content
  • Advertisement
Sign in to follow this  

OpenGL [OpenGL] problem with antialiasing

This topic is 3122 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 have a problem with antialiasing under Vista, It doesn't work. I've tried to google it and search for related topics here but I was unsuccessfull. I'm using GL_POLYGON_SMOOTH. Here is extract from my code:
BOOL DisplayScene()
   //drawing triangle
        glVertex3f( 0.0, 0.0, -1.0 );
        glVertex3f( 1.0, 0.0, -1.0 );
        glVertex3f( 0.5, 1.0, -1.0 );

//somewhere else.. Turning on ('O') and off ('F') antialiasing
   if(wParam == 'O') 
	glEnable( GL_BLEND );
   if(wParam == 'F') 
        glDisable( GL_BLEND );

Here is my pixelformatdescriptor structure:
static PIXEsizeof(PIXELFORMATDESCRIPTOR) pfd = { sizeof(PIXELFORMATDESCRIPTOR), //WORD nSize PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, //DWORD dwFlags; PFD_TYPE_RGBA, //BYTE iPixelType; 32, //BYTE cColorBits; 0 //BYTE cRedBits; 0, //BYTE cRedShift; 0, //BYTE cGreenBits; 0, //BYTE cGreenShift; 0, //BYTE cBlueBits; 0, //BYTE cBlueShift; 16, //BYTE cAlphaBits; 0, //BYTE cAlphaShift; 0, //BYTE cAccumBits; 0, //BYTE cAccumRedBits; 0, //BYTE cAccumGreenBits; 0, //BYTE cAccumBlueBits; 0, //BYTE cAccumAlphaBits; 16, //BYTE cDepthBits; 0, //BYTE cStencilBits; 0, //BYTE cAuxBuffers; PFD_MAIN_PLANE, //BYTE iLayerType; 0, //BYTE bReserved; 0, //DWORD dwLayerMask; 0, //DWORD dwVisibleMask; 0 //DWORD dwDamageMask; } Antialiasing points and lines works well, while antialiasing polygons doesn't work at all. Can somebody help me? P.S. Sorry for bad english ; p

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!