Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (671)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: gluLookAt not working on: 2004-09-29 10:48:57
As for seeing only a black screen, its?Vc?VV? rid of the box as its two far away. What is your code for the reshape method. You should have something like:

glu.gluPerspective(40.0f, (width/height), 1.0, 200.0);

where 200 is the culling distance. Your code worked OK for me :).

My reshape method had been empty (and I hadn't been reshaping the window).  I tried yours, and I tried reshaping - still black.

...Oh!  I found Angel's reshape method, here it is:

   public void reshape(GLDrawable drawable, int x, int y, int width, int height)    {
                 gl.glViewPort(0, 0, width, height);
                 gl.glOrtho(-4.0f, 4.0f, -4.0f, 4.0f, -4.0f, 4.0f);        

PROBLEM:  glViewPort doesn't seem to exist in jogl.  Or where is it?
2  Java Game APIs & Engines / JOGL Development / gluLookAt not working on: 2004-09-28 21:16:14
I'm learning OpenGL principles from Edward Angel's book, "OpenGL: A Primer", translating from C into Java/jogl as I go.  His first example for working with the camera looks like:

void display() {
 gluLookAt(1.0, 1.0, 1.0,        0.0, 0.0, 0.0,   0.0, 1.0, 0.0);

Here's my translation:

   public void display(GLDrawable drawable) {
                 glu.gluLookAt(1.0, 1.0, 1.0, //eye
                                  0.0, 0.0, 0.0,  //object
                                  0.0, 1.0, 0.0); //up

       glut.glutWireCube(gl, 0.5f);

In fact, I'm getting a black screen.  No image.  Although I can get images in other 3D examples, where I'm not using gluLookAt.  Where could I be going wrong?  BTW, is there a jogl equivalent for   glutSwapBuffers()?   It certainly doesn't seem to be in the GLUT interface.

My init code is below, in case that's the issue:

public void init(GLDrawable drawable) {
  = drawable.getGL();
           this.glDrawable = drawable;

           drawable.setGL( new DebugGL(drawable.getGL() ));
           glu = drawable.getGLU();

     float pos[] = { 20.0f, 5.0f, 10.0f, 0.0f };
     gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, pos);
     gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
     gl.glColor3d(1.0, 1.0, 1.0);
3  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2004-09-15 09:28:22
Please help a newbie out.  You said:

Java loads native libraries from the directories listed in the java.library.path environment variable. Best to just print this out and put the native library into one of these directories.

I tried:


I got:

Error   : Undefined variable, class, or package name: java line 15      System.out.println(java.library.path);

What was I really supposed to do?

running CodeWarrior Learning Edition 4, macosx 10.3.5
4  Java Game APIs & Engines / JOGL Development / Re: It still thinks CLASSPATH is set on: 2004-09-09 12:35:07
Thanks, Mithrandir, that did it!

Now it built - with a scary number of warning messages.  Am I to assume life is okay and go on?

Here's a sample:

   [antlr] warning: rule HeaderParser.typeQualifier has different signature than GnuCTreeParser.typeQualifier
   [antlr] warning: rule HeaderParser.typeSpecifier has different signature than GnuCTreeParser.typeSpecifier
   [antlr] warning: rule HeaderParser.typedefName has different signature than GnuCTreeParser.typedefName
   [antlr] warning: rule HeaderParser.structSpecifier has different signature than GnuCTreeParser.structSpecifier

[gluegen] WARNING: "APIENTRY" redefined from "" to ""
 [gluegen] WARNING: skipping emission of unnamed struct "struct __GLXcontextRec"
 [gluegen] WARNING: skipping emission of unnamed struct "struct __GLXFBConfigRec"
 [gluegen] WARNING: skipping emission of unnamed struct "struct _handle"
    [echo] Generating JAWT interface class
    [echo] java.home.dir=/System/Library/Frameworks/JavaVM.framework/Home
 [gluegen] WARNING: Complicated fields (field "JNIEnv *  env;" of type "JAWT_DrawingSurface") not implemented yet
 [gluegen] WARNING: Complicated fields (field "jobject target;" of type "JAWT_DrawingSurface") not implemented yet
 [gluegen] WARNING: No capacity specified for java.nio.Buffer return value for function "java.nio.ByteBuffer GetDrawingSurfaceInfo()"; assuming size of equivalent C return type (32 bytes): java.nio.ByteBuffer GetDrawingSurfaceInfo()
 [gluegen] WARNING: Complicated fields (field "JAWT_DrawingSurface *  ds;" of type "JAWT_DrawingSurfaceInfo") not implemented yet
 [gluegen] WARNING: Complicated fields (field "JAWT_Rectangle *  clip;" of type "JAWT_DrawingSurfaceInfo") not implemented yet
 [gluegen] WARNING: skipping emission of unnamed struct "struct _jobject"
5  Java Game APIs & Engines / JOGL Development / It still thinks CLASSPATH is set on: 2004-09-08 19:58:45
I'm a beginner, trying to get this thing up and running on MacOS X.

Followed this instruction:
     Unset your CLASSPATH environment variable:
The Ant build requires that the Jogl jars not be visible on the classpath. On Unix, type unsetenv CLASSPATH into a csh or tcsh shell, or set CLASSPATH=; export CLASSPATH into a Bourne shell. On Windows, type set CLASSPATH= into a command prompt.

Since I'm running bash, I did CLASSPATH=; export CLASSPATH
yes, very explicitly, very carefully.  Invoked the build from the very next line:

Leilani:~/Programs/java/jogl/make ken$ set CLASSPATH=; export CLASSPATH
Leilani:~/Programs/java/jogl/make ken$ ant macosx

But still I got the message:

/Users/ken/Programs/Java/jogl/make/build.xml:356: The following error occurred while executing this line:
/Users/ken/Programs/Java/jogl/make/validate-properties.xml:55: ******************************************************************
   ** Your CLASSPATH environment variable appears to be set (some  **
   ** JOGL classes are currently visible to the build.) This can   **
   ** cause the build to fail. Please unset your CLASSPATH         **
   ** variable and restart the build.                              **

1. How do I tame this thing?
2. Should I be downloading the built binary instead of building it?
3. If so, where should I put jogl.jar on a vanilla Panther installation?

Using:  apache-ant-1.6.2, antlr-2.7.4, MacOS 10.3.5
Pages: [1]
IanParcs (43 views)
2016-04-18 14:18:53

KaiHH (42 views)
2016-04-18 08:35:41

KaiHH (73 views)
2016-04-15 12:43:58

theagentd (74 views)
2016-04-14 02:16:17

theagentd (88 views)
2016-04-14 02:15:43

IanParcs (102 views)
2016-04-12 03:51:16

IanParcs (45 views)
2016-04-12 03:50:03

IanParcs (41 views)
2016-04-12 03:49:54

IanParcs (37 views)
2016-04-12 03:49:52

IanParcs (47 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!