Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java openg vs native opengl

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I know that opengl is native when using java or c/c++. But as far as performance is concerned can there be made a case that opengl using c/c++ code vs java is faster? Once the VM starts and the opengl calls are made, I would think that it shouldn't be different. However, since with java the opengl has to be blipped onto some renderable surface, then it *could* be a bit slower running in java?? Is this any different than how a C/C++ application must render the gl?

Anyone have any information on this?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calling the individual GL methods is always going to be slower because pushing data through the "JNI barrier" is slow. But if you call a bunch of methods to build a display list, and then call the display list multiple times, that extra time is amortized away very quickly.

AFAIK, in current Java/GL implementations there's no extra buffer copying or or anything like that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic