diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-19 14:09:04 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-01 15:36:01 -0700 |
commit | aa5794384ffec53acd9c71882b650b3ddaff06f8 (patch) | |
tree | 7163c4419d324ef2dab2a13090f0fc90f2e65ad7 | |
parent | 5b9ac87941a11c72a220ba14c25cf0f8bc5acffa (diff) |
Add builtin gl_LightSource[].
Fixes gst-gl-bumper.vert parsing.
-rw-r--r-- | ir_variable.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ir_variable.cpp b/ir_variable.cpp index 2c2b57a711..af8ad2c318 100644 --- a/ir_variable.cpp +++ b/ir_variable.cpp @@ -114,7 +114,16 @@ generate_110_uniforms(exec_list *instructions, * FINISHME: (glFrontMaterial, glBackMaterial) */ - /* FINISHME: Add support for gl_LightSource[] */ + /* FINISHME: The size of this array is implementation dependent based on the + * FINISHME: value of GL_MAX_TEXTURE_LIGHTS. GL_MAX_TEXTURE_LIGHTS must be + * FINISHME: at least 8, so hard-code 8 for now. + */ + const glsl_type *const light_source_array_type = + glsl_type::get_array_instance(symtab->get_type("gl_LightSourceParameters"), 8); + + add_variable("gl_LightSource", ir_var_uniform, light_source_array_type, + instructions, symtab); + /* FINISHME: Add support for gl_LightModel */ /* FINISHME: Add support for gl_FrontLightProduct[], gl_BackLightProduct[] */ /* FINISHME: Add support for gl_TextureEnvColor[] */ |