Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (499)
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: joglutils: How to properly insert .3ds models? on: 2006-09-03 16:02:09
Model3DS was not really intended to be instantiated. If you do instantiate it, it will only load the 3DS model and not draw it. The intention was to keep the actual rendering separate from the loading. In the example, MyModel is used to demonstrate how to extend Model3DS for JOGL rendering. It is up to the programmer to add all the bells and whistles.

Loader3DS does the actual reading and loading of the 3DS file. Without it nothing works. But, you don't have to worry yourself with it because it is called/used in Model3DS which you should be extending.

Maybe I got something terribly wrong here, but with Model3DS and Loader3DS, the rendering is already separated from the loading. So why not insert the drawing into Model3DS?  Huh
Isnt that one of the most basic functions of such a class, to draw it onto the screen? Without that, all the remaining functionality is quite useless, isnt it?

Look at the MyModel class in the example and see how the JOGL code is rendering the model. You can easily add the color in there. It's only a simple example of how to use it. There is no way to anticipate what everyone wants/needs when they render thier model.

Thanks, I found it. But again, I wonder why it is not possible to anticipate what people want to do with their model. I would deem it quite mainstream to load all the info (materials, textures, attributes) into the model class and render it as it is described in the .3ds file (I have to admit, though, that I do not know which kind of information is stored in the .3ds file and which is missing). If someone really wants to change something about it, it seems quite natural to me to change the model (the .3ds file) instead of writing new import code. Still it would be possible to extend Model3DS and overwrite the methods if necessary.
I would really like to write everything by my own, but I am really quite a newbie to JOGL and 3D models. Otherwise I would not discuss but code instead.  Wink

BTW, is it in general possible to store animations in 3DS files? Otherwise I will have to look for other solutions anyway...

Thanks for the support, though!  Smiley
2  Java Game APIs & Engines / JOGL Development / joglutils: How to properly insert .3ds models? on: 2006-09-01 00:51:23
Hej again!

Concerning joglutils, I was now able to import one of my .3ds models into JOGL. But some issues are left:

1.  I had to use MyModel instead of Model3DS, which is only part of the test system, not the "official" class, right? But otherwise the render() method lacks, without which it is not possible to display the model? Also I could not find any use for Loader3DS...

2. All I actually see is the dark grey outline of my model, without any color or light or whatsoever. I guess this has to do with the Material, but the docs dont really say how to use it.

Apart from that: Good start, keep up the good work! Maybe some comments for the docs would be great, in the long term... ;-)

3  Java Game APIs & Engines / JOGL Development / missing the missing docs on: 2006-08-24 00:49:01
It was in the subversion repository, but it didn't occur to me to put it in the files&documents with the .jar build.  There should now be a .zip file with the documentation.  It isn't properly linking to the javadocs (as It didn't work by default in netbeans, and I haven't yet worked out how to make it link), but all the docs should be there...  Good luck!

I already searched through the repository and found only the same docs that I found now in the zip file. But it seems that all the docs for the 3DSLoader are located in a directory named "ThreeDS" which is missing.
Or am I missing something? Cheesy
4  Java Game APIs & Engines / JOGL Development / Javadocs already available? on: 2006-08-18 17:47:12
Hej hej!

I would like to test the 3DSLoader already and so downloaded the joglutils.jar. Unfortunately I could not find any documentation anywhere. Is it not uploaded or written yet, or was I just too dumb to find it?  Cheesy

Anyway, good luck with this project, I will be one of the first users!  Wink

5  Java Game APIs & Engines / JOGL Development / Re: JOGL (JSR-231) Model Loaders and Utility Demos on: 2006-08-16 14:54:11
Hej hej!

What is the good work doing, what is the current status?
Is there already a way to take advantage of one of the model loaders for JOGL?  Cheesy

A big fan waiting for something like this!
6  Java Game APIs & Engines / JOGL Development / Re: GLSL to come? on: 2006-08-15 18:48:41
I know somebody wrote a loader for JOGL.
So this means that one really has to write such a loader by himself?
OK then, how can I contact this person or access this loader?

Now if you want facility, choose Xith3D, Java3D or jME.
Thanks, but I would like to stick to pure JOGL. I already tried Java3D before which was way too complicated for my taste. Meaning I prefer no-scenegraph based extensions. Smiley
7  Java Game APIs & Engines / JOGL Development / Re: GLSL to come? on: 2006-08-15 17:33:10
Hint : I know no tool that can import .blend files. You have to export from blender to another format (.OBJ for static objects, e.g. or Cal3D/MD2/MD5 for animated objects).

