Esempio n. 1
0
	def getShader(self):
		if self._shader is None:
			return None
		try:
			self._shader.getName()
			return self._shader
		except:
			self._shader = R.loadShaderProgram(self._shader)
			return self._shader
Esempio n. 2
0
		def __init__(self, page_size = 4096):
			super(TextMemoryManager, self).__init__()
			self._page_size = page_size

			indices = []

			j = 0
			for i in xrange(2*page_size): # in case a large page is requested
				indices.extend([j,j+1,j+3,j+1,j+2,j+3])
				j += 4

			indices = N.array(indices, dtype="u2")

			self._indices_vbo = IndexVbo(indices)
			self._shader = R.loadShaderProgram("text")