multi sampling not supported?

Started by
2 comments, last by JackOfAllTrades 12 years, 8 months ago
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?
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.
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.

[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.

This topic is closed to new replies.

Advertisement