Age | Commit message (Collapse) | Author |
|
We take advantage of overloading of the new operator (with an
additional parameter!) to make this look as "C++ like" as possible.
This closes 507 memory leaks when compiling glsl-orangebook-ch06-bump.frag
when measured with:
valgrind ./glsl glsl-orangebook-ch06-bump.frag
as seen here:
total heap usage: 55,623 allocs, 14,389 frees
(was 13,882 frees before)
|
|
This will be used to prevent a variable and a function with the same
name from being declared. As a side effect, the calls to
add_{type,name,function} should never fail.
|
|
This will allow types and their constructors to be easily stored in
the same symbol table. This does add a potential problem that a
shader could declare a variable and a function with the same name.
This appears to be forbidden by the GLSL spec.
|
|
This adds some type saftey and will enable elimination of a bunch of
type casts and other ugly crap in the code.
|