Example #1
0
 def __init__(self, id, image_link, emoji, upload_date):
     Image.__init__(self, id, image_link, upload_date)
     self.emoji = emoji
Example #2
0
 def __init__(self, width, height, x, y):
     Image.__init__(self, width, height, x, y)
Example #3
0
class Sprite(Image, Box, Visible):
	displayList = None
	def __init__(self, image):
		Box.__init__(self)
		Visible.__init__(self)
		if issubclass(image.__class__, Image):
			self.w = image.w
			self.h = image.h
			self.nativeW = image.nativeW
			self.nativeH = image.nativeH
			self._texture = image._texture
		elif issubclass(image.__class__, pygame.Surface):
		    self._texture = None
			Image.initFromSurface(self, image)
		else:
			Image.__init__(self, image)
		self.rotX = 0.0
		self.rotY = 0.0
		self.rotZ = 0.0
		self.opacity = 1.0
		if Sprite.displayList is None:
			self._genDisplayList()

	def _genDisplayList(self):
		Sprite.displayList = glGenLists(1)
		glNewList(Sprite.displayList, GL_COMPILE)

		glBegin(GL_QUADS)
		glTexCoord2d(0, 1)
		glVertex3f(-1, 1, 0)
		glTexCoord2d(1, 1)