case GL_RENDERBUFFER_RED_SIZE_EXT:
if (ctx->CurrentRenderbuffer->_BaseFormat == GL_RGB ||
ctx->CurrentRenderbuffer->_BaseFormat == GL_RGBA) {
- *params = ctx->CurrentRenderbuffer->ComponentSizes[0];
+ *params = ctx->CurrentRenderbuffer->RedBits;
}
else {
*params = 0;
case GL_RENDERBUFFER_GREEN_SIZE_EXT:
if (ctx->CurrentRenderbuffer->_BaseFormat == GL_RGB ||
ctx->CurrentRenderbuffer->_BaseFormat == GL_RGBA) {
- *params = ctx->CurrentRenderbuffer->ComponentSizes[1];
+ *params = ctx->CurrentRenderbuffer->GreenBits;
}
else {
*params = 0;
case GL_RENDERBUFFER_BLUE_SIZE_EXT:
if (ctx->CurrentRenderbuffer->_BaseFormat == GL_RGB ||
ctx->CurrentRenderbuffer->_BaseFormat == GL_RGBA) {
- *params = ctx->CurrentRenderbuffer->ComponentSizes[2];
+ *params = ctx->CurrentRenderbuffer->BlueBits;
}
else {
*params = 0;
case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
if (ctx->CurrentRenderbuffer->_BaseFormat == GL_RGB ||
ctx->CurrentRenderbuffer->_BaseFormat == GL_RGBA) {
- *params = ctx->CurrentRenderbuffer->ComponentSizes[3];
+ *params = ctx->CurrentRenderbuffer->AlphaBits;
}
else {
*params = 0;
break;
case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
if (ctx->CurrentRenderbuffer->_BaseFormat == GL_DEPTH_COMPONENT) {
- *params = ctx->CurrentRenderbuffer->ComponentSizes[0];
+ *params = ctx->CurrentRenderbuffer->DepthBits;
}
else {
*params = 0;
break;
case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
if (ctx->CurrentRenderbuffer->_BaseFormat == GL_STENCIL_INDEX) {
- *params = ctx->CurrentRenderbuffer->ComponentSizes[0];
+ *params = ctx->CurrentRenderbuffer->StencilBits;
}
else {
*params = 0;
if (fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer) {
fb->Visual.redBits
- = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->ComponentSizes[0];
+ = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->RedBits;
fb->Visual.greenBits
- = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->ComponentSizes[1];
+ = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->GreenBits;
fb->Visual.blueBits
- = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->ComponentSizes[2];
+ = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->BlueBits;
fb->Visual.alphaBits
- = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->ComponentSizes[3];
+ = fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer->AlphaBits;
fb->Visual.rgbBits
= fb->Visual.redBits + fb->Visual.greenBits + fb->Visual.blueBits;
fb->Visual.floatMode = GL_FALSE;
if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
fb->Visual.haveDepthBuffer = GL_TRUE;
fb->Visual.depthBits
- = fb->Attachment[BUFFER_DEPTH].Renderbuffer->ComponentSizes[0];
+ = fb->Attachment[BUFFER_DEPTH].Renderbuffer->DepthBits;
}
if (fb->Attachment[BUFFER_STENCIL].Renderbuffer) {
fb->Visual.haveStencilBuffer = GL_TRUE;
fb->Visual.stencilBits
- = fb->Attachment[BUFFER_STENCIL].Renderbuffer->ComponentSizes[0];
+ = fb->Attachment[BUFFER_STENCIL].Renderbuffer->StencilBits;
}
compute_depth_max(fb);
rb->PutMonoRow = put_mono_row_ubyte3;
rb->PutValues = put_values_ubyte3;
rb->PutMonoValues = put_mono_values_ubyte3;
- rb->ComponentSizes[0] = 8 * sizeof(GLubyte);
- rb->ComponentSizes[1] = 8 * sizeof(GLubyte);
- rb->ComponentSizes[2] = 8 * sizeof(GLubyte);
- rb->ComponentSizes[3] = 0;
+ rb->RedBits = 8 * sizeof(GLubyte);
+ rb->GreenBits = 8 * sizeof(GLubyte);
+ rb->BlueBits = 8 * sizeof(GLubyte);
+ rb->AlphaBits = 0;
pixelSize = 3 * sizeof(GLubyte);
break;
case GL_RGBA:
rb->PutMonoRow = put_mono_row_ubyte4;
rb->PutValues = put_values_ubyte4;
rb->PutMonoValues = put_mono_values_ubyte4;
- rb->ComponentSizes[0] = 8 * sizeof(GLubyte);
- rb->ComponentSizes[1] = 8 * sizeof(GLubyte);
- rb->ComponentSizes[2] = 8 * sizeof(GLubyte);
- rb->ComponentSizes[3] = 8 * sizeof(GLubyte);
+ rb->RedBits = 8 * sizeof(GLubyte);
+ rb->GreenBits = 8 * sizeof(GLubyte);
+ rb->BlueBits = 8 * sizeof(GLubyte);
+ rb->AlphaBits = 8 * sizeof(GLubyte);
pixelSize = 4 * sizeof(GLubyte);
break;
case GL_RGB10_A2:
rb->PutMonoRow = put_mono_row_ushort4;
rb->PutValues = put_values_ushort4;
rb->PutMonoValues = put_mono_values_ushort4;
- rb->ComponentSizes[0] = 8 * sizeof(GLushort);
- rb->ComponentSizes[1] = 8 * sizeof(GLushort);
- rb->ComponentSizes[2] = 8 * sizeof(GLushort);
- rb->ComponentSizes[3] = 8 * sizeof(GLushort);
+ rb->RedBits = 8 * sizeof(GLushort);
+ rb->GreenBits = 8 * sizeof(GLushort);
+ rb->BlueBits = 8 * sizeof(GLushort);
+ rb->AlphaBits = 8 * sizeof(GLushort);
pixelSize = 4 * sizeof(GLushort);
break;
#if 00
rb->PutMonoRow = put_mono_row_alpha8;
rb->PutValues = put_values_alpha8;
rb->PutMonoValues = put_mono_values_alpha8;
- rb->ComponentSizes[0] = 0; /*red*/
- rb->ComponentSizes[1] = 0; /*green*/
- rb->ComponentSizes[2] = 0; /*blue*/
- rb->ComponentSizes[3] = 8 * sizeof(GLubyte);
+ rb->RedBits = 0; /*red*/
+ rb->GreenBits = 0; /*green*/
+ rb->BlueBits = 0; /*blue*/
+ rb->AlphaBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
break;
#endif
rb->PutMonoRow = put_mono_row_ubyte;
rb->PutValues = put_values_ubyte;
rb->PutMonoValues = put_mono_values_ubyte;
- rb->ComponentSizes[0] = 8 * sizeof(GLubyte);
+ rb->StencilBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
break;
case GL_STENCIL_INDEX16_EXT:
rb->PutMonoRow = put_mono_row_ushort;
rb->PutValues = put_values_ushort;
rb->PutMonoValues = put_mono_values_ushort;
- rb->ComponentSizes[0] = 8 * sizeof(GLushort);
+ rb->StencilBits = 8 * sizeof(GLushort);
pixelSize = sizeof(GLushort);
break;
case GL_DEPTH_COMPONENT:
rb->PutMonoRow = put_mono_row_ushort;
rb->PutValues = put_values_ushort;
rb->PutMonoValues = put_mono_values_ushort;
- rb->ComponentSizes[0] = 8 * sizeof(GLushort);
+ rb->DepthBits = 8 * sizeof(GLushort);
pixelSize = sizeof(GLushort);
break;
case GL_DEPTH_COMPONENT24:
rb->PutMonoRow = put_mono_row_uint;
rb->PutValues = put_values_uint;
rb->PutMonoValues = put_mono_values_uint;
- rb->ComponentSizes[0] = 8 * sizeof(GLuint);
+ rb->DepthBits = 8 * sizeof(GLuint);
pixelSize = sizeof(GLuint);
break;
case GL_COLOR_INDEX8_EXT:
rb->PutMonoRow = put_mono_row_ubyte;
rb->PutValues = put_values_ubyte;
rb->PutMonoValues = put_mono_values_ubyte;
- rb->ComponentSizes[0] = 8 * sizeof(GLubyte);
+ rb->IndexBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
break;
case GL_COLOR_INDEX16_EXT:
rb->PutMonoRow = put_mono_row_ushort;
rb->PutValues = put_values_ushort;
rb->PutMonoValues = put_mono_values_ushort;
- rb->ComponentSizes[0] = 8 * sizeof(GLushort);
+ rb->IndexBits = 8 * sizeof(GLushort);
pixelSize = sizeof(GLushort);
break;
case COLOR_INDEX32:
rb->PutMonoRow = put_mono_row_uint;
rb->PutValues = put_values_uint;
rb->PutMonoValues = put_mono_values_uint;
- rb->ComponentSizes[0] = 8 * sizeof(GLuint);
+ rb->IndexBits = 8 * sizeof(GLuint);
pixelSize = sizeof(GLuint);
break;
default:
ASSERT(rb->PutMonoRow);
ASSERT(rb->PutValues);
ASSERT(rb->PutMonoValues);
- ASSERT(rb->ComponentSizes[0] > 0);
/* free old buffer storage */
if (rb->Data)
rb->InternalFormat = GL_NONE;
rb->_BaseFormat = GL_NONE;
rb->DataType = GL_NONE;
- rb->ComponentSizes[0] = 0;
- rb->ComponentSizes[1] = 0;
- rb->ComponentSizes[2] = 0;
- rb->ComponentSizes[3] = 0;
+ rb->RedBits = rb->GreenBits = rb->BlueBits = rb->AlphaBits = 0;
+ rb->IndexBits = 0;
+ rb->DepthBits = 0;
+ rb->StencilBits = 0;
rb->Data = NULL;
rb->GetPointer = nop_get_pointer;