Mailing Lists: Apple Mailing Lists

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

fixed point format



Hi,

I cannot get floating point pbuffers to work on my Radeon 9600 with AGL; however, fixed point
pbuffers do work. This is what I get using


attrib[i++] = kCGLPFAColorSize;
// works with 96 and 128, but only if kCGLPFAColorFloat is disabled
attrib[i++] = 128;
//attrib[i++] = kCGLPFAColorFloat; // does not allow the creation of a valid context.



My question is: given a 32 bit fixed point color channel, what is the range of number that is stored?
Depending on the documentation that I read, it can be signed or unsigned, have a 16 bit mantissa
and a 16 bit decimal, which would imply a range of [0,65000] or [-32000,32000] depending on whether
it is signed or not. Furthermore, I also read that under certain circumstances, there can be clamping
to [0,1]. But I don't really follow the logic on that. For example, here is an excerpt from the documentation on
APPLE_float_pixels



http://developer.apple.com/graphicsimaging/opengl/extensions/apple_float_pixels.html



Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment Operations and the Frame Buffer) Change the Final Conversion subsection of section 3.6.4, to read (p. 160): For an index, if the type is not FLOAT or HALF_FLOAT, final conversion consists of masking the index with the value given in Table 4.6; if the type is FLOAT or HALF_FLOAT, then the integer index is converted to a GL float or half data value. For an RGBA color, components are clamped depending on the data type of the buffer being read. For fixed-point buffers, each component is clamped to [0,1]. For floating-point buffers, if is not FLOAT or HALF_FLOAT, each component is clamped to [0,1] if is unsigned or [-1,1] if is signed and then converted according to Table 4.7.



Thanks for any insight!

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