Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GeForce FX 5200 FSAA issue



Hi,

Houston, we've got a problem! :) Enabling multisampling on pbuffer turns the rendered shadow to a mess. And it's only with nVidia GeForce FX 5200 (you can easily guess it's a new iMac G5).

Test case photos on my site: http://homepage.mac.com/segabor/PhotoAlbum8.html

GL Gurus please heal my GeForce 5200 :)

Here's a part of my pbuffer implementation:

-------------------------
// #define USE_MULTISAMPLE 1
#define USE_MULTISAMPLE_VALUE 2

// MacGL.m
extern SiLGameView *glView;

ApplePBuffer::ApplePBuffer(TextureOGL *t, RenderOGL *eng)
{
SRECT viewport(0.0f, 0.0f, (float)t->GetWidth(), (float)t->GetHeight());


engine = eng;
tex = t;

NSOpenGLPixelFormatAttribute PBScreenAttributes[] = {
// NSOpenGLPFADoubleBuffer,
NSOpenGLPFAAccelerated,
NSOpenGLPFAColorSize, glView->colorBits,
NSOpenGLPFADepthSize, glView->depthBits,
NSOpenGLPFANoRecovery,
#ifdef USE_MULTISAMPLE
NSOpenGLPFASampleBuffers, 1, // multisample
NSOpenGLPFASamples, USE_MULTISAMPLE_VALUE,
#endif
0
};


// PBuffer pixel format
NSOpenGLPixelFormat* pBufferScreenPixelFormat = [
[[NSOpenGLPixelFormat alloc] initWithAttributes: PBScreenAttributes] autorelease];


_pBufferContext = [[[NSOpenGLContext alloc] initWithFormat: pBufferScreenPixelFormat
shareContext: [glView sharedContext]]
retain];
if (!_pBufferContext) {
NSLog(@"SiLGameView; setupPBuffer error!");
} else {
_pbuff = [[[NSOpenGLPixelBuffer alloc] initWithTextureTarget: GL_TEXTURE_2D
textureInternalFormat: GL_RGBA
textureMaxMipMapLevel: 0
pixelsWide: tex->GetWidth()
pixelsHigh: tex->GetHeight()]
retain];


// Attach the PBuffer
[_pBufferContext setPixelBuffer: _pbuff
cubeMapFace: 0
mipMapLevel: 0
currentVirtualScreen: 0];
}
}

(...)

bool ApplePBuffer::Begin(void)
{
_origContext = [NSOpenGLContext currentContext];


// wait for OpenGL to finish all operations
glFinish();

[_pBufferContext makeCurrentContext];

// store old viewport
engine->GetViewPort(old_vp);


// set new viewport
glViewport(0, 0, tex->GetWidth(), tex->GetHeight());

#ifdef USE_MULTISAMPLE
// enable multisample
// ref: http://developer.apple.com/qa/qa2001/qa1268.html
glEnable (GL_MULTISAMPLE_ARB);
// glHint (GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
#endif


return true;
}
-------------------------

Thanks,

Gábor

deliahe - "a szemetet egy helyre sodorja a sale"
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.