Mercurial > touhou
changeset 383:0537af9125a7
Replace wildcard imports with normal ones.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 07 Sep 2012 13:05:19 +0200 |
parents | b9aecdc6f72f |
children | 690b5faaa0e6 |
files | pytouhou/ui/gamerenderer.pyx pytouhou/ui/renderer.pyx pytouhou/ui/shader.py |
diffstat | 3 files changed, 26 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/ui/gamerenderer.pyx +++ b/pytouhou/ui/gamerenderer.pyx @@ -15,7 +15,16 @@ from itertools import chain -from pyglet.gl import * +from pyglet.gl import (glClear, glMatrixMode, glLoadIdentity, glLoadMatrixf, + glDisable, glEnable, glFogi, glFogf, glFogfv, + glBlendFunc, glBindTexture, glVertexPointer, + glTexCoordPointer, glColorPointer, glDrawArrays, + GL_DEPTH_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW, + GL_FOG, GL_FOG_MODE, GL_LINEAR, GL_FOG_START, + GL_FOG_END, GL_FOG_COLOR, GL_DEPTH_TEST, GL_SRC_ALPHA, + GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_TEXTURE_2D, + GL_UNSIGNED_BYTE, GL_FLOAT, GL_QUADS, + GL_COLOR_BUFFER_BIT, GLfloat) from pytouhou.utils.matrix import Matrix
--- a/pytouhou/ui/renderer.pyx +++ b/pytouhou/ui/renderer.pyx @@ -20,7 +20,11 @@ import ctypes from struct import pack -from pyglet.gl import * +from pyglet.gl import (glVertexPointer, glTexCoordPointer, glColorPointer, + glBlendFunc, glBindTexture, glDrawElements, + GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_INT, GL_FLOAT, + GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, + GL_TEXTURE_2D, GL_TRIANGLES) from .sprite cimport get_sprite_rendering_data from .texture cimport TextureManager
--- a/pytouhou/ui/shader.py +++ b/pytouhou/ui/shader.py @@ -8,7 +8,17 @@ # Source: https://swiftcoder.wordpress.com/2008/12/19/simple-glsl-wrapper-for-pyglet/ # -from pyglet.gl import * +from pyglet.gl import (glCreateProgram, glCreateShader, GL_VERTEX_SHADER, + GL_FRAGMENT_SHADER, glShaderSource, glCompileShader, + glGetShaderiv, GL_COMPILE_STATUS, GL_INFO_LOG_LENGTH, + glGetShaderInfoLog, glAttachShader, glLinkProgram, + glGetProgramiv, GL_LINK_STATUS, glUseProgram, + glGetUniformLocation, glUniform1f, glUniform2f, + glUniform3f, glUniform4f, glUniform1i, glUniform2i, + glUniform3i, glUniform4i, glUniformMatrix4fv) + +from ctypes import (c_char, c_char_p, c_int, POINTER, byref, cast, + create_string_buffer) class GLSLException(Exception):