Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //enable textures.
- glEnable(GL_TEXTURE_2D);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_FASTEST);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- // Bind the number of textures we need.
- glGenTextures(1, &texture[textureNumber]);
- glBindTexture(GL_TEXTURE_2D, texture[textureNumber]);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D,GL_GENERATE_MIPMAP,GL_TRUE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
Add Comment
Please, Sign In to add comment