1 #ifndef LWPP_SHADER_HANDLER
2 #define LWPP_SHADER_HANDLER
21 Context =
static_cast<LWSurfaceID
>(context);
25 virtual unsigned int Flags() {
return 0;}
32 template <
class T,
int maxVersion,
int minVersion>
41 static int Activate (
int version, GlobalFunc *global, LWInstance inst,
void *serverData)
46 if ( version > maxVersion )
return AFUNC_BADVERSION;
47 if ( version < minVersion )
return AFUNC_BADVERSION;
49 LWShaderHandler *plugin =
static_cast<LWShaderHandler *
>(inst);
54 plugin->evaluate = ShaderAdaptor::Evaluate;
55 plugin->flags = ShaderAdaptor::Flags;
58 catch (std::exception &e)
69 T *plugin = (T *) instance;
72 catch (std::exception &e)
78 static unsigned int Flags (LWInstance instance)
82 T *plugin = (T *) instance;
83 return plugin->Flags();
85 catch (std::exception &e)
100 #endif // LWPP_SHADER_HANDLER