PDA

View Full Version : Bitmap texture



ifool
12-21-2004, 09:23 PM
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

gautam
12-22-2004, 07:49 AM
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>

ifool
12-23-2004, 06:27 PM
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).

hmwill
12-23-2004, 07:27 PM
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

ifool
12-26-2004, 06:26 PM
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);"
???

gautam
12-27-2004, 11:26 AM
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.

ifool
12-27-2004, 06:56 PM
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 ??

ifool
12-27-2004, 07:18 PM
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 ..."

gautam
12-28-2004, 03:12 AM
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.

ifool
12-29-2004, 06:35 PM
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 ?

ifool
01-03-2005, 06:33 PM
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

gautam
01-04-2005, 09:59 PM
[ January 05, 2005: Message edited by: gautam ]