Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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] 2 3
1  Java Game APIs & Engines / JOGL Development / Re: New Intel drivers on: 2007-12-05 14:44:58
I still have a few issues, as indicated in this thread: http://www.java-gaming.org/forums/index.php?topic=17833.0
2  Java Game APIs & Engines / JOGL Development / Re: WebStart and Method "glBindBuffer" not available on: 2007-12-04 21:27:31
I wrote a small program to query the available functions via the JOGL API and I get:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
  Functions:

  OpenGL 1.5
     glBeginQuery: true
     glBindBuffer: true
     glBufferData: true
     glBufferSubData: true
     glDeleteBuffers: true
     glDeleteQueries: true
     glEndQuery: true
     glGenBuffers: true
     glGenQueries: true
     glGetBufferParameteriv: true
     glGetBufferPointerv: true
     glGetBufferSubData: true
     glGetQueryObjectiv: true
     glGetQueryObjectuiv: true
     glGetQueryiv: true
     glIsBuffer: true
     glIsQuery: true
     glMapBuffer: true
     glUnmapBuffer: true

  Extensions:

  OpenGL 1.5
      GL_ARB_vertex_buffer_object: true


This is odd, since it differs from the 'glview' tool's results, suggesting that the driver does support the 1.5 functions, but when TextRenderer calls glBindBuffer() I get the aforementioned exception. Not too sure what to make of this. This is problematic, since this means I can't check for the presence of the function and assume that it is really there when it is confirmed as being supported.

I should note that my test tool indicates no 2.0 support, so it looks like it working correctly (Intel indicates the driver support up to OpenGL 1.5). As for the extension I only checked for 'GL_ARB_vertex_buffer_object'.
3  Java Game APIs & Engines / JOGL Development / Re: WebStart and Method "glBindBuffer" not available on: 2007-12-03 22:37:31
What's odd is that the vertex buffer object extension is a fairly major extension that is used quite a bit. It's not the sort of thing Intel would want to screw up. And it looks like there are even newer drivers yet, hopefully this link works...

http://downloadcenter.intel.com/filter_results.aspx?strTypes=all&ProductID=2576&OSFullName=Windows*+XP+Professional&lang=eng&strOSs=44&submit=Go%21

This is the same driver that I installed, despite the version number indicated here. I'll contact Intel to see if they can provide any information.
4  Java Game APIs & Engines / JOGL Development / OpenGL versions and corresponding functions / extensions? on: 2007-12-03 21:09:46
I would like to know what standard functions and extensions correspond to which OpenGL version. Does anyone know where I could find a this information?
5  Java Game APIs & Engines / JOGL Development / Re: WebStart and Method "glBindBuffer" not available on: 2007-12-03 18:52:22
Thanks, though I do have one question:

While I will add extra checks, should this really be TextRenderer taking care of not calling extenstions & features not supported by the current OpenGL implementation?

Edit: I have now ensured that the OpenGL support is indeed 1.5, and that GL_ARB_vertex_buffer_object is present, on the PC after updating the drivers, and verified with:

http://www.realtech-vr.com/glview/

I am still getting the same exception.

The output from the tool is: http://ajmas.dyndns.org/misc/glview-Intel965.xml

Edit: I misread the results, while GL_ARB_vertex_buffer_object is present, glBindBuffer is not supported and nor are any of the OpenGL 1.5 specific functions. I am not sure how Intel can claim their driver to 1.5 compliant? In this case looks like I need to add gl.isFunctionAvailable("");
6  Java Game APIs & Engines / JOGL Development / Re: WebStart and Method "glBindBuffer" not available on: 2007-12-03 16:20:22
Do you check for either OpenGL 1.5 or greater, or GL_ARB_vertex_buffer_object support before attempting to use it?

I do neither. How would I do that?
7  Java Game APIs & Engines / JOGL Development / Re: Limiting FPS on: 2007-12-03 15:56:24
The examples I have seen suggested adding a sleep help reduce the frame rate. Something like the following, if you are using a GLCanvas with a main loop:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public void run() {
  while ( this.run ) {
    repaint(0);
    try {
       // you can add some logic to adjust the sleep, to compensate for the machine capability
       Thread.sleep(30);
    } catch ( InteruptedException ex ) {
    }
  }

}
8  Java Game APIs & Engines / JOGL Development / WebStart and Method "glBindBuffer" not available on: 2007-12-03 15:45:08
I have been developing a small application in JOGL, which works without any issues on my MacOS X 10.5 based machine, but fails when I try running it from my Windows XP machine. Can anyone suggest what I am doing wrong? It is being launched via WebStart (JNLP):

http://ajmas.dyndns.org/jnlp/Tetris3D.jnlp

the excpetion I am getting is below:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Method "glBindBuffer" not available
   at com.sun.opengl.impl.GLImpl.glBindBuffer(GLImpl.java:373)
   at com.sun.opengl.util.j2d.TextRenderer.endRendering(TextRenderer.java:861)
   at com.sun.opengl.util.j2d.TextRenderer.endRendering(TextRenderer.java:708)
   at ajmas74.tetris3d.Tetris3D.drawStatusPanes(Tetris3D.java:339)
   at ajmas74.tetris3d.Tetris3D.display(Tetris3D.java:192)
   at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
   at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
   at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
   at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412)
   at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
   at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277)
   at javax.media.opengl.GLCanvas.update(GLCanvas.java:354)
   at sun.awt.RepaintArea.updateComponent(Unknown Source)
   at sun.awt.RepaintArea.paint(Unknown Source)
   at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

9  Java Game APIs & Engines / JOGL Development / Re: New to JOGL - Texture not displaying on Linux and Mac OSes? on: 2007-11-22 16:20:40
Small note, as far I can tell, on the MacOS X front, OpenGL 2.0 is only supported by MacOS X 10.4.3 and above. This is from checking some forum posts, but I couldn't seem to find any official information to confirm this.
10  Java Game APIs & Engines / JOGL Development / Transparent canvas? on: 2007-11-12 16:52:00
I remember reading some time back that it was possible to make the GLCanvas transparent in such a way to see the desktop behind, in MacOS X. I haven`t been able to refind the documentation on this. Does anyone know about this and can tell me what I need to do to achieve this?
11  Java Game APIs & Engines / JOGL Development / Re: JOGL OSX and eclipse on: 2007-11-12 16:22:04
If you are going to be running your development projects from within Eclipse, then what you need to do is to put the native libraries in the base of your project and then add the jars to the project. The other alternative location is ~/Library/Java/Extensions. Both will do the job.

12  Java Game APIs & Engines / JOGL Development / [Q] Status Panel and 3D scene on: 2007-11-09 05:30:10
I am wanting to display a 3D scene and then have a status panel in front of it. As an example imagine a game like Warcraft where there is a 3D area and then a 2D area for the status of health, etc. One approach I could use is to have two panels: the GLCanvas and in front of it a semi transparent Panel withe what I need, or go whole hog with JOGL in the GLCanvas. I haven't tried either but I would certainly be interested to find a solution where everything can be done in OpenGL. The main issue I am worrying about is not having 3D objects move through the status panel. Any suggestions?
13  Java Game APIs & Engines / JInput / 3D Input devices & Jinput on: 2007-11-08 17:29:49
I was in the process of designing and research an API for 3D input devices, when I came across JInput and thought maybe working with this project would be energy better spent. For me a 3D input device is anything that offers more detailed input than the X/Y data provided by a mouse. The type of input I imagine are:

   - x/y/z acceleration
   - x/y/z positioning
   - pitch/roll/yaw

Of course not all devices will support all input, so means of knowing what device class, along with the type of input it can provided would have to be taken into consideration. In some cases the characteristics of the device can change depending on the state of the device.

Some 3D input devices I am thinking of include:

  - 3dconnexion's space mouse: http://www.3dconnexion.com/3dmouse/spaceexplorer.php
  - Wii Remote & the associated Nunchuk: http://wii.nintendo.com/controller.jsp
  - Some others: http://www.vrealities.com/control.html

In a number of cases the implementations for a specific device would probably have to reply on JNI, given that exact communication protocols aren't always available, as in the case of 3dconnexion, but in other cases there are Java API available, as in the case of WiiremoteJ.

Would extending Jinput for these type of devices be of interest to anyone?
14  Java Game APIs & Engines / JOGL Development / Re: Problems by JOGL in NetBeans 6 on: 2007-11-03 20:19:08
A java.lang.NoClassDefFoundError usually indicates that a class can't bound or one of its dependencies is is missing. From the Javadoc:

Quote
"Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.

The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found. "

The best way to work out what is going wrong is to look at the stack trace. The oldest call is at the bottom and the most recent on the top.

This first thing to check is whether your CLASSPATH contains the JAR which contains the class and then to see whether they of the right version.

Edit: Looking at the following thread would suggest a conflict in JOGL versions. Maybe you compiled with one version and are attempting to run with another, incompatible version:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1193238872
15  Java Game APIs & Engines / JOGL Development / Status of com.sun.opengl classes? on: 2007-11-03 16:19:03
From what I have read 'com.sun' classes should be treated as classes which may have their API change at any time, without respect for backwards compatibility, and therefore should be avoid where possible. Does the same go for the 'com.sun.opengl' classes? Will these be migrated to javax at some point in time?
16  Java Game APIs & Engines / JOGL Development / Re: problem about skybox -- looking for help on: 2007-11-03 15:48:56
Looking at your code, I wonder whether using GLEventListener would be better, since it calls you at the approriate times.  For example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
class MyClass extends GLCanvas implements GLEventListener, Runnable {

   MyClass () {
      addGLEventListener(this);
   }

   // ... followed by the implementations of the GLEventListener and Runnable methods

  public void run () {
        while ( true ) {
            this.repaint();
   
            // Used to reduce the FPS
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
            }
        }
  }
}


The code in the run method is only necessary if you need to implement code that needs to happen, without user interaction.

Some other observations, is that you sky texture is going to be repeated and not stretched:

1  
  gl.glTexCoord2i(0, 2);


0.0 - 1.0, is the extent of the texture and anything beyond that will cause it to repeat. So, 0.0 - 2.0 will cause the texture to be repeated twice.

I also noticed in my tests that anything beyond -50, on the z-axis, resulted in cropping during the rotation (I am tried grafting your code onto a skeleton I use for tests). I am not an expert in OpenGL myself, so I am not sure why this is the case.
17  Java Game APIs & Engines / JOGL Development / Re: Text display issue in ported code - help needed on: 2007-11-02 21:25:20
Did a bit more research and turns out that Sun's TextRenderer class is what I needed:

  http://weblogs.java.net/blog/campbell/archive/2007/01/java_2d_and_jog.html

So much easier and better looking results. Now just to work out how to center the text around the specified point, for any given font and string.

18  Java Game APIs & Engines / JOGL Development / Text display issue in ported code - help needed on: 2007-11-02 19:57:55
I am in the process of porting some OpenGL code, written in C/C++, to Java, but my inexperience with text display is causing me problems. The relavent C/C++ code is as follows:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
void TextOut(double x, double y, double size, char *str, bool ident)
{
   gl.glMatrixMode(GL.GL_MODELVIEW);
   gl.glPushMatrix();

   if (ident)
      gl.glLoadIdentity();

   gl.glColor3d(1,1,1);
   gl.glTranslatef(x,y,0);
   gl.glScalef(size, size, size);
   
   QFont fnt;
   fnt.setPointSize(size*2);
   renderText(1, 0, 0, str, fnt);

   gl.glPopMatrix();
}


the class in which this is implemented extends QGLWidget.

and so far I have come up with:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
void textOut(GL gl, double x, double y, double size, String str, boolean ident)
{
    gl.glMatrixMode(GL.GL_MODELVIEW);
    gl.glPushMatrix();

    if (ident) {
        gl.glLoadIdentity();
    }
   
    gl.glColor3d(1,1,1);
    gl.glTranslated(x,y,0);
    gl.glScaled(size, size, size);      
   
    gl.glRasterPos2d(0,0);
   
    int fontId = GLUT.BITMAP_HELVETICA_10;
   
    glut.glutBitmapString(fontId, str);

    gl.glPopMatrix();
   
}


While it does the job more or less,  am finding that I am getting alignment issues depending on the size of the window I am using. Any ideas as to what I should be doing?

Also are there any good routines for rendering any font in OpenGL, including True Type fonts?
19  Java Game APIs & Engines / JOGL Development / Wireframe and non-Wireframe in same scene? on: 2007-10-31 14:43:40
I am wanting to draw an image of the Earth on a sphere and then overlay it with the longitude and latitude lines. I thought this would do the job:

1  
2  
3  
4  
5  
6  
7  
8  
9  
        gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
       
        OpenGlUtils.drawSphere ( gl, null,2.0, 80);
       
        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
       
        gl.glBindTexture(GL.GL_TEXTURE_2D, textureIds[2]);
       
        OpenGlUtils.drawSphere ( gl, null,2.01, 20);


but it would seem that glPolygonMode is global for a given display cycle. Are there other approaches that someone could recommend?
20  Java Game APIs & Engines / JOGL Development / Re: Applying a texture to a sphere, using QUAD_STRIPS on: 2007-10-28 15:30:55
Thanks, looks like what I was looking for Smiley

BTW Google is great, but you just need to know the right search terms.
21  Java Game APIs & Engines / JOGL Development / Re: jogl and SWT on: 2007-10-28 00:24:33
JOGL is a pure abstraction of the native OpenGL API, as such there should be hardly any dependencies on AWT, if any. I recommend the best thing to do is look at the source to reassure yourself.
22  Java Game APIs & Engines / JOGL Development / Re: GLJPanel too slow on: 2007-10-28 00:21:08
What is the frame rate. Oddly enough, sometimes problems can happen because the frame rate is too high, so you need to reduce it, by introducing a sleep, to something reasonable.
23  Java Game APIs & Engines / JOGL Development / Applying a texture to a sphere, using QUAD_STRIPS on: 2007-10-27 21:57:19
I have a method for drawing a sphere:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
    static public void drawSphere(GL gl, double radius, int lats, int longs) {
        /*
         * This algorithm moves along the z-axis, for PI radians and then at
         * each point rotates around the z-axis drawing a QUAD_STRIP.
         *
         * If you you start i at a non-zero value then you will see an open
         * end along the z-axis. If you start j at a none zero-axis then you
         * will see segements taken out.
         */

        gl.glEnable(GL.GL_TEXTURE_GEN_S);                          // Enable Texture Coord Generation For S (NEW)
        gl.glEnable(GL.GL_TEXTURE_GEN_T);                          // Enable Texture Coord Generation For T (NEW)


        for ( int i = 0; i <= lats; i++) {
            double lat0 = Math.PI * (-0.5 + (double) (i - 1) / lats);
            double z0 = Math.sin(lat0) * radius;
            double zr0 = Math.cos(lat0) * radius;

            double lat1 = Math.PI * (-0.5 + (double) i / lats);
            double z1 = Math.sin(lat1) * radius;
            double zr1 = Math.cos(lat1) * radius;

            gl.glBegin(GL.GL_QUAD_STRIP);
            for ( int j = 0; j <= longs; j++) {
                double lng = 2 * Math.PI * (double) (j - 1) / longs;
                double x = Math.cos(lng) *radius;
                double y = Math.sin(lng) *radius;
               
                gl.glNormal3d(x * zr0, y * zr0, z0);
                gl.glVertex3d(x * zr0, y * zr0, z0);
               
                gl.glNormal3d(x * zr1, y * zr1, z1);
                gl.glVertex3d(x * zr1, y * zr1, z1);
            }
            gl.glEnd();
        }

        gl.glDisable(GL.GL_TEXTURE_GEN_S);                      
        gl. glDisable(GL.GL_TEXTURE_GEN_T);      
    }


I now want to modify this to allow for applying a texture around the globe. If I had split the sphere into QUADs, then I would probably have applied the texture as a percentage of the rotation, but I am not sure how I would do this with a quad strip?

I would like the texture to wrap around the object, like a map around a globe, rather than repeat.
24  Java Game APIs & Engines / JOGL Development / How to apply super large texture? on: 2007-10-27 20:54:52
I am fairly new to JOGL, and while I have already applied to basic textures to an object, I am not sure how I would go about applying a 'super large' texture. For example, if I had a globe, a bit like Google Earth how would I apply the texture at default magnification? Also, what are the size limitations that I should take into account, if any?

25  Java Game APIs & Engines / Java Sound & OpenAL / Re: Bug in Mac OS X version: flipped bytes on: 2005-12-21 03:58:54
Just a heads up that if you do any byte flipping here, because if you tested for MacOS X, make sure you also check for the architecture. I say this since this will break otherwise on the new x86 machines due out in 2006. Truth is, this should be fixed in the native library.
26  Java Game APIs & Engines / JOGL Development / 3D widget in HUD? on: 2005-12-15 22:24:12
I am in the process of writing a program that provides a view of a virtual world. In front of th viewer's view is a HUD, where I wish to add a few 3D widgets, that would be updated in real time. I don't want the 3D widgets on the HUD to be affected by the perspective used to display the 3D world. Do you have any ideas on how to do ensure the perspectives are different for the world and the HUD?
27  Java Game APIs & Engines / JOGL Development / Re: Texture enabled and darkened lines on: 2005-11-25 20:33:34
Looks like I misunderstood. I thought that enabling or displaying a feature applied to the whole 'display' phase.  This corrects the issue.

Also made another in my code whereby I was using

  gl.glPolygonMode(GL.GL_FRONT,GL.GL_LINE);

and forgot to change it to

gl.glPolygonMode(GL.GL_FRONT,GL.GL_FILL);

for when doing the texture, so I wasn't seeing the texture. Sharing for the benefit of others.
28  Java Game APIs & Engines / JOGL Development / Texture enabled and darkened lines on: 2005-11-25 19:22:45
I have been creating a program that uses polygons fairly heavily. I then decided to add a texture to the background and enabled texturing. When I do this all the lines making up my polygons suddenly darken.

Is there anyway to have dull brightness lines and a texture, without having to manually add lighting? In fact when I add lighting I can't see any of the polgon lines. Any ideas?

29  Java Game APIs & Engines / JOGL Development / Re: JOGL texture issues on: 2005-11-25 16:24:19
One instance would be if your buffer actually represents a sequence of images.
30  Java Game APIs & Engines / JOGL Development / Re: rotating an object around a abitrary point on: 2005-11-24 19:16:28
Are you transforming and then rotating or rotating and then transforming. You'll find that the order in which you need to do things should be in the reverse of what you expect.
For example if you are rotating an arrow arround a circle, so it acts like a compass point, then you need to rotate and then transform. I had read about this but it didn't hit me until I actually was doing this on my own (I had forgotten about that fact).

Pages: [1] 2 3
 

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

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (85 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (79 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (96 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (152 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!