sonnik
04-13-2009, 08:11 AM
Hi
I am using gl.glTexSubImage2D to update my current texture.
This is what I am trying to do:
1. I have a blank texture which I am attaching to the sides of the cube.
2. I am updating the texture necessary to have Text written on it in real time. I need 3 different lines on the texture to be updated at 3 different times. So, I am trying to use gl.glTexSubImage2D to update the current Texture.
Can you please tell me if this approach is proper. Also I am getting this error:
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: unpack pixel_buffer_object must be enabled to call this method
when I call:
glut.glutBitmapString(GLUT.BITMAP_TIMES_ROMAN_10, "text is here!!!!!");
gl.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 12, 44, 16, 16,GL.GL_RGB, GL.GL_UNSIGNED_BYTE,0);
Please let me know the procedure to do such a thing as I am having a feeling that I am messing somewhere.
Thanks in advance.
I am using gl.glTexSubImage2D to update my current texture.
This is what I am trying to do:
1. I have a blank texture which I am attaching to the sides of the cube.
2. I am updating the texture necessary to have Text written on it in real time. I need 3 different lines on the texture to be updated at 3 different times. So, I am trying to use gl.glTexSubImage2D to update the current Texture.
Can you please tell me if this approach is proper. Also I am getting this error:
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: unpack pixel_buffer_object must be enabled to call this method
when I call:
glut.glutBitmapString(GLUT.BITMAP_TIMES_ROMAN_10, "text is here!!!!!");
gl.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 12, 44, 16, 16,GL.GL_RGB, GL.GL_UNSIGNED_BYTE,0);
Please let me know the procedure to do such a thing as I am having a feeling that I am messing somewhere.
Thanks in advance.