Don't try to bind to proxy texture target. This is defined by the spec to be
authorIan Romanick <idr@us.ibm.com>
Mon, 6 Mar 2006 16:31:50 +0000 (16:31 +0000)
committerIan Romanick <idr@us.ibm.com>
Mon, 6 Mar 2006 16:31:50 +0000 (16:31 +0000)
an error.  Since we're working with a proxy target, don't bother using real
texture data.

Add a missing new-line in an error printf.

progs/tests/bug_3050.c

index 8696fcd78ba553aeb5079ac296703ddd6c4976bd..4ea7b80f231b50f60ca1ab9cb6cc69b85503a9c2 100644 (file)
@@ -71,7 +71,6 @@ static void Key( unsigned char key, int x, int y )
 
 static void Init( void )
 {
-   GLint temp[ 256 ];
    unsigned i;
    static const GLenum pnames[] = {
       GL_TEXTURE_RED_SIZE,
@@ -107,10 +106,9 @@ static void Init( void )
    }
        
 
-   (void) memset( temp, 0x00, sizeof( temp ) );
-   glBindTexture( GL_PROXY_TEXTURE_RECTANGLE_NV, 1 );
+   glBindTexture( GL_TEXTURE_RECTANGLE_NV, 1 );
    glTexImage2D( GL_PROXY_TEXTURE_RECTANGLE_NV, 0, GL_RGBA, 8, 8, 0,
-                GL_RGBA, GL_UNSIGNED_BYTE, temp );
+                GL_RGBA, GL_UNSIGNED_BYTE, NULL );
 
    for ( i = 0 ; pnames[i] != ~0 ; i++ ) {
       GLint param_i;
@@ -137,7 +135,7 @@ static void Init( void )
 
       if ( err ) {
         printf("glGetTexLevelParameterfv(GL_PROXY_TEXTURE_RECTANGLE_NV, 0, 0x%04x, & param) generated a GL\n"
-               "error of 0x%04x!",
+               "error of 0x%04x!\n",
                pnames[i], err );
         exit( 1 );
       }