Jump to content
  • Advertisement
Sign in to follow this  
SteveDeFacto

OpenGL multi sampling not supported?

This topic is 2558 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

I have a GeForce GT 8800 and I wanted to use hardware multi sampling but when I do this:



int pixelFormat;
UINT numFormats;
float fAttributes[] = {0,0};

int iAttributes[] = { WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
WGL_COLOR_BITS_ARB, 24,
WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
WGL_SAMPLE_BUFFERS_ARB, GL_TRUE,
WGL_SAMPLES_ARB, 2,
0, 0};

wglChoosePixelFormatARB( rendertarget->hDC, iAttributes, fAttributes,1, &pixelFormat, &numFormats);
SetPixelFormat( rendertarget->hDC, pixelFormat, NULL );



I am unable to render anything. I checked to see if the extension was supported and it does not appear to be supported. How do games like Half Life 2 do multi sampling if it's not supported by my hardware? I assume there must be a trick to do it without hardware support?

Share this post


Link to post
Share on other sites
Advertisement
How do games like Half Life 2 do multi sampling if it's not supported by my hardware?

Create a multi-sampled framebuffer object (Using ARB Framebuffer). Render into it. Resolve (i.e. downsample). Use the resulting colour texture to draw a fullscreen textured quad.

Share this post


Link to post
Share on other sites
Your hardware does support multisampling, and you should see GL_ARB_multisample in the extensions string. Support for any OpenGL version of 1.3 or later also implies support for multisampling even if the extensions string doesn't show it.

Share this post


Link to post
Share on other sites

[quote name='SteveDeFacto' timestamp='1313304213' post='4848871'] How do games like Half Life 2 do multi sampling if it's not supported by my hardware?

Create a multi-sampled framebuffer object (Using ARB Framebuffer). Render into it. Resolve (i.e. downsample). Use the resulting colour texture to draw a fullscreen textured quad.
[/quote]

Hi, I've long since resolved this issue though your reply sounds like there may be a more direct way then what I am doing. Right now I have two frame buffers, one for multisample rendering, and one for texture rendering. I blit the image from the multisample FBO to the texture FBO so I can use that one to render to a texture. Is there a way I can get a texture from the multisample FBO without needing to copy it to another frame buffer? It would allow me to cut one extra step from my rendering pipeline.

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!