Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C++ Code
- Handle<Value> gl_glGenTextures(const Arguments& args) {
- HandleScope scope;
- GLsizei _n = (GLsizei)args[0]->Int32Value();
- GLuint _textures = -1;
- glGenTextures(_n, &_textures);
- std::cout << "This: " << _textures << std::endl;
- return scope.Close(Number::New(_textures));
- // changing has no effect
- //return scope.Close(Integer::New(_textures));
- }
- // Javascript code
- console.log("What: " + gl.glGenTextures(1));
- // Output
- This: 1
- What: undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement