LWJGL 2d Init With Blend


SUBMITTED BY: Guest

DATE: Aug. 19, 2013, 5:43 p.m.

FORMAT: Text only

SIZE: 320 Bytes

HITS: 763

  1. //Initialize OpenGL
  2. glDisable(GL_DEPTH_TEST);
  3. glMatrixMode(GL_PROJECTION);
  4. glLoadIdentity();
  5. glOrtho(0, 640, 480, 0, 1, -1);
  6. glMatrixMode(GL_MODELVIEW);
  7. glClearColor(0f,0f,0f,0f);
  8. glEnable(GL_TEXTURE_2D);
  9. glEnable(GL_BLEND);
  10. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

comments powered by Disqus