   loading bmp as textures
  anyone know any good tutorials on this???thanks,kelvin   
  well, theres a tutorial showin how to load a 24bit (trucolor) bitmap for OpenGL without any gl utility libraries:herenote: slight bug in their code:l_texture[j+1] = rgb.rgbtRed; // Green componentshould read (for obvious reasons):l_texture[j+1] = rgb.rgbtGreen; // Green component-and heres a little info on the bmp format in general (incase 24-bit is just too specific for you).   ;Quote:Original post by kelvindavies11anyone know any good tutorials on this???thanks,kelvinGoogle knows of about 110,000.PS: I make no claim as to the quality of those tutorials or of tutorials in general.   ;  Seriously, 10 seconds in google would solve this for you.nehe has several tutorials on this too.   ;  >>well, theres a tutorial showin how to load a 24bit (trucolor) bitmap for >>OpenGL without any gl utility libraries:>>http://www.spacesimulator.net/tut3_texturemapping.htmlWarning! My system catch spys inside the glut.dll within the downloadble source. Named "Employee Monitering" and others. Is that harmful?Daniel;Quote:Original post by dan59314>>well, theres a tutorial showin how to load a 24bit (trucolor) bitmap for >>OpenGL without any gl utility libraries:>>http://www.spacesimulator.net/tut3_texturemapping.htmlWarning! My system catch spys inside the glut.dll within the downloadble source. Named "Employee Monitering" and others. Is that harmful?DanielA) Verify that it's indeed something in the .zip file or whatever you downloaded from the site, not something you got else where, then... B) Always assume it's bad.C) You likely want to send dmatter a PM about it so he doesn't hand out the link anymore.D) Notify the site.   ;  I have recently written my own BMP reader/writer. This class has 2 copies of pixmap data; one for default BGR and one for RGB order. By using getDataRGB(), you can easily pass the pixmap to OpenGL without using GL_BGR_EXT. Also, BMP image is flipped vertically when it is loaded.Here is the source and testing program:imageBmp.zipNote that this example does not apply a BMP as a texture, but it displays an image by using glDrawPixels().;  Hello! I have a problem... I'm trying to make a chess and after i'm drawing the table i'm trying to draw the pawns, rooks, etc... But after drawing the first pawn the table disspears... Any idea? Here is the code:int DrawGLScene(GLvoid)// Here's Where We Do All The Drawing{glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);// Clear The Screen And The Depth BufferglLoadIdentity();// Reset The Current Modelview Matrix glTranslatef(0.0f,0.0f,-3.0f);glColor3f(0.65f,0.5f,0.4f); glBegin(GL_QUADS);// Start Drawing QuadsglVertex3f(-1.06f, 1.06f, 0.0f);// Left And Up 1 Unit (Top Left)glVertex3f( 1.06f, 1.06f, 0.0f);// Right And Up 1 Unit (Top Right)glVertex3f( 1.06f,-1.06f, 0.0f);// Right And Down One Unit (Bottom Right)glVertex3f(-1.06f,-1.06f, 0.0f);// Left And Down One Unit (Bottom Left)glEnd();// Done Drawing A Quad GLfloat x=1.0f; glTranslatef(-0.875f,0.875f,0.0f);glColor3f(1.0f,1.0f,1.0f);for(int i=0;i<8;i++){for(int j=0;j<8;j++){glBegin(GL_QUADS);glVertex3f(-0.125f, 0.1251f, 0.0f);glVertex3f( 0.125f, 0.125f, 0.0f);glVertex3f( 0.125f,-0.125f, 0.0f);glVertex3f(-0.125f,-0.125f, 0.0f);glEnd();x=1.0f-x;glColor3f(x,x,x);glTranslatef(0.25f,0.0f,0.0f);}x=1.0f-x;glColor3f(x,x,x);glTranslatef(-2.0f,-0.25f,0.0f);} // DRAWING TEXTURESglEnable(GL_BLEND);// Enable BlendingglDisable(GL_DEPTH_TEST);// Disable Depth TestingglBlendFunc(GL_DST_COLOR,GL_ZERO);// Blend Screen Color With Zero (Black)glTranslatef(0.0f,0.25f,0.0f);glBindTexture(GL_TEXTURE_2D, texture[12]);glBegin(GL_QUADS);glTexCoord2f(0.0f, 0.0f); glVertex3f(-0.125f, -0.1251f, 0.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 0.125f, -0.125f, 0.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 0.125f,0.125f, 0.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f(-0.125f,0.125f, 0.0f);glEnd();glBlendFunc(GL_ONE, GL_ONE);// Copy Image Color To The ScreenglBindTexture(GL_TEXTURE_2D, texture[0]);// Select The Image Texture glBegin(GL_QUADS);glTexCoord2f(0.0f, 0.0f); glVertex3f(-0.125f, -0.1251f, 0.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 0.125f, -0.125f, 0.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 0.125f,0.125f, 0.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f(-0.125f,0.125f, 0.0f);glEnd(); glEnable(GL_DEPTH_TEST);// Enable Depth TestingglDisable(GL_BLEND);// Disable Blendingreturn TRUE;}Any idea??   