View difference between Paste ID: CHk2WJk2 and djnNzXpw
SHOW: | | - or go back to the newest paste.
1
// C++ Code
2
  Handle<Value> gl_glGenTextures(const Arguments& args) {
3
    HandleScope scope;
4
    GLsizei _n = (GLsizei)args[0]->Int32Value();
5-
    GLuint _textures = (GLuint)args[1]->Uint32Value();
5+
    GLuint _textures = -1;
6
    glGenTextures(_n, &_textures);
7
    
8
    std::cout << "This: " << _textures << std::endl;
9-
  }
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