• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Working example of JOGL?

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can somebody please point me to a working example of JOGL? Every one I try comes up with compile errors!

-Ted
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of errors? The standard examples (Gears etc.) work fine if you have the jar files in the classpath and the native files in the path.
 
Ted Gress
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't seem to find the source code anywhere for the gears example
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Almost everything related to JOGL is on jogamp.org: http://jogamp.org/jogl/www/. The "Demo Repository" link takes you to the source code - you need to drill down a bit, but the directory names are pretty much self-explanatory.

It's also on Github at https://github.com/sgothel/jogl-demos
 
Ted Gress
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. Question. I found t he files you are talking about buit I can't figure out what function does the drawing and where the vbos and vaos are?
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what you mean by vbos and vaos.

Are you asking about Gears.java? The drawing is effected in the overridden methods, chiefly display. If you haven't worked with OpenGL before, working through one of the tutorials might be a good idea so that you get an idea of the programming model, and which events of GLEventListener a program should react to.
 
Ted Gress
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vertex Array objects and vertexbufferobjects. I'm asking about Gears. Apparently it is an immediate mode application. https://stackoverflow.com/questions/6733934/what-does-immediate-mode-mean-in-opengl

Immediate mode is in essence deprecated. Everyone is supposed to be using Retained Mode: https://www.opengl.org/discussion_boards/showthread.php/147118-Explain-me-Immediate-mode-and-Retained-mode-In-OGL-and-D3D!

I've done plenty of research into OpenGL. Trust me. I just don't have knowledge of the syntax for Retained Mode in JOGL. I know that it is there (retained mode) one of the demos uses it. I just have only found that one and
it is difficult to work through - its very complicated.

So VAOs and VBOs are used to store vertex lists, indices lists, texture maps, and lighting information among other things, Then there is a loop that calls drawElements() that does the actual rendering. It is   quite different
from immediate mode.
 
Ted Gress
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am making a class that handles all the VBO For the vertex buffers To separate it from the model code
My question is Can I put the vertex buffer bindings in a loop So that when I load a new model file I can update the vertex buffers
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic