Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Working example of JOGL?  RSS feed

 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • 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: 5505
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • 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: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't seem to find the source code anywhere for the gears example
 
Tim Moores
Saloon Keeper
Posts: 5505
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • 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: 209
  • Mark post as helpful
  • send pies
  • 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: 5505
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • 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: 209
  • Mark post as helpful
  • send pies
  • 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: 209
  • Mark post as helpful
  • send pies
  • 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
 
I am mighty! And this is a mighty small ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!