I know about the exporting, I just don't know how to import them into JOGL... Sad
8  Java Game APIs & Engines / JOGL Development / Re: GLSL to come? on: 2006-08-14 19:34:08
1. IIRC, GLSL is already available though Jogl or LWJGL.
2. You don't need GLSL to load blender models.

1. What do you mean by "or"? I won't switch now to LWJGL!  Cool
2. So is there any description or example of how to do it? You won't believe how many hours I already spent searching for a way to import blender models into JOGL...  Sad
9  Java Game APIs & Engines / JOGL Development / GLSL to come? on: 2006-08-14 19:01:01
Hej community!

I just read that the newest OpenGL 2.1 includes a shading language called GLSL. Is that in any way subject to JOGL?

I have to admit that i don't fully understand what this would mean, but would this enable JOGL users to import Blender models into JOGL? I had the impression when I read about it. Anyway this is what I am looking for.  Cheesy

Cheers, Eric
10  Java Game APIs & Engines / JOGL Development / Re: Importer for Blender models? on: 2006-08-07 15:51:26
I would like to contribute, but unfortunately I am still a beginner in both JOGL and Blender.
But I would very appreciate such a tool, is there a chance in the near future for that?
Also if I saw correctly, there is no such suggestion yet in the joglutils project? Can you do this, eteq? I guess you are a little more into it than I am.  Wink
11  Java Game APIs & Engines / JOGL Development / Importer for Blender models? on: 2006-08-04 18:20:56
Hej JOGL community!

I know, a Blender importer was rejected to be part of the JOGL package as it should be somewhere external.
Still someone here probably knows where to turn to or what to do for importing Blender models?

Thanks a lot in advance,
12  Java Game APIs & Engines / JOGL Development / Re: How to keep a current GLContext? on: 2006-04-04 16:23:24
Thanks, great description in this other discussion!

Although I have the feeling that this is far more complicated than I suspected it to be, this solution seems to work quite well for me. Then again, I am far from being an expert...

Anyway, thanks a lot!

13  Java Game APIs & Engines / JOGL Development / still desperate on: 2006-04-03 14:51:19
Hi again!

Please, someone help me with this. I really couldn't find anything helpful anywhere, so please just some hint how to solve this!  Huh

14  Java Game APIs & Engines / JOGL Development / Re: How to keep a current GLContext? on: 2006-03-28 11:13:13
Hej there again!

I hope this thread did not get forgotten over the weekend?

Please just some short explanation or remarks!

Thanks, Eric
15  Java Game APIs & Engines / JOGL Development / Sorry, code marking does not work here on: 2006-03-24 16:46:21
I just saw that the code somehow cannot be marked red. Anyway, the three lines that I meant are surrounded by tags.

Too bad that this doesnt work, would be extremely helpful to mark code lines...

16  Java Game APIs & Engines / JOGL Development / How to keep a current GLContext? on: 2006-03-24 16:43:16
Greetings everyone!

I am working on an application which shall be able to use different GUIs.

My is structured like this (I removed everything that cant relate to my problem):

public class JOGLGUI implements GLEventListener {
   private Frame frame;
   private GL gl;
   private GLU glu;
   private float camPosX = 0, camPosY = 0, camPosZ = -5, camAngle = 29;
   private GraphicsDevice graphicsDevice;
   private Texture texture;
   [color=Red]private GLContext glcontext;[/color]

