Пример #1
0
	def glGenTextures(n, textures=None):
		id_buf = Buffer(GL_INT, n)
		_glGenTextures(n, id_buf)

		if textures:
			textures.extend(id_buf.to_list())

		return id_buf.to_list()[0] if n == 1 else id_buf.to_list()
Пример #2
0
	def glGetIntegerv(pname):
		# Only used for GL_VIEWPORT right now, so assume we want a size 4 Buffer
		buf = Buffer(GL_INT, 4)
		_glGetIntegerv(pname, buf)
		return buf.to_list()