-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathobject.cpp
More file actions
32 lines (28 loc) · 963 Bytes
/
object.cpp
File metadata and controls
32 lines (28 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "object.hpp"
#include <v8.h>
namespace endor
{
namespace script_bindings
{
namespace webgl_bindings
{
using namespace std;
using namespace v8;
void WebGLObject::ConfigureFunctionTemplate(Isolate *isolate, Local<FunctionTemplate> tpl)
{
}
Local<Object> WebGLObject::NewInstance(Isolate *isolate, shared_ptr<client_graphics::WebGLObject> nativeObject)
{
EscapableHandleScope scope(isolate);
return nativeObject != nullptr
? scope.Escape(WebGLObjectBase::NewInstance(isolate, nativeObject).As<Object>())
: scope.Escape(Local<Object>());
}
WebGLObject::WebGLObject(Isolate *isolate, const FunctionCallbackInfo<Value> &args)
: WebGLObjectBase(isolate, args)
{
// WebGLObject is a base class, typically not instantiated directly
}
} // namespace webgl
} // namespace script_bindings
} // namespace endor