Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JOGL Programs Doing ...nothing?  (Read 754 times)
0 Members and 1 Guest are viewing this topic.
Offline Haquejiel

Innocent Bystander




Java games rock!


« Posted 2004-08-16 21:03:40 »

Alright...I am utterly and completely new to jogl and to OpenGL - I'll just get that fact out of the way. I have a special disdain reserved for C/C++ after programming with both for the better half of a decade, so when I decided to get into 3D graphics, I decided Java was the way to go, and jogl looks like it's the absolute best thing to go with.
Now, I scanned through the forums when I first took interest in jogl to work out how to install it, and I went with this method:

I downloaded jogl-1.1.0-b04-dist.zip from the precompiled binaries and documents section of http://jogl.dev.java.net (jogl's site). I completely uninstalled and redid Java with the newest version (IOW, I did this 2 days ago, so there's a good chance it's the newest).
Currently it resides on my computer in:
C:\X\Java\something (something being jdk.1.4.1.02 or whatever it was)
C:\Program Files\Java\Something (only the JRE here)

I copied jogl.dll and jogl_cg.dll (I think those were the names) into z\bin\ (z being the roots listed above), as well as into C:\X\Windows\System32 (in case it merits curiousity, I place all system folders under the folder X).

Jogl.jar was placed into z\lib\ext\ in both cases.

As far as I know, this is a correct installation. I've tried running a program as follows (this program is one posted in the thread "Installation Problem (newcomer):

(I apologize for the format; I am not used to this message board)

import net.java.games.jogl.*;

public class HelloWorld {
 public static void main (String args[]) {
   try {
     System.loadLibrary("jogl");
     System.out.println("Hello World! (The native libraries are installed.)");
     GLCapabilities caps = new GLCapabilities();
     System.out.println("Hello JOGL! (The jar appears to be available.)");
   } catch (Exception e) {
     System.out.println(e);
   }
 }
}

Both statements were printed. I have no problems compiling, jaring, etc the file. It runs quite well.
The problem is when I run any system wherein I create a GLCanvas using this sort of line:
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas( glCaps );

I only do this inside a program with a frame and a jPanel to place it in.
I usually use something like jPanel.add(canvas, some-orientation-or-another) to add the canvas to the panel.

In theory, this should work. The only problem is when any program like this is run (I.e...actually doing anything with openGL), nothing will ever show up. No errors - not even if I cluster the entire thing in try/catch statements with generic Exceptions. I've tried using System.out.println("1"); in incremental values to figure out if the program is stopping somewhere. It's not stopping - it's just not showing up.
If I take out the jPanel.add and the declaration of canvas the frame shows up.
Furthermore, any .jar I run using jogl, or demo, or anything implementing it in any way, produces the same problem. It runs, but nothing shows up.

I've tried the other versions of Jogl starting from 1.1 up, including trying it with the Nightlybuild section (which I think is b04). No difference.

The only thing I can conclude is that I'm either doing something incredibly stupid or it's my machine. Specs are as follows:

2.4ghz (intel pentium 4), 412 ram (ddr, mayhaps?), SiS 650 video card (integrated chip - part of the motherboard). I'm not sure what other information is neccessary, but I might add this is a computer that can take a game such as Call of Duty that uses openGL at max settings and not lag whatsoever, so I don't think it's a video card problem.

Anyone have any idea what I'm doing wrong? =(
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (25 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (58 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!