00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef VRS_GL2_EXTSHADER_SHADERHANDLER_H
00019 #define VRS_GL2_EXTSHADER_SHADERHANDLER_H
00020
00021
00022
00023
00024 #include <vrs/opengl/gl2/us/prototypehandler.h>
00025
00026
00027 namespace VRS
00028 {
00029 namespace GL2
00030 {
00031 namespace EXTSHADER
00032 {
00033 typedef unsigned long HandlerID;
00034 VRS_SERIALIZABLE_ENUM (HandlerID);
00035
00036
00037 class VRS_US_API ShaderHandler : public PrototypeHandler
00038 {
00039 public:
00040
00041 enum HandlerType
00042 {
00043 UnknownHandler = 0,
00044 VertexHandler = 1,
00045 FragmentHandler = 2
00046
00047 };
00048 VRS_SERIALIZABLE_CLASS_ENUM (HandlerType);
00049
00050 ShaderHandler( const std::string& handlerName = "",
00051 HandlerType handlerType = UnknownHandler,
00052 const std::string& prototypeHandlerName = "",
00053 HandlerMode handlerMode = Ignore,
00054 unsigned int handlerPriority = 500);
00055
00056 void setHandlerType(HandlerType handlerType);
00057 inline HandlerType getHandlerType(void) const
00058 {
00059 return this->handlerType_;
00060 }
00061
00062
00063 void setHandlerPriority(unsigned int handlerPriority);
00064 inline unsigned int getHandlerPriority(void) const
00065 {
00066 return this->handlerPriority_;
00067 }
00068
00069
00070 void setHandlerName(const std::string& handlerName);
00071 inline const std::string& getHandlerName(void) const
00072 {
00073 return this->handlerName_;
00074 }
00075
00076 VRS_TYPEINFO(ShaderHandler, PrototypeHandler);
00077 VRS_SERIALIZABLE(ShaderHandler);
00078
00079 private:
00080
00081 std::string handlerName_;
00082 HandlerType handlerType_;
00083 unsigned int handlerPriority_;
00084
00085 };
00086
00087 };
00088
00089 };
00090
00091 };
00092
00093 #endif // VRS_GL2_EXTSHADER_SHADERHANDLER_H