Jump to content
  • Advertisement
Sign in to follow this  
mullet

OpenGL bitmaps

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, ive just joined your community, and have started going through the openGl tutorials. i havent spent more than a day or two on them but i would like to know am i able to ask simple questions here? if not please could you inform me of where i can ask such simple questions. thanks, if i can ask them here, could someone please help with the simplest of methods. i am up busy understanding tut 1 to tut 7. i havent gone further and perhaps the solution lies there but what i want to know is... how do i map more than one bitmap on to say a cube. there is the data structure GLuint texture[6]; // Storage For 3 Textures i understand function LoadBMP() and i can see how one bitmap is loaded i.e. binded with nearest Filtered Texture, linear or mipmapped. but for instance if i didnt want to load different filters, but just different bitmaps, how could i go about this? load different bitmaps on each side of a cube. i can see i would need to do summthing like this in DrawGLScene(): glBindTexture(GL_TEXTURE_2D, texture[index]); glBegin(GL_QUADS); // Front Face glNormal3f( 0.0f, 0.0f, 1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glEnd(); glBindTexture(GL_TEXTURE_2D, texture[index+1]); //backface glBegin(GL_QUADS); etc... glEnd(); the problem is i cant figure out how to initially store the different bitmaps into GLuint texture[6]; any help is greatly appreciated, thanks.

Share this post


Link to post
Share on other sites
Advertisement
well i seemed to figure it out myself. really simple,

AUX_RGBImageRec *TextureImage[2]; // adjust this as neccesarry and then repeat process for one bitmap.

so i guess the lesson is. try at least fifty times before you ask for help.

correct?

please let me know if i shouldnt ask such simple questions here.

thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!