   public JOGLGUI() {
      frame = new Frame("JOGLGUI");
      graphicsDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
      if (graphicsDevice.isFullScreenSupported()) {
      } else {
         frame.setSize(800, 600);
      glu = new GLU();
      GLCanvas canvas = new GLCanvas();
      [color=Red]glcontext = canvas.getContext();[/color]
      final Animator animator = new Animator(canvas);
   public void drawItems() {

      gl.glNewList(1, GL.GL_COMPILE);
            gl.glTexCoord2i(0, 0); gl.glVertex2i(0, 0);
            gl.glTexCoord2i(1, 0); gl.glVertex2i(1, 0);
            gl.glTexCoord2i(1, 1); gl.glVertex2i(1, 1);
            gl.glTexCoord2i(0, 1); gl.glVertex2i(0, 1);

   public void init(GLAutoDrawable drawable) {
      gl = drawable.getGL();

      File texFile = new File("floor.bmp");
         texture = TextureIO.newTexture(texFile, true);
      } catch (IOException e) { System.out.println("Texture could not be loaded!"); }
   }   // init
   public void display(GLAutoDrawable drawable) {
      glu.gluLookAt(camPosX, camPosY, camPosZ, camPosX, camPosY, 0, 0, -1, 0);
   public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
      glu.gluPerspective(camAngle, (double)width/(double)height, 1.0, 20.0);
   public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}


Now my problem is:
The method drawItems is called from the main class and is supposed to add or change items to be displayed. Therefore it needs to use loaded textures or generally even load new textures given. But when calling texture.bind() I get the Exception:

Exception in thread "main" No OpenGL context current on this thread

How can I get around this? Also I dont really understand the GLContext concept, I guess.

I tried to save the GLContext as a class variable and make it current in drawItems() (red code), but then my program completely crashes and I have to abort it by CTRL-ALT-DEL. Also some other approaches failed, and I don't know how to solve this.

Any help greatly appreciated, and thanks in advance!  Cheesy

17  Java Game APIs & Engines / JOGL Development / Re: problem using GLContext on: 2006-03-16 21:11:38
I am really sorry if I get on anyone's nerves, but I still don't know where to find those demos. On I can't find them. Anywhere else?

18  Java Game APIs & Engines / JOGL Development / code example where? on: 2006-03-16 19:26:24
Maybe I am a little dumb right now, but a code example is exactly what I am looking now for quite some time. Where do I find one that deals with the GLContext?

Cheers, Eric
19  Java Game APIs & Engines / JOGL Development / installing the JSR231 where? on: 2006-03-15 20:13:39
Hi again!

I am not sure where exactly to install the files from the JSR231 so they are found. It works well if I put the jogl.jar into the <j2re-directory>\lib\ext and the files from the jogl-natives-win32.jar into the <j2re-directory>\bin, and have the classpath set to the jogl.jar.

However, the user's guide says:
Dropping the JOGL jar and native library into the extension directory of the JRE is strongly discouraged.
If you are developing a new application which uses JOGL, download both jogl.jar and the appropriate native library jar file (for example, jogl-natives-win32.jar). It is recommended to place both of these jar files in the same directory. Modify your CLASSPATH environment variable to include the full path to jogl.jar; for example, ".;C:\Some\Other\Package\foo.jar;C:\Users\myhome\jogl\jogl.jar". (If you did not previously set the CLASSPATH environment variable, you may want to make sure that ".", the current directory, is on your new CLASSPATH.) Use the jar command which ships with the JDK to extract the native library jar; e.g., "jar xvf jogl-natives-win32.jar". Modify your PATH environment variable (Windows), LD_LIBRARY_PATH environment variable (Solaris and Linux), or DYLD_LIBRARY_PATH environment variable (Mac OS X) to contain the directory holding the new .dll, .so or .jnilib files. At this point your Java installation should be able to see the JOGL class files. Users of IDEs such as NetBeans and Eclipse should consult the IDE's documentation to see how to add jar files and native libraries to their current project.

So I tried it this way and put all files into the same directory outside the J2RE-directory and set the CLASSPATH and PATH variables accordingly. Still my Eclipse tells me that it doesn't find the package anymore, so what is there more to know? Anything inside Eclipse? Any directory substructure inside the JOGL directory where the files are?

Help is as always greatly appreciated!  Smiley

20  Java Game APIs & Engines / JOGL Development / problem using GLContext on: 2006-03-15 13:47:21
Hello everyone!

I recently decided to make a little 3D Java game using jogl. So I downloaded the current release JSR231 (not the nightly built) and tried to get started with the help of some tutorials and demos.

I soon noticed that all code examples use a line like

GLCanvas canvas = GLDrawableFactory.getFactory().CreateGLCanvas (glcaps);

The method CreateGLCanvas does not exist anymore in the current release but is replaced by createExternalGLContext. So I read through everything I could find about it (mainly the API) and tried to make it work like this, even without examples. I have to admit I am a rookie in 3D programming...

So I created some starting code like:

final GLCapabilities glcaps = new GLCapabilities();
GLCanvas glcanvas = new GLCanvas(glcaps);
final GLContext glcontext = GLDrawableFactory.getFactory().createExternalGLContext();

But when I try to make it run using eclipse I get an error message like:

   Exception in thread "main" Error: attempted to make an external GLContext without a drawable/context current

I guess I have to make the glcanvas the current one first, but I really have no idea how, could not find anything in the jogl API.

Any help would be greatly appreciated, also any hint about whether I should really use this current release or maybe an earlier one?

Thanks a lot in advance,
Pages: [1]

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (44 views)
2014-04-15 18:08:23

BurntPizza (40 views)
2014-04-15 03:46:01

UprightPath (56 views)
2014-04-14 17:39:50

UprightPath (38 views)
2014-04-14 17:35:47

Porlus (54 views)
2014-04-14 15:48:38

tom_mai78101 (77 views)
2014-04-10 04:04:31

BurntPizza (136 views)
2014-04-08 23:06:04

tom_mai78101 (236 views)
2014-04-05 13:34:39

trollwarrior1 (197 views)
2014-04-04 12:06:45

CJLetsGame (205 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22: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!