Bitmap texture

Hello,
I’m a real Mega Newbie like my pseudo says. I just start to program in OpenGL ES and I don’t succeed to use bitmap texture.
I read some topics which deals about that and this one :“Texture mapping in Opengl ES ?” I found some precious help but I would know what is in the “bmp.h” because I think it could help me a lot. So if Gautam can help me … please …
Thanks for all

I am sure anyone can help you here. What exactly do you need help with ?

<BLOCKQUOTE><font size=“1” face=“Arial, Verdana, Helvetica, sans-serif”>quote:</font><HR>Originally posted by Mega Newbie:
Hello,
I’m a real Mega Newbie like my pseudo says. I just start to program in OpenGL ES and I don’t succeed to use bitmap texture.
I read some topics which deals about that and this one :“Texture mapping in Opengl ES ?” I found some precious help but I would know what is in the “bmp.h” because I think it could help me a lot. So if Gautam can help me … please …
Thanks for all
<HR></BLOCKQUOTE>

My problem is to load an object in OpenGL ES. Until now I have already loaded the vertex list and the texture list but I don’t find an easy way to load the bitmap which is my texture.
My vertex and texture lists are given in a file from MAYA (.obj) so I can easyly open and read this file but I don’t know how to open the image (.bmp).

You probably need something like this:


SHLoadImageFile is for PocketPCs and Smartphones. You will need to replace this by an eqivalent call if you are working on the desktop.

Hope that helps,
HM

I’ve found something on NeHe. Can we simply use “auxDIBImageLoad()” in OpenGL ES ?
like that :
“FILE *pFile = fopen (strFileName, “rb”);
if (!pFile)
return;
fclose (pFile);
AUX_RGBImageRec *pBitmap =
auxDIBImageLoad (strFileName);”
???

No, there is no glu and glaux library in opengl es. So you will have to write your own image loading function or use a provided one.

Thanks I’ve forgotten about glu and glaux.
I’ve taken your “NeHeports.tgz” to look at how you made with the lesson 6 but I’m working with VS.NET and when I use your “bmp.h” my program crash down and I don’t know why.
It says me :

“DAMAGE : After Normal block (#10353) at 0x05630068”
“DAMAGE : After Normal block (#10354) at 0x056770A8”
“GL_INVALID_VALUE–Numeric argument out of range”

And when I debug it opens “dbgheap.c”.

Have you an idea ??

I just found from where come the problem with the “DAMAGE …” it comes from the
“free” in the function “Destroy_Bitmap”.
But I still have my error of “GL_INVALID_VALUE …”

Well its not the best bmp loading code, I just wrote it quickly, but I will have a look at it and let you know.

I’ve just a question, you (Gautam) have made the MeHe tutorials in OpenGL ES but do you know if somebody works on the tutorials which are on the site of Gametutorials ?

I worked only on the code you (Gautam) made for the NeHe Lessons and it works really well so I think my problem comes from the type of the file I use a .obj.
Thanks for all


[ January 05, 2005: Message edited by: gautam ]

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.