Jogamp
Use NIO Direct buffers to pass data to glVertexAttribPointer in RawGL2ES2demo.java
authorXerxes Rånby <xerxes@zafena.se>
Thu, 20 Sep 2012 10:43:10 +0000 (12:43 +0200)
committerXerxes Rånby <xerxes@zafena.se>
Thu, 20 Sep 2012 10:43:10 +0000 (12:43 +0200)
commitc9553e82282d86e336ab21e6565f0c828cfb8351
tree7146d6e90b713ed3e59446f22519497dc8763736
parentccb06ad604c0dd33cb8dd361413aef671af42c15
Use NIO Direct buffers to pass data to glVertexAttribPointer in RawGL2ES2demo.java

https://github.com/sgothel/jogl/commit/3f5aac3536956e245d0e151e4915e7dd67a08b7e
Fixed two logical flaws regarding:
  - GL spec: Pointer functions required passed memory pointers to persist

  - JNI: Primitive arrays may change their native memory location (swap),
         even if they were not GC'ed.

The demo code is now updated to stay compatible with this change.

Signed-off-by Xerxes Rånby <xerxes@zafena.se>
src/demos/es2/RawGL2ES2demo.java
http://JogAmp.org git info: FAQ, tutorial and man pages.