aspose file tools
The moose likes Game Development and the fly likes Java openg vs native opengl Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Game Development
Reply Bookmark "Java openg vs native opengl" Watch "Java openg vs native opengl" New topic
Author

Java openg vs native opengl

Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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

Joined: Jul 08, 2003
Posts: 24061
    
  13

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.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Java openg vs native opengl
 
Similar Threads
JavaFX vs OpenGL(JOGL)? Java SE vs Java EE vs JavaFX?
KDE vs. .... Gnome?
Eclipse vs NetBeans
Delphi vs. Java