• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Java openg vs native opengl

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • 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?
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • 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.
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic