View Full Version : Texture mapping in Opengl ES ?
10-21-2004, 08:58 PM
I am trying to texture map a quad in opengl es . But it doesn't seem to texture map at all. Is there something that needs to be done differently than in regular opengl ?
This is the following code I have.
Is there anything I should be doing differently ?
10-21-2004, 09:43 PM
At least I don't see it in your listing.
10-21-2004, 11:28 PM
I am sorry, that was done in Init(). I'll post the complete code here. I just get a white quad. But I do image info into image_data. Also the image is 5=64x64 (24bits). Hence I am wondering what could be causing this. Also I am on linux so I am using opengl es 1.0.
10-22-2004, 01:43 PM
OK, the problem is with glTexImage2D this uploads the texture into the currently bound texture. Even though you have generated an ID with glGenTextures you are not binding that ID prior to uploading your texture data. So after the glGenTextures add :
This will make sure the texture data gets uploaded into the correct texture. Most likely your data is being uploaded into the default initial texture, and your specific texture remains empty.
Hope this helps,
10-23-2004, 02:24 AM
That worked. Now I have a decent texture.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.