Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 18th, 2018 75 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1.     public void draw(Texture tx) {
  2.         glEnable(GL_TEXTURE_2D);
  3.         glBegin(GL_QUADS);
  4.             glColor3f(1f, 1f, 1f);
  5.             glTexCoord2f(0,0); // Top left
  6.             glVertex2i(xPos, 0);
  7.             glTexCoord2f(1,0); // Top right
  8.             glVertex2i(xPos + 112, 0);
  9.             glTexCoord2f(1,1); // Bottom right
  10.             glVertex2i(xPos + 112, tx.getImageHeight());
  11.             glTexCoord2f(0,1); // Bottom left
  12.             glVertex2i(xPos, tx.getImageHeight());
  13.         glEnd();
  14.         glDisable(GL_TEXTURE_2D);
  15.         System.out.println(tx.getImageWidth() + " / " + tx.getImageHeight());
  16.     }
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