added some glGetRenderbufferParameterivEXT calls, printfs, and assertions
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 1 Jul 2005 01:34:29 +0000 (01:34 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 1 Jul 2005 01:34:29 +0000 (01:34 +0000)
progs/tests/fbotest1.c
progs/tests/fbotexture.c

index 1b710041786150d5b6c6cdca613b049449ead097..6cacaeb4b9da1ed2e786eaddbd626f6498937687 100644 (file)
@@ -145,6 +145,19 @@ Init( void )
 
    glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
 
+   {
+      GLint r, g, b, a;
+      glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
+                                      GL_RENDERBUFFER_RED_SIZE_EXT, &r);
+      glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
+                                      GL_RENDERBUFFER_GREEN_SIZE_EXT, &g);
+      glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
+                                      GL_RENDERBUFFER_BLUE_SIZE_EXT, &b);
+      glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
+                                      GL_RENDERBUFFER_ALPHA_SIZE_EXT, &a);
+      printf("renderbuffer RGBA sizes = %d %d %d %d\n", r, g, b, a);
+   }
+
    CheckError(__LINE__);
 
    /* restore to default */
index dc347423aaeac475dae2c4e471acb10822f40da2..1da323c6858894f2490d10ce32fba741dfd598cf 100644 (file)
@@ -223,6 +223,10 @@ Init(void)
    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB);
    glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
                             TexWidth, TexHeight);
+   glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
+                                   GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i);
+   printf("Depth renderbuffer size = %d bits\n", i);
+   assert(i > 0);
 
    /* make stencil renderbuffer */
    glGenRenderbuffersEXT(1, &StencilRB);
@@ -231,6 +235,10 @@ Init(void)
    glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB);
    glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
                             TexWidth, TexHeight);
+   glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
+                                   GL_RENDERBUFFER_STENCIL_SIZE_EXT, &i);
+   printf("Stencil renderbuffer size = %d bits\n", i);
+   assert(i > 0);
 
    /* attach DepthRB to MyFB */
    glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,