Advertisement
Guest User

Untitled

a guest
Feb 26th, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // C++ Code
  2.   Handle<Value> gl_glGenTextures(const Arguments& args) {
  3.     HandleScope scope;
  4.     GLsizei _n = (GLsizei)args[0]->Int32Value();
  5.     GLuint _textures = -1;
  6.     glGenTextures(_n, &_textures);
  7.    
  8.     std::cout << "This: " << _textures << std::endl;
  9.    
  10.     return scope.Close(Number::New(_textures));
  11.     // changing has no effect
  12.     //return scope.Close(Integer::New(_textures));
  13.   }
  14.  
  15.  
  16. // Javascript code
  17.       console.log("What: " + gl.glGenTextures(1));
  18.  
  19.  
  20. // Output
  21. This: 1
  22. What: undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement