Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  gl4java guy needs JOGL tips ...  (Read 780 times)
0 Members and 2 Guests are viewing this topic.
Offline markyjerky

JGO n00b
*

Posts: 3


Java games rock!


« on: 2003-08-28 15:08:45 »

gl4java guy needs JOGL tips ...

Sorry for such a basic title.

I was using gl4java with netbeans and was able to to a bait and switch from a awt Canvas to a gl4java canvas just by inheritance. The window I had drawn now would re-paint itself using my  GLCanvas methods rather than the regular awt Canvas methods.

I can't seem to get starting doing similar with JOGL.

What is the proper way to use JOGL GLCanvas with Netbeans' screen painter ?  Do I need to install some bean so GLCanvas would such up as a component ?

I moved to JOGL because  gl4java didn't seem to honor my glReadPixels call  ... and aside from that .... a friend said JOGL would be a better move.

I know I'm asking a lot of questions. Someone please give me a beating. Thanks.


Offline albanc

JGO n00b
*

Posts: 40



« Reply #1 on: 2003-09-01 06:05:36 »

The JoGL canvas is final : you can't extend it. But since the source is open, you can copy the source of the GLCanvas class and put it into your application's package, then modify the methods you need for use with netbeans, and use this class from your application. The class will still be compatible with JoGL. The only problem is that you have to stay in sync with the changes the JoGL developement team makes to their the JoGL GLCanvas class so your implementation doesn't get outdated.

I have done this succesfully with OmCanvas for OpenMind which used to extend GLAnimCanvas from gl4java.

Good luck

Alban
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.086 seconds with 20 queries.