GCanvas/node/binding/webgl/WebGLBuffer.h
2020-07-20 12:05:30 +08:00

23 lines
573 B
C++

#ifndef WEBGLBUFFER_H
#define WEBGLBUFFER_H
#include <napi.h>
#include <GL/gl.h>
namespace NodeBinding
{
class WebGLBuffer : public Napi::ObjectWrap<WebGLBuffer>
{
public:
WebGLBuffer(const Napi::CallbackInfo &info);
static void Init(Napi::Env env);
static Napi::Object NewInstance(Napi::Env env, const Napi::Value arg);
inline GLuint getId() const
{
return this->mId;
}
private:
GLuint mId = 0;
static Napi::FunctionReference constructor;
};
} // namespace NodeBinding
#endif