Permalink
Browse files

Hook up v8-typed-array to v8-gl.

  • Loading branch information...
1 parent 7cf4523 commit ef34aef627d902c8541dd40bdadf28b76fefbc0a @cscott committed Dec 4, 2011
Showing with 8 additions and 2 deletions.
  1. +2 −1 Makefile
  2. +5 −0 v8-gl.cpp
  3. +1 −1 v8-typed-array/typed-array.cc
View
@@ -10,7 +10,8 @@ BUILD_GLES_BINDINGS=1
BUILD_GLU_BINDINGS=1
BUILD_GLUT_BINDINGS=1
-SRCS = main.cpp imageloader.cpp utils.cpp v8-gl.cpp
+SRCS = main.cpp imageloader.cpp utils.cpp v8-gl.cpp \
+ v8-typed-array/typed-array.cc
ifdef BUILD_GL_BINDINGS
SRCS += glbindings/glbind.cpp
View
@@ -9,6 +9,9 @@
#include <string>
#include <string.h>
+extern "C" void
+v8_typed_array_init (Handle<Object> target);
+
Persistent<Context> V8GL::context;
//UTILITY FUNCTIONS
@@ -204,6 +207,8 @@ bool V8GL::initialize(int* pargc, char** argv, string scriptname) {
// Enter the new context so all the following operations take place
// within it.
Context::Scope context_scope(context);
+ // hook up typed array support
+ v8_typed_array_init(context->Global());
//Append *this* as Gl static variable so we can do dot-this-dot-that stuff
#ifdef BUILD_GL_BINDINGS
@@ -177,7 +177,7 @@ DEFINE_ARRAY_BUFFER_VIEW(Float32Array, kExternalFloatArray, sizeof(float));
// DEFINE_ARRAY_BUFFER_VIEW(PixelArray, kExternalPixelArray, sizeof(uint8_t));
extern "C" void
-init (Handle<Object> target) {
+v8_typed_array_init (Handle<Object> target) {
HandleScope scope;
{

0 comments on commit ef34aef

Please sign in to comment.