1 #ifndef COMPILER_H 2 #define COMPILER_H 3 4 #include <node.h> 5 #include <nan.h> 6 #include <glsl_optimizer.h> 7 8 class Compiler : public node::ObjectWrap { 9 public: 10 static void Init(v8::Handle<v8::Object> exports); 11 getBinding()12 inline glslopt_ctx* getBinding() const { return _binding; } 13 14 void release(); 15 16 private: 17 Compiler(glslopt_target target); 18 ~Compiler(); 19 20 glslopt_ctx* _binding; 21 22 static NAN_METHOD(New); 23 static NAN_METHOD(Dispose); 24 static v8::Persistent<v8::Function> constructor; 25 }; 26 27 #endif 28