Skip to content

Instantly share code, notes, and snippets.

@orlp
Created January 2, 2012 11:46
Show Gist options
  • Select an option

  • Save orlp/1550404 to your computer and use it in GitHub Desktop.

Select an option

Save orlp/1550404 to your computer and use it in GitHub Desktop.
if self.texture.target == GL_TEXTURE_RECTANGLE_ARB:
# 0, 0
texcoords[0] = 0
texcoords[1] = 0
# 0, tex_height
texcoords[2] = 0
texcoords[3] = self.texture.height
# tex_width, tex_height
texcoords[4] = self.texture.width
texcoords[5] = self.texture.height
# tex_width, 0
texcoords[6] = self.texture.width
texcoords[7] = 0
else:
# 0, 0
texcoords[0] = 0
texcoords[1] = 0
# 0, 1
texcoords[2] = 0
texcoords[3] = 1
# 1, 1
texcoords[4] = 1
texcoords[5] = 1
# 1, 0
texcoords[6] = 1
texcoords[7] = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment