Login  Register

Bind VBO, glGetError 0x501

Posted by Vasilij on Jul 08, 2014; 1:44pm
URL: https://forum.jogamp.org/Bind-VBO-glGetError-0x501-tp4032531.html

Hello,

I have found some strange behavior by bind VBO.

First of all i use GL2ES2; jogl 2.1.5; my program runs at RasPi and Windows 7 64Bit with Intel Grafik Card.
Error is occur only on RAsPi.

My program create BufferedImage at first, then bind that as Texture:
                int[] texId = new int[1];
               
                gl.glPixelStorei( GL2ES2.GL_UNPACK_ALIGNMENT, 2 ); // PixelSpeicherModus
               
                gl.glGenTextures( 1, texId, 0 );
                textureId = texId[0];
               
               
                gl.glBindTexture(GL2ES2.GL_TEXTURE_2D, texId[0]);
               
                /* load the image data into a texture */
                gl.glTexImage2D(GL2ES2.GL_TEXTURE_2D, 0, GL2ES2.GL_RGBA, width, height, 0, GL2ES2.GL_RGBA, GL2ES2.GL_UNSIGNED_BYTE, pixelBuffer);
               
                /* texture filter*/
                gl.glTexParameteri(GL2ES2.GL_TEXTURE_2D, GL2ES2.GL_TEXTURE_MIN_FILTER, GL2ES2.GL_LINEAR);
               
                gl.glBindTexture(GL2ES2.GL_TEXTURE_2D, 0);
               
               

 then a bind the VBO:
                int[] tmp = new int[1];
                gl.glGenBuffers(1, tmp, 0);
                vboId = tmp[0];
               
               
                gl.glBindBuffer(GL2ES2.GL_ARRAY_BUFFER, vboId);
                {
                        gl.glBufferData(GL2ES2.GL_ARRAY_BUFFER, verticesData.length*4, vertices, GL2ES2.GL_STATIC_DRAW);
                }
                gl.glBindBuffer(GL2ES2.GL_ARRAY_BUFFER, 0);

The length of BufferedImage is always different, and if the dimension is 1936*80 Pixels, all is fine, nut if dimension is 2240*80 Pixels, i get an GLError 0x501.
I guess, that the length is important.

Please can somebody give me advice, why i get that error.