namespace esl {
class shader {
public:
virtual int query() = 0;
virtual void deletethis() = 0;
};
class surface : public shader {
public:
virtual int query()
{
return default_surface_query;
}
};
template < typename T > class ptr {
public:
};
void ei_declare_shader( ei_shader_type shader_type,
const ei_string shader_name,
)
{
va_list args;
int para;
static_parameter_container spcon;
dynamic_parameter_container dpcon;
parameter_container *cpcon = NULL;
ei_string str;
float fval;
va_start( args, shader_name );
while(1)
{
para = va_arg( args, int );
if( para == ei_end )
break;
switch( para )
{
case ei_static:
cpcon = &spcon;
break;
case ei_dynamic:
cpcon = &dpcon;
break;
case ei_float:
str = va_arg( args, ei_string );
fval = va_arg( args, float );
cpcon->add_float( str, fval );
break;
case ei_int:
break;
case ei_bool:
break;
case ei_color:
break;
case ei_point:
break;
case ei_vector:
break;
case ei_normal:
break;
case ei_matrix:
break;
}
}
va_end( args );
}
void ei_shader( const ei_string named_shader,
const ei_string shader_name,
)
{
va_list args;
ei_string str;
int type;
int pos;
ptr<float> fval;
shader_instance *inst;
va_start( args, shader_name );
while(1)
{
str = va_arg( args, ei_string );
if( str == ei_end )
break;
inst->lookup( str, type, pos );
switch( type )
{
case ei_float:
fval = va_arg( args, ptr<float> );
inst->set_float( pos, fval );
break;
case ei_int:
break;
case ei_bool:
break;
case ei_color:
break;
case ei_point:
break;
case ei_vector:
break;
case ei_normal:
break;
case ei_matrix:
break;
}
}
va_end( args );
}
};