daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest May 16th, 2018 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     //enable textures.
  2.     glEnable(GL_TEXTURE_2D);
  3.     glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_FASTEST);
  4.     glEnable(GL_BLEND);
  5.     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  6.    
  7.     // Bind the number of textures we need.
  8.     glGenTextures(1, &texture[textureNumber]);
  9.     glBindTexture(GL_TEXTURE_2D, texture[textureNumber]);
  10.     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
  11.     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR);
  12.     glTexParameterf(GL_TEXTURE_2D,GL_GENERATE_MIPMAP,GL_TRUE);    
  13.     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
  14.     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top