Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit ef34aef627d902c8541dd40bdadf28b76fefbc0a 1 parent 7cf4523
@cscott cscott authored
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
3  Makefile
@@ -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
5 v8-gl.cpp
@@ -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
View
2  v8-typed-array/typed-array.cc
@@ -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;
{
Please sign in to comment.
Something went wrong with that request. Please try again.