Commit Graph

17 Commits

Author SHA1 Message Date
Ian Romanick 0471e8b089 Make glsl_*_type glsl_type class static data 2010-03-26 14:33:41 -07:00
Ian Romanick 720c88eab9 Add functions to generate constructors for built-in types.
Currently only vector and matrix types are supported.  Structure types will be
added later.
2010-03-25 16:58:45 -07:00
Ian Romanick 1b4f04124a Fix matrix dimensioning
Newb GL mistake: matrices in GL are column-major.  This means that
vector_elements is the number of rows.  Making these changes causes
matrix-08.glsl to pass.
2010-03-25 13:19:13 -07:00
Ian Romanick 252127c379 Add queries to get the glsl_type of a row or column of a matrix 2010-03-25 11:42:45 -07:00
Ian Romanick 532edd9bc4 Remove unused _mesa_glsl_get_vector_type
This function has been completely replaced by glsl_type::get_instance.
2010-03-24 17:47:20 -07:00
Ian Romanick 3209c4e369 Add glsl_type::get_instance method
Gets the singleton corresponding to a particular scalar, vector, or
matrix type.
2010-03-24 17:11:30 -07:00
Ian Romanick 9ff8f3777e Add class-private handles to matrix types in glsl_type 2010-03-24 17:05:09 -07:00
Ian Romanick bb7e00a1cd Add glsl_type::get_base_type query
Retreives the glsl_type that corresponds to the base type of a numeric scalar /
vector / matrix type.  So vec4 returns float, etc.
2010-03-23 17:31:39 -07:00
Ian Romanick 7aeb6abda7 Add glsl_type::is_numeric and glsl_type::is_boolean queries 2010-03-23 17:31:03 -07:00
Ian Romanick cb7d066967 Add query to determine whether a type is a sampler 2010-03-23 15:03:46 -07:00
Ian Romanick 8400bc4d35 Add is_error and is_void type queries 2010-03-23 12:28:28 -07:00
Ian Romanick 986b8f7982 Tell emacs that C++ .h files are C++ 2010-03-10 13:58:12 -08:00
Ian Romanick fce1150156 Convert is_glsl_type_matrix to glsl_type::is_matrix 2010-03-09 15:58:52 -08:00
Ian Romanick a2dd22fb19 Convert is_glsl_type_vector to glsl_type::is_vector 2010-03-09 15:55:16 -08:00
Ian Romanick cb36f8aaee Convert is_glsl_type_scalar to glsl_type::is_scalar 2010-03-09 15:51:22 -08:00
Ian Romanick eccf0bf5f2 Make glsl_type a class
Among other benefits, this cleans up a the hackery invovled in
initializing the union field in builtin_types.h.
2010-03-09 15:49:31 -08:00
Ian Romanick a87ac255cf Initial commit. lol 2010-02-22 13:19:34 -08:00