Skip to content
Browse files

Removing handleScopes for Glu(t) and Gl callbacks

  • Loading branch information...
1 parent 75d485b commit 37e03dc765da6747b56b313cb330703c93241bee @philogb committed
View
82 examples/gles/ch8-simple-vertexshader.js
@@ -1,83 +1,16 @@
//load common code.
-load("common.js");
+load("common.js", "shaderutil.js");
//start custom code.
var angle = 0;
-var vertex_shader = "uniform mat4 u_mvpMatrix;\n"
- + "attribute vec4 a_position;\n"
- + "void main()\n"
- + "{\n"
- + "gl_Position = u_mvpMatrix * a_position;\n"
- + "}\n";
-
-var fragment_shader = "void main()\n"
- + "{\n"
- + "gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
- + "}\n";
// an object we'll use to store shaders, textures, etc. on as we create them
var userData = {};
-function loadShader(shaderType, shaderSource) {
- // Create the shader object
- var shader = Gles.createShader(shaderType);
- if (shader == 0) return 0;
-
- // Load the shader source
- Gles.shaderSource(shader, shaderSource);
-
- // Compile the shader
- Gles.compileShader(shader);
-
- // Check the compile status
- var compiled = Gles.getShaderiv(shader, Gles.COMPILE_STATUS);
- if (!compiled) {
- // Something went wrong during compilation; get the error
- var error = Gles.getShaderInfoLog(shader);
- Gles.deleteShader(shader);
- return 0;
- }
-
- return shader;
-}
-
-// Convenience function to create a program from all the passed-in
-function getProgram() {
- var shaders = [];
-
- // first load and compile all the passed-in shaders.
- for (var i = 0; i < arguments.length; i+=2) {
- var type = arguments[i], source = arguments[i+1];
- var shader = loadShader(type, source);
- if (shader == 0)
- return 0;
- shaders.push(shader);
- }
-
- // then do the program object creation
- var program = Gles.createProgram();
- if (program == 0)
- return 0;
-
- // attach all the shaders
- for (var i = 0; i < shaders.length; i++) {
- Gles.attachShader(program, shaders[i]);
- }
-
- // link, and check for errors
- Gles.linkProgram(program);
-
- var linked = Gles.getProgramiv(program, Gles.LINK_STATUS);
- if (!linked) {
- var error = Gles.getProgramInfoLog(program);
- return 0;
- }
-
- return program;
-}
-
function init() {
- userData.programObject = getProgram(Gles.VERTEX_SHADER, vertex_shader, Gles.FRAGMENT_SHADER, fragment_shader);
+ userData.programObject = getProgram("shaders/ch8-simple-vertexshader.vs",
+ "shaders/ch8-simple-vertexshader.fs");
+
if(userData.programObject == 0) return false;
userData.positionLoc = Gles.getAttribLocation(userData.programObject, "a_position");
@@ -102,7 +35,7 @@ function updateObjects() {
modelview.translate(0, 0, -2);
// then rotating the cube
- modelview.rotate(angle, 1, 0, 1);
+ modelview.rotate(angle, 1, 1, 1);
userData.mvpMatrix = modelview.multiply(persp);
}
@@ -113,7 +46,7 @@ function update() {
angle += 2.0;
if (angle > 360) angle -= 360;
updateObjects();
- Glut.postRedisplay();
+ Glut.postRedisplay();
Glut.timerFunc(25, update, 0);
}
@@ -136,6 +69,7 @@ function draw() {
Gles.uniformMatrix4fv(userData.mvpLoc, userData.mvpMatrix.elements.length, Gles.FALSE, userData.mvpMatrix.elements);
// Draw the cube
+ //Gles.drawArrays(Gles.TRIANGLE_FAN, 0, userData.obj.vertices.length);
Gles.drawElements(Gles.TRIANGLES, userData.obj.indices.length, Gles.UNSIGNED_SHORT, userData.obj.indices);
// Finally do the swap to display what we just drew
@@ -151,7 +85,7 @@ function main() {
Glut.createWindow("OpenGL ES on V8! (^_^)/");
if (!init())
- return;
+ return;
updateObjects();
//Set drawing callback
View
240 examples/gles/common.js
@@ -1,243 +1,5 @@
-//adding matrix 4x4 library
-/*
- * Copyright (c) 2009, Mozilla Corp
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ''AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Based on sample code from the OpenGL(R) ES 2.0 Programming Guide, which carriers
- * the following header:
- *
- * Book: OpenGL(R) ES 2.0 Programming Guide
- * Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
- * ISBN-10: 0321502795
- * ISBN-13: 9780321502797
- * Publisher: Addison-Wesley Professional
- * URLs: http://safari.informit.com/9780321563835
- * http://www.opengles-book.com
- */
-
-//
-// A simple 4x4 Matrix utility class
-//
-
-function Matrix4x4() {
- this.elements = Array(16);
- this.loadIdentity();
-}
-
-Matrix4x4.prototype = {
- scale: function (sx, sy, sz) {
- this.elements[0*4+0] *= sx;
- this.elements[0*4+1] *= sx;
- this.elements[0*4+2] *= sx;
- this.elements[0*4+3] *= sx;
-
- this.elements[1*4+0] *= sy;
- this.elements[1*4+1] *= sy;
- this.elements[1*4+2] *= sy;
- this.elements[1*4+3] *= sy;
-
- this.elements[2*4+0] *= sz;
- this.elements[2*4+1] *= sz;
- this.elements[2*4+2] *= sz;
- this.elements[2*4+3] *= sz;
-
- return this;
- },
-
- translate: function (tx, ty, tz) {
- this.elements[3*4+0] += this.elements[0*4+0] * tx + this.elements[1*4+0] * ty + this.elements[2*4+0] * tz;
- this.elements[3*4+1] += this.elements[0*4+1] * tx + this.elements[1*4+1] * ty + this.elements[2*4+1] * tz;
- this.elements[3*4+2] += this.elements[0*4+2] * tx + this.elements[1*4+2] * ty + this.elements[2*4+2] * tz;
- this.elements[3*4+3] += this.elements[0*4+3] * tx + this.elements[1*4+3] * ty + this.elements[2*4+3] * tz;
-
- return this;
- },
-
- rotate: function (angle, x, y, z) {
- var mag = Math.sqrt(x*x + y*y + z*z);
- var sinAngle = Math.sin(angle * Math.PI / 180.0);
- var cosAngle = Math.cos(angle * Math.PI / 180.0);
-
- if (mag > 0) {
- var xx, yy, zz, xy, yz, zx, xs, ys, zs;
- var oneMinusCos;
- var rotMat;
-
- x /= mag;
- y /= mag;
- z /= mag;
-
- xx = x * x;
- yy = y * y;
- zz = z * z;
- xy = x * y;
- yz = y * z;
- zx = z * x;
- xs = x * sinAngle;
- ys = y * sinAngle;
- zs = z * sinAngle;
- oneMinusCos = 1.0 - cosAngle;
-
- rotMat = new Matrix4x4();
-
- rotMat.elements[0*4+0] = (oneMinusCos * xx) + cosAngle;
- rotMat.elements[0*4+1] = (oneMinusCos * xy) - zs;
- rotMat.elements[0*4+2] = (oneMinusCos * zx) + ys;
- rotMat.elements[0*4+3] = 0.0;
-
- rotMat.elements[1*4+0] = (oneMinusCos * xy) + zs;
- rotMat.elements[1*4+1] = (oneMinusCos * yy) + cosAngle;
- rotMat.elements[1*4+2] = (oneMinusCos * yz) - xs;
- rotMat.elements[1*4+3] = 0.0;
-
- rotMat.elements[2*4+0] = (oneMinusCos * zx) - ys;
- rotMat.elements[2*4+1] = (oneMinusCos * yz) + xs;
- rotMat.elements[2*4+2] = (oneMinusCos * zz) + cosAngle;
- rotMat.elements[2*4+3] = 0.0;
-
- rotMat.elements[3*4+0] = 0.0;
- rotMat.elements[3*4+1] = 0.0;
- rotMat.elements[3*4+2] = 0.0;
- rotMat.elements[3*4+3] = 1.0;
-
- rotMat = rotMat.multiply(this);
- this.elements = rotMat.elements;
- }
-
- return this;
- },
-
- frustum: function (left, right, bottom, top, nearZ, farZ) {
- var deltaX = right - left;
- var deltaY = top - bottom;
- var deltaZ = farZ - nearZ;
- var frust;
-
- if ( (nearZ <= 0.0) || (farZ <= 0.0) ||
- (deltaX <= 0.0) || (deltaY <= 0.0) || (deltaZ <= 0.0) )
- return this;
-
- frust = new Matrix4x4();
-
- frust.elements[0*4+0] = 2.0 * nearZ / deltaX;
- frust.elements[0*4+1] = frust.elements[0*4+2] = frust.elements[0*4+3] = 0.0;
-
- frust.elements[1*4+1] = 2.0 * nearZ / deltaY;
- frust.elements[1*4+0] = frust.elements[1*4+2] = frust.elements[1*4+3] = 0.0;
-
- frust.elements[2*4+0] = (right + left) / deltaX;
- frust.elements[2*4+1] = (top + bottom) / deltaY;
- frust.elements[2*4+2] = -(nearZ + farZ) / deltaZ;
- frust.elements[2*4+3] = -1.0;
-
- frust.elements[3*4+2] = -2.0 * nearZ * farZ / deltaZ;
- frust.elements[3*4+0] = frust.elements[3*4+1] = frust.elements[3*4+3] = 0.0;
-
- frust = frust.multiply(this);
- this.elements = frust.elements;
-
- return this;
- },
-
- perspective: function (fovy, aspect, nearZ, farZ) {
- var frustumH = Math.tan(fovy / 360.0 * Math.PI) * nearZ;
- var frustumW = frustumH * aspect;
-
- return this.frustum(-frustumW, frustumW, -frustumH, frustumH, nearZ, farZ);
- },
-
- ortho: function (left, right, bottom, top, nearZ, farZ) {
- var deltaX = right - left;
- var deltaY = top - bottom;
- var deltaZ = farZ - nearZ;
-
- var ortho = new Matrix4x4();
-
- if ( (deltaX == 0.0) || (deltaY == 0.0) || (deltaZ == 0.0) )
- return this;
-
- ortho.elements[0*4+0] = 2.0 / deltaX;
- ortho.elements[3*4+0] = -(right + left) / deltaX;
- ortho.elements[1*4+1] = 2.0 / deltaY;
- ortho.elements[3*4+1] = -(top + bottom) / deltaY;
- ortho.elements[2*4+2] = -2.0 / deltaZ;
- ortho.elements[3*4+2] = -(nearZ + farZ) / deltaZ;
-
- ortho = ortho.multiply(this);
- this.elements = ortho.elements;
-
- return this;
- },
-
- multiply: function (right) {
- var tmp = new Matrix4x4();
-
- for (var i = 0; i < 4; i++) {
- tmp.elements[i*4+0] =
- (this.elements[i*4+0] * right.elements[0*4+0]) +
- (this.elements[i*4+1] * right.elements[1*4+0]) +
- (this.elements[i*4+2] * right.elements[2*4+0]) +
- (this.elements[i*4+3] * right.elements[3*4+0]) ;
-
- tmp.elements[i*4+1] =
- (this.elements[i*4+0] * right.elements[0*4+1]) +
- (this.elements[i*4+1] * right.elements[1*4+1]) +
- (this.elements[i*4+2] * right.elements[2*4+1]) +
- (this.elements[i*4+3] * right.elements[3*4+1]) ;
-
- tmp.elements[i*4+2] =
- (this.elements[i*4+0] * right.elements[0*4+2]) +
- (this.elements[i*4+1] * right.elements[1*4+2]) +
- (this.elements[i*4+2] * right.elements[2*4+2]) +
- (this.elements[i*4+3] * right.elements[3*4+2]) ;
-
- tmp.elements[i*4+3] =
- (this.elements[i*4+0] * right.elements[0*4+3]) +
- (this.elements[i*4+1] * right.elements[1*4+3]) +
- (this.elements[i*4+2] * right.elements[2*4+3]) +
- (this.elements[i*4+3] * right.elements[3*4+3]) ;
- }
-
- this.elements = tmp.elements;
- return this;
- },
-
- loadIdentity: function () {
- for (var i = 0; i < 16; i++)
- this.elements[i] = 0;
- this.elements[0*4+0] = 1.0;
- this.elements[1*4+1] = 1.0;
- this.elements[2*4+2] = 1.0;
- this.elements[3*4+3] = 1.0;
- return this;
- }
-};
+load("lib/matrix.js");
-//adding a simple shape library
/*
* Copyright (c) 2009, Mozilla Corp
* All rights reserved.
View
41 examples/gles/metaballs/metaballs.js
@@ -9,7 +9,7 @@
Dependencies:
- core.js, v3d.js
+ core.js
Author:
@@ -50,7 +50,7 @@ var MetaBalls = new Class({
for(var i=0; i < count; i++) {
//add metaobject
b.push({
- 'pos': new V3D,
+ 'pos': { 'x':0, 'y':0, 'z':0 },
'a': 0,
'b': 0
});
@@ -151,3 +151,40 @@ var MetaGrid = new Class({
}
});
+
+function rgba(redval, greenval, blueval, alphaval) {
+ return ((alphaval << 24) | (redval << 16) | (greenval << 8) | blueval);
+}
+
+function gridColor(gp) {
+ var maxval = 2.0 * gp.value - 1.0;
+
+ if (maxval > 1.0)
+ maxval = 1.0;
+
+ var metacolor = rgba(196, 64 + ((192.0 * (1.0 - maxval)) >> 0), 0, 0);
+
+ if (gp.flags & Config.GP_TYPE_META) {
+ if (gp.flags & Config.GP_TYPE_BORDER)
+ return {
+ 'color': ((metacolor & 0xfefefefe) >> 1) + rgba(0, 64, 92, 0),
+ 'maxval': maxval
+ };
+ else
+ return {
+ 'color': metacolor,
+ 'maxval': maxval
+ };
+ } else {
+ if (gp.flags & Config.GP_TYPE_BORDER)
+ return {
+ 'color': rgba(0, 128, 196, 0),
+ 'maxval': maxval
+ };
+ else
+ return {
+ 'color': rgba(128, 228, 128, 0),
+ 'maxval': maxval
+ };
+ }
+}
View
3 examples/gles/shaders/ch8-simple-vertexshader.fs
@@ -0,0 +1,3 @@
+void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
View
6 examples/gles/shaders/ch8-simple-vertexshader.vs
@@ -0,0 +1,6 @@
+uniform mat4 u_mvpMatrix;
+attribute vec4 a_position;
+void main() {
+ gl_Position = u_mvpMatrix * a_position;
+ //gl_PointSize = 1
+}
View
1,048 glbindings/glbind.cpp
0 additions, 1,048 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 glbindings/glbind.py
@@ -94,8 +94,6 @@ def generate_function(obj):
Handle<<ret>> GL<name>Callback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < <len_params>) return v8::Undefined();
- //define handle scope
- HandleScope handle_scope;
//get arguments
<args>
//make call
View
16 glubindings/glubind.cpp
@@ -1247,8 +1247,6 @@ Handle<Value> GetGLU_TESS_MAX_COORD(Local<String> property,
Handle<Value> GLUCheckExtensionCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
Handle<Array> arrHandle0 = Handle<Array>::Cast(args[0]);
@@ -1280,8 +1278,6 @@ Handle<Value> GLUCheckExtensionCallback(const Arguments& args) {
Handle<Value> GLULookAtCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 9) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -1304,8 +1300,6 @@ Handle<Value> GLULookAtCallback(const Arguments& args) {
Handle<Value> GLUNewNurbsRendererCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1319,8 +1313,6 @@ Handle<Value> GLUNewNurbsRendererCallback(const Arguments& args) {
Handle<Value> GLUNewQuadricCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1334,8 +1326,6 @@ Handle<Value> GLUNewQuadricCallback(const Arguments& args) {
Handle<Value> GLUNewTessCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1349,8 +1339,6 @@ Handle<Value> GLUNewTessCallback(const Arguments& args) {
Handle<Value> GLUOrtho2DCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -1368,8 +1356,6 @@ Handle<Value> GLUOrtho2DCallback(const Arguments& args) {
Handle<Value> GLUPerspectiveCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -1387,8 +1373,6 @@ Handle<Value> GLUPerspectiveCallback(const Arguments& args) {
Handle<Value> GLUPickMatrixCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 5) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
View
2 glubindings/glubind.py
@@ -104,8 +104,6 @@ def make_function(prefix, name, params, return_val):
Handle<Value> GLU<name>Callback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < <len_params>) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
<args>
//make call
View
2 glutbindings/glutTimerFunc.template
@@ -25,8 +25,6 @@ void callbackTimerFunc(int value) {
Handle<Value> GLUTTimerFuncCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 3) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
unsigned int millisec = args[0]->Uint32Value();
int timerId = args[2]->IntegerValue();
View
184 glutbindings/glutbind.cpp
@@ -1331,8 +1331,6 @@ Handle<Value> GLUTInitCallback(const Arguments& args) {
Handle<Value> GLUTInitDisplayModeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
unsigned int arg0 = args[0]->Uint32Value();
@@ -1347,8 +1345,6 @@ Handle<Value> GLUTInitDisplayModeCallback(const Arguments& args) {
Handle<Value> GLUTInitDisplayStringCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -1364,8 +1360,6 @@ Handle<Value> GLUTInitDisplayStringCallback(const Arguments& args) {
Handle<Value> GLUTInitWindowPositionCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -1381,8 +1375,6 @@ Handle<Value> GLUTInitWindowPositionCallback(const Arguments& args) {
Handle<Value> GLUTInitWindowSizeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -1398,8 +1390,6 @@ Handle<Value> GLUTInitWindowSizeCallback(const Arguments& args) {
Handle<Value> GLUTMainLoopCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1413,8 +1403,6 @@ Handle<Value> GLUTMainLoopCallback(const Arguments& args) {
Handle<Value> GLUTCreateWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -1430,8 +1418,6 @@ Handle<Value> GLUTCreateWindowCallback(const Arguments& args) {
Handle<Value> GLUTCreateSubWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 5) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -1450,8 +1436,6 @@ Handle<Value> GLUTCreateSubWindowCallback(const Arguments& args) {
Handle<Value> GLUTDestroyWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1466,8 +1450,6 @@ Handle<Value> GLUTDestroyWindowCallback(const Arguments& args) {
Handle<Value> GLUTPostRedisplayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1481,8 +1463,6 @@ Handle<Value> GLUTPostRedisplayCallback(const Arguments& args) {
Handle<Value> GLUTPostWindowRedisplayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1497,8 +1477,6 @@ Handle<Value> GLUTPostWindowRedisplayCallback(const Arguments& args) {
Handle<Value> GLUTSwapBuffersCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1512,8 +1490,6 @@ Handle<Value> GLUTSwapBuffersCallback(const Arguments& args) {
Handle<Value> GLUTGetWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1527,8 +1503,6 @@ Handle<Value> GLUTGetWindowCallback(const Arguments& args) {
Handle<Value> GLUTSetWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1543,8 +1517,6 @@ Handle<Value> GLUTSetWindowCallback(const Arguments& args) {
Handle<Value> GLUTSetWindowTitleCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -1560,8 +1532,6 @@ Handle<Value> GLUTSetWindowTitleCallback(const Arguments& args) {
Handle<Value> GLUTSetIconTitleCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -1577,8 +1547,6 @@ Handle<Value> GLUTSetIconTitleCallback(const Arguments& args) {
Handle<Value> GLUTPositionWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -1594,8 +1562,6 @@ Handle<Value> GLUTPositionWindowCallback(const Arguments& args) {
Handle<Value> GLUTReshapeWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -1611,8 +1577,6 @@ Handle<Value> GLUTReshapeWindowCallback(const Arguments& args) {
Handle<Value> GLUTPopWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1626,8 +1590,6 @@ Handle<Value> GLUTPopWindowCallback(const Arguments& args) {
Handle<Value> GLUTPushWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1641,8 +1603,6 @@ Handle<Value> GLUTPushWindowCallback(const Arguments& args) {
Handle<Value> GLUTIconifyWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1656,8 +1616,6 @@ Handle<Value> GLUTIconifyWindowCallback(const Arguments& args) {
Handle<Value> GLUTShowWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1671,8 +1629,6 @@ Handle<Value> GLUTShowWindowCallback(const Arguments& args) {
Handle<Value> GLUTHideWindowCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1686,8 +1642,6 @@ Handle<Value> GLUTHideWindowCallback(const Arguments& args) {
Handle<Value> GLUTFullScreenCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1701,8 +1655,6 @@ Handle<Value> GLUTFullScreenCallback(const Arguments& args) {
Handle<Value> GLUTSetCursorCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1717,8 +1669,6 @@ Handle<Value> GLUTSetCursorCallback(const Arguments& args) {
Handle<Value> GLUTWarpPointerCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -1768,8 +1718,6 @@ Handle<Value> GLUTWMCloseFuncCallback(const Arguments& args) {
Handle<Value> GLUTCheckLoopCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1783,8 +1731,6 @@ Handle<Value> GLUTCheckLoopCallback(const Arguments& args) {
Handle<Value> GLUTEstablishOverlayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1798,8 +1744,6 @@ Handle<Value> GLUTEstablishOverlayCallback(const Arguments& args) {
Handle<Value> GLUTRemoveOverlayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1813,8 +1757,6 @@ Handle<Value> GLUTRemoveOverlayCallback(const Arguments& args) {
Handle<Value> GLUTUseLayerCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1829,8 +1771,6 @@ Handle<Value> GLUTUseLayerCallback(const Arguments& args) {
Handle<Value> GLUTPostOverlayRedisplayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1844,8 +1784,6 @@ Handle<Value> GLUTPostOverlayRedisplayCallback(const Arguments& args) {
Handle<Value> GLUTPostWindowOverlayRedisplayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1860,8 +1798,6 @@ Handle<Value> GLUTPostWindowOverlayRedisplayCallback(const Arguments& args) {
Handle<Value> GLUTShowOverlayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1875,8 +1811,6 @@ Handle<Value> GLUTShowOverlayCallback(const Arguments& args) {
Handle<Value> GLUTHideOverlayCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1890,8 +1824,6 @@ Handle<Value> GLUTHideOverlayCallback(const Arguments& args) {
Handle<Value> GLUTCreateMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
Handle<Function> value0 = Handle<Function>::Cast(args[0]);
void* arg0 = *value0;
@@ -1907,8 +1839,6 @@ Handle<Value> GLUTCreateMenuCallback(const Arguments& args) {
Handle<Value> GLUTDestroyMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1923,8 +1853,6 @@ Handle<Value> GLUTDestroyMenuCallback(const Arguments& args) {
Handle<Value> GLUTGetMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -1938,8 +1866,6 @@ Handle<Value> GLUTGetMenuCallback(const Arguments& args) {
Handle<Value> GLUTSetMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -1954,8 +1880,6 @@ Handle<Value> GLUTSetMenuCallback(const Arguments& args) {
Handle<Value> GLUTAddMenuEntryCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -1972,8 +1896,6 @@ Handle<Value> GLUTAddMenuEntryCallback(const Arguments& args) {
Handle<Value> GLUTAddSubMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -1990,8 +1912,6 @@ Handle<Value> GLUTAddSubMenuCallback(const Arguments& args) {
Handle<Value> GLUTChangeToMenuEntryCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 3) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
String::Utf8Value value1(args[1]);
@@ -2009,8 +1929,6 @@ Handle<Value> GLUTChangeToMenuEntryCallback(const Arguments& args) {
Handle<Value> GLUTChangeToSubMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 3) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
String::Utf8Value value1(args[1]);
@@ -2028,8 +1946,6 @@ Handle<Value> GLUTChangeToSubMenuCallback(const Arguments& args) {
Handle<Value> GLUTRemoveMenuItemCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -2044,8 +1960,6 @@ Handle<Value> GLUTRemoveMenuItemCallback(const Arguments& args) {
Handle<Value> GLUTAttachMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -2060,8 +1974,6 @@ Handle<Value> GLUTAttachMenuCallback(const Arguments& args) {
Handle<Value> GLUTDetachMenuCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -2412,8 +2324,6 @@ void callbackTimerFunc(int value) {
Handle<Value> GLUTTimerFuncCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 3) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
unsigned int millisec = args[0]->Uint32Value();
int timerId = args[2]->IntegerValue();
@@ -2945,8 +2855,6 @@ Handle<Value> GLUTSpecialUpFuncCallback(const Arguments& args) {
Handle<Value> GLUTJoystickFuncCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
Handle<Function> value0 = Handle<Function>::Cast(args[0]);
void* arg0 = *value0;
@@ -2963,10 +2871,8 @@ Handle<Value> GLUTJoystickFuncCallback(const Arguments& args) {
Handle<Value> GLUTSetColorCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
- int arg0 = args[0]->Int32Value();
+ int arg0 = args[0]->Int32Value();
double arg1 = args[1]->NumberValue();
double arg2 = args[2]->NumberValue();
double arg3 = args[3]->NumberValue();
@@ -2982,8 +2888,6 @@ Handle<Value> GLUTSetColorCallback(const Arguments& args) {
Handle<Value> GLUTGetColorCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -2999,8 +2903,6 @@ Handle<Value> GLUTGetColorCallback(const Arguments& args) {
Handle<Value> GLUTCopyColormapCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3015,8 +2917,6 @@ Handle<Value> GLUTCopyColormapCallback(const Arguments& args) {
Handle<Value> GLUTGetCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3031,8 +2931,6 @@ Handle<Value> GLUTGetCallback(const Arguments& args) {
Handle<Value> GLUTDeviceGetCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3047,8 +2945,6 @@ Handle<Value> GLUTDeviceGetCallback(const Arguments& args) {
Handle<Value> GLUTExtensionSupportedCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -3064,8 +2960,6 @@ Handle<Value> GLUTExtensionSupportedCallback(const Arguments& args) {
Handle<Value> GLUTGetModifiersCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3079,8 +2973,6 @@ Handle<Value> GLUTGetModifiersCallback(const Arguments& args) {
Handle<Value> GLUTLayerGetCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3095,8 +2987,6 @@ Handle<Value> GLUTLayerGetCallback(const Arguments& args) {
Handle<Value> GLUTBitmapCharacterCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* key0 = *value0;
@@ -3114,8 +3004,6 @@ Handle<Value> GLUTBitmapCharacterCallback(const Arguments& args) {
Handle<Value> GLUTBitmapWidthCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* key0 = *value0;
@@ -3133,8 +3021,6 @@ Handle<Value> GLUTBitmapWidthCallback(const Arguments& args) {
Handle<Value> GLUTStrokeCharacterCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* key0 = *value0;
@@ -3152,8 +3038,6 @@ Handle<Value> GLUTStrokeCharacterCallback(const Arguments& args) {
Handle<Value> GLUTStrokeWidthCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* key0 = *value0;
@@ -3171,8 +3055,6 @@ Handle<Value> GLUTStrokeWidthCallback(const Arguments& args) {
Handle<Value> GLUTBitmapLengthCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* key0 = *value0;
@@ -3191,8 +3073,6 @@ Handle<Value> GLUTBitmapLengthCallback(const Arguments& args) {
Handle<Value> GLUTStrokeLengthCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 2) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* key0 = *value0;
@@ -3211,8 +3091,6 @@ Handle<Value> GLUTStrokeLengthCallback(const Arguments& args) {
Handle<Value> GLUTWireSphereCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 3) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
int arg1 = args[1]->IntegerValue();
@@ -3229,8 +3107,6 @@ Handle<Value> GLUTWireSphereCallback(const Arguments& args) {
Handle<Value> GLUTSolidSphereCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 3) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
int arg1 = args[1]->IntegerValue();
@@ -3247,8 +3123,6 @@ Handle<Value> GLUTSolidSphereCallback(const Arguments& args) {
Handle<Value> GLUTWireConeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -3266,8 +3140,6 @@ Handle<Value> GLUTWireConeCallback(const Arguments& args) {
Handle<Value> GLUTSolidConeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -3285,8 +3157,6 @@ Handle<Value> GLUTSolidConeCallback(const Arguments& args) {
Handle<Value> GLUTWireCubeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
@@ -3301,8 +3171,6 @@ Handle<Value> GLUTWireCubeCallback(const Arguments& args) {
Handle<Value> GLUTSolidCubeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
@@ -3317,8 +3185,6 @@ Handle<Value> GLUTSolidCubeCallback(const Arguments& args) {
Handle<Value> GLUTWireTorusCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -3336,8 +3202,6 @@ Handle<Value> GLUTWireTorusCallback(const Arguments& args) {
Handle<Value> GLUTSolidTorusCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
double arg1 = args[1]->NumberValue();
@@ -3355,8 +3219,6 @@ Handle<Value> GLUTSolidTorusCallback(const Arguments& args) {
Handle<Value> GLUTWireDodecahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3370,8 +3232,6 @@ Handle<Value> GLUTWireDodecahedronCallback(const Arguments& args) {
Handle<Value> GLUTSolidDodecahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3385,8 +3245,6 @@ Handle<Value> GLUTSolidDodecahedronCallback(const Arguments& args) {
Handle<Value> GLUTWireTeapotCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
@@ -3401,8 +3259,6 @@ Handle<Value> GLUTWireTeapotCallback(const Arguments& args) {
Handle<Value> GLUTSolidTeapotCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
double arg0 = args[0]->NumberValue();
@@ -3417,8 +3273,6 @@ Handle<Value> GLUTSolidTeapotCallback(const Arguments& args) {
Handle<Value> GLUTWireOctahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3432,8 +3286,6 @@ Handle<Value> GLUTWireOctahedronCallback(const Arguments& args) {
Handle<Value> GLUTSolidOctahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3447,8 +3299,6 @@ Handle<Value> GLUTSolidOctahedronCallback(const Arguments& args) {
Handle<Value> GLUTWireTetrahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3462,8 +3312,6 @@ Handle<Value> GLUTWireTetrahedronCallback(const Arguments& args) {
Handle<Value> GLUTSolidTetrahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3477,8 +3325,6 @@ Handle<Value> GLUTSolidTetrahedronCallback(const Arguments& args) {
Handle<Value> GLUTWireIcosahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3492,8 +3338,6 @@ Handle<Value> GLUTWireIcosahedronCallback(const Arguments& args) {
Handle<Value> GLUTSolidIcosahedronCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3507,8 +3351,6 @@ Handle<Value> GLUTSolidIcosahedronCallback(const Arguments& args) {
Handle<Value> GLUTVideoResizeGetCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3523,8 +3365,6 @@ Handle<Value> GLUTVideoResizeGetCallback(const Arguments& args) {
Handle<Value> GLUTSetupVideoResizingCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3538,8 +3378,6 @@ Handle<Value> GLUTSetupVideoResizingCallback(const Arguments& args) {
Handle<Value> GLUTStopVideoResizingCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3553,8 +3391,6 @@ Handle<Value> GLUTStopVideoResizingCallback(const Arguments& args) {
Handle<Value> GLUTVideoResizeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -3572,8 +3408,6 @@ Handle<Value> GLUTVideoResizeCallback(const Arguments& args) {
Handle<Value> GLUTVideoPanCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 4) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
int arg1 = args[1]->IntegerValue();
@@ -3591,8 +3425,6 @@ Handle<Value> GLUTVideoPanCallback(const Arguments& args) {
Handle<Value> GLUTReportErrorsCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3662,8 +3494,6 @@ Handle<Value> GetGLUT_JOYSTICK_BUTTON_D(Local<String> property,
Handle<Value> GLUTIgnoreKeyRepeatCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3678,8 +3508,6 @@ Handle<Value> GLUTIgnoreKeyRepeatCallback(const Arguments& args) {
Handle<Value> GLUTSetKeyRepeatCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
@@ -3694,8 +3522,6 @@ Handle<Value> GLUTSetKeyRepeatCallback(const Arguments& args) {
Handle<Value> GLUTForceJoystickFuncCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3765,8 +3591,6 @@ Handle<Value> GetGLUT_GAME_MODE_DISPLAY_CHANGED(Local<String> property,
Handle<Value> GLUTGameModeStringCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
String::Utf8Value value0(args[0]);
char* arg0 = *value0;
@@ -3782,8 +3606,6 @@ Handle<Value> GLUTGameModeStringCallback(const Arguments& args) {
Handle<Value> GLUTEnterGameModeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3797,8 +3619,6 @@ Handle<Value> GLUTEnterGameModeCallback(const Arguments& args) {
Handle<Value> GLUTLeaveGameModeCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 0) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
//make call
@@ -3812,8 +3632,6 @@ Handle<Value> GLUTLeaveGameModeCallback(const Arguments& args) {
Handle<Value> GLUTGameModeGetCallback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < 1) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
int arg0 = args[0]->IntegerValue();
View
2 glutbindings/glutbind.py
@@ -126,8 +126,6 @@ def make_function(prefix, name, params_list, count, return_val):
Handle<Value> GLUT<name>Callback(const Arguments& args) {
//if less that nbr of formal parameters then do nothing
if (args.Length() < <len_params>) return v8::Undefined();
- //define handle scope
- HandleScope scope;
//get arguments
<args>
//make call

0 comments on commit 37e03dc

Please sign in to comment.
Something went wrong with that request. Please try again.