Mailing Lists: Apple Mailing Lists

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

Re: Floating point PBuffers



I think that, if you want 128-bit colors (4x 32-bit float channels),
you'll need to specify the kCGLPFAColorFloat attribute,
or you'll get an error when you try to create the pbuffer.
("invalid pixel format")

Jeff

Claire Rogers <email@hidden> wrote:

Thanks for that.  I was looking for something to specifically state
floating point pixels like I use
under windows.  I did actually Find 	

kCGLPFAColorFloat         =  58,	/* color buffers store floating point
pixels    */

in the headers, but nothing equivalent under agl.  I'll have a play and
see if I can make it work.

Claire

On 15 Sep 2004, at 18:59, Pete Warden wrote:
I'm using 16 bit float pbuffers successfully. They only work on later
ATI Radeon cards at the moment, 9500, 9600 and 9700, or R350+ if
you're looking at the chipset name in the system profiler. They aren't
supported on any NVidia cards on OS X yet. Look for
"APPLE_float_pixels" in the extensions string.

Here's the pixel format attributes I use:

    CGLPixelFormatAttribute pixelFormatAttributes[]={
        kCGLPFANoRecovery,
        kCGLPFAAccelerated,
        kCGLPFAWindow,
        kCGLPFAColorSize,(CGLPixelFormatAttribute)(bitsPerPixel),
        (CGLPixelFormatAttribute)0};

If you set bitsPerPixel to 32, you'll get a plain 8 bit buffer, 64
gives you a half float buffer, and 128 gives you 32 bit floats.
There's some restrictions on these pbuffers, you can't do any blending
for example.

Pete

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