def test_uniform_array(self): shader = VertexShader("uniform float color[2];") uniforms = shader._get_uniforms() assert uniforms == [("color[0]", gl.GL_FLOAT), ("color[1]", gl.GL_FLOAT)]
def test_uniform_vec4(self): shader = VertexShader("uniform vec4 color;") uniforms = shader._get_uniforms() assert uniforms == [("color", gl.GL_FLOAT_VEC4)]
def test_uniform_float(self): shader = VertexShader("uniform float color;") uniforms = shader._get_uniforms() assert uniforms == [("color", gl.GL_FLOAT)]
def test_uniform_array(self): shader = VertexShader("uniform float color[2];") uniforms=shader._get_uniforms() assert uniforms == [ ("color[0]", gl.GL_FLOAT), ("color[1]", gl.GL_FLOAT) ]
def test_uniform_vec4(self): shader = VertexShader("uniform vec4 color;") uniforms = shader._get_uniforms() assert uniforms == [ ("color", gl.GL_FLOAT_VEC4) ]
def test_uniform_float(self): shader = VertexShader("uniform float color;") uniforms = shader._get_uniforms() assert uniforms == [ ("color", gl.GL_FLOAT) ]