From Mike Weiblen,

"updates for GLSL core integration:
Code compiles and runs on win32.
Basic functionality of Program and Shader in place.
Program derived from StateAttribute.
Uniform value propagation is not yet functional (in development)
Includes some patches by Nathan Cournia.
includes example testcase to demo use of new classes."
This commit is contained in:
Robert Osfield
2005-03-24 09:37:45 +00:00
parent 2ab78cfe38
commit 7883574d28
9 changed files with 492 additions and 314 deletions

View File

@@ -11,7 +11,7 @@
*/
/* file: src/osg/Uniform.cpp
* author: Mike Weiblen 2005-02-20
* author: Mike Weiblen 2005-03-23
*/
// NOTICE: This code is CLOSED during construction and/or renovation!
@@ -368,6 +368,13 @@ Uniform::Uniform( const char* name, Value::Type type ) :
{}
Uniform::Uniform( const Uniform& gu, const CopyOp& copyop ) :
Object(gu,copyop),
_value( gu._value )
{
}
Uniform::Uniform( const char* name, float f ) :
_value( name, Value::FLOAT )
{
@@ -423,13 +430,6 @@ Uniform::Uniform( const char* name, int i ) :
//TODO Uniform::Uniform( const char* name, bool b0, bool b1, bool b2, bool b3 )
Uniform::Uniform( const Uniform& gu, const CopyOp& copyop ) :
Object(gu,copyop),
_value( gu._value )
{
}
bool Uniform::set( float f )
{
if( ! isCompatibleType( Value::FLOAT ) ) return false;
@@ -503,5 +503,4 @@ bool Uniform::isCompatibleType( Value::Type t ) const
return false;
}
/*EOF*/