This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Game Development and the fly likes Java openg vs native opengl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Java openg vs native opengl" Watch "Java openg vs native opengl" New topic

Java openg vs native opengl

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

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?

GenRocket - Experts at Building Test Data
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

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:
subject: Java openg vs native opengl
It's not a secret anymore!