GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


problem by scrodde
glPushMatrix();
     glTranslatef(0.0f,0.f,-0.1f);
     glEnable(GL_TEXTURE_2D);
      glBindTexture(GL_TEXTURE_2D,texture);
      
      glEnable(GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA,GL_ONE);
    
      glBegin(GL_QUADS);
      glTexCoord2f(0.0f,1.0f); glVertex2f(-0.4f,0.4f);
      glTexCoord2f(0.0f,0.0f); glVertex2f(-0.4f,-0.4f);
      glTexCoord2f(1.0f,0.0f); glVertex2f(0.4f,-0.4f);
      glTexCoord2f(1.0f,1.0f); glVertex2f(0.4f,0.4f);
      glEnd();
     
     glDisable(GL_BLEND);      
     glDisable(GL_TEXTURE_2D);
    glPopMatrix();

//creating te texture
glGenTextures(1,&textureArray[textureID]);
  glBindTexture(GL_TEXTURE_2D,textureArray[textureID]);
  
  glTexImage2D(GL_TEXTURE_2D,0,colorComp,m_Width,m_Height,0,format,GL_UNSIGNED_BYTE,m_ImageData); //tehd