Java-Gaming.org
Java4K - to go         Javadoc:
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  
  .createGLCanvas(glcaps); not present  (Read 774 times)
0 Members and 1 Guest are viewing this topic.
Offline zainuluk

JGO n00b
*

Posts: 15


Java games rock!


« on: 2005-12-25 10:25:46 »

The code below is part of a demo I downloaded.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
public SimpleJoglApp() {
    //set the JFrame title
   super("Simple JOGL Application");

    //kill the process when the JFrame is closed
   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    //only three JOGL lines of code ... and here they are
   GLCapabilities glcaps = new GLCapabilities();
    GLCanvas glcanvas = GLDrawableFactory.getFactory()
            .createGLCanvas(glcaps);
    glcanvas.addGLEventListener(new SimpleGLEventListener());

    //add the GLCanvas just like we would any Component
   getContentPane().add(glcanvas, BorderLayout.CENTER);
    setSize(500, 300);

    //center the JFrame on the screen
   centerWindow(this);
  }



I am having a problem with the line the shown below:

1  
2  
GLCanvas glcanvas = GLDrawableFactory.getFactory()
            .createGLCanvas(glcaps);


The problem is that there is no method .createGLCanvas(). How do I get round this problem.
Thanks
Offline Ken Russell

JGO Kernel
*****

Posts: 3446
Medals: 3


Java games rock!


« Reply #1 on: 2005-12-25 18:21:29 »

The public APIs have changed. See the javadoc on the JOGL home page for the current API set. The jogl-demos project on java.net gives several examples of the new APIs.
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.096 seconds with 23 queries.