I have problems initalizing a color buffer with ChoosePixelFormatARB and WGL_TYPE_RGBA_FLOAT_ARB value. The ChoosePixel mehtod succeeds, but when I check the state with
glGetBooleanv( GL_RGBA_FLOAT_MODE_ARB, &state );
it says GL_FALSE ( float mode not enabled ).
Can somebody post a link or a snippet for initalizing the context with wglChoosePixelARB?
</font><blockquote><font size=“1” face=“Verdana, Arial”>code:</font><hr /><pre style=“font-size:x-small; font-family: monospace;”>#define PBUFFER_USE_DOUBLE_BUFFER 0x00000001
#define PBUFFER_RENDER_TO_TEXTURE 0x00000002
#define PBUFFER_TEXTURE_CUBE_MAP 0x00000004
#define PBUFFER_FORMAT_FLOAT 0x00000008
#define PBUFFER_RGBA 0x00000010
#define PER_CHANNEL_COLOR_BITS_16 0x00000020
#define PER_CHANNEL_COLOR_BITS_24 0x00000040
#define PER_CHANNEL_COLOR_BITS_32 0x00000080
bool GLPBuffer::initialize(int newWidth, int newHeight,
int newDepthBits, int newStencilBits,
//Check for pbuffer support
This is truly bothering me: how come every now and then this board classifies me as an unregistred user even though it clearly spells out that I’m LOGGED when I type my messages?
Anyway, here’s a link to my GLPBuffer set of classes.
Now to create a float 2D RGBA pBuffer, you need to initialize it this way:
if(!pixelBuffer.initialize(TCMSize,TCMSize, 24, 0,
hi, do i have to have a pbuffer to work with float buffers? Because in the spec of this extension, nothing is mentionend.
olmeca - you can work with float-textures without using pbuffers. If you want a floating-point rendertarget, you need to use either frame-buffer-objects or pbuffers.
abzap - your pbuffer-class doesn’t work for texture-rectangles, does it?
Is there a way to use pbuffer floatingpoint texture-rectangles that work on both ati/nv, or do I (still) need to check extensions? Specifically I’m looking to replace the current nvidia-specific:
iAttribs[niAttribs++] = WGL_TEXTURE_FORMAT_ARB;
iAttribs[niAttribs++] = (isFloat) ? WGL_TEXTURE_FLOAT_RGBA_NV : WGL_TEXTURE_RGBA_ARB;
iAttribs[niAttribs++] = WGL_TEXTURE_TARGET_ARB;
iAttribs[niAttribs++] = WGL_TEXTURE_RECTANGLE_NV;
PS. yeah I know, fbo…