Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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 / Framerate drops down with JSR-231 on Windows on: 2005-11-30 16:29:49
Hi all,

I've switch over to JSR-231 but I've noticed a strang behaviour on Windows. At a certain amount of GLCanvas size the frame rate drops dramaticly down.
In my test I have a small scene which is rendered with smooth 100 FPS on a 575px * 575px - sized GLCanvas. The frame rate goes down to 5 FPS or below on a 576px * 575px - sized GLCanvas. This happens only on Windows and even to the Gears-demo.
 Any ideas on this? Are there any memory/cache limitations which could cause this? With JOGL 1.1 everything worked fine.

Thanks,
gerd
2  Java Game APIs & Engines / JOGL Development / Re: Again JOGL and Swing on: 2005-08-03 17:10:31
Thank you for the hint. A Thread.yield() in the Animator-loop does the trick too.
Swing runs much smoother now.

bye,
gerd
3  Java Game APIs & Engines / JOGL Development / Again JOGL and Swing on: 2005-08-03 13:37:44
Hi,

I'm using a GLCanvas within a pretty complex Swing-GUI which works so far even in a JTabbedPane.
To display the scene I use the Animator-class, i.e. it loops forever with max. performance. The problem
is, that is seems to me that the Swing repaint-thread doesn't get enough time to repaint the components if
necessary. E.g. if I click a JComboBox to open the option list, the combobox isn't repainted so I can't
see the option list. The same with popup menues (over a ligthweight component) or if I resize the window.
I've tried to insert a Thread.sleep() in my display()-method. Now the Swing stuff is repainted fine but it drops
down my fps-rate. Any hints how to get max. fps-rate but also getting Swing repainted correctly?

Thanks,
gerd
4  Java Game APIs & Engines / JOGL Development / Re: OpenGL question: material and scaleing on: 2005-03-17 11:40:59
Thanks you very much  Smiley GL_RESCALE_NORMAL made it.

gerd
5  Java Game APIs & Engines / JOGL Development / OpenGL question: material and scaleing on: 2005-03-17 05:24:48
Hi all,

I've  got the following problem: I draw a simple triangle and set a material for it. Than I scale the triangle with glScalef. If the scale factor is 1 everything is fine, but if I decrease the scale factor the triangle gets brighter up to white. If I increase the scale factor the triangle gets darker. I've noticed that the shininess of the material influences the color. But how can it be that scaleing influences the material or lighting? I've got the feeling that the answer is quite simple, but I don't see what it is. Below is a code snippet. It's plain C but I've also tried it with JOGL and the result is the same:


#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

void myinit (void)
{
   glShadeModel (GL_SMOOTH);   /* GL_SMOOTH is the default */
   glEnable (GL_LIGHTING);   /* GL_SMOOTH is the default */
   glEnable(GL_LIGHT0);
   
   float light_ambient[] = {0.0, 0.0, 0.0, 1.0};
   float light_diffuse[] = {1.0, 1.0, 1.0, 1.0};
   float light_specular[] = {1.0, 1.0, 1.0, 1.0};
     
   glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); // specify the ambient component
   glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); // specify the diffuse component
   glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); // specify the specular component

   float ambient[] = {0.20999968,0.0357954,0.00238636,0.0};
   float diffuse[] = {0.88,0.15,0.01,1.0};
   float emission[] = {0.0,0.0,0.0,0.0};
   float specular[] = {0.19,0.03,0.03,0.0};

   glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, ambient );
   glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse );
   glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, emission );
   glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specular );
   glMaterialf( GL_FRONT, GL_SHININESS, 10.24 );

}

void triangle(void)
{
   glPushMatrix();
   glScalef( 0.1, 0.1, 0.1 );
   glBegin (GL_TRIANGLES);
       glVertex2f (5.0, 5.0);
       glVertex2f (25.0, 5.0);
       glVertex2f (5.0, 25.0);
   glEnd ();
   glPopMatrix();
}

void display(void)
{
   glClear (GL_COLOR_BUFFER_BIT);
   triangle ();
   glutSwapBuffers();
}

void myReshape(GLsizei w, GLsizei h)
{
   glViewport(0, 0, w, h);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   if (w <= h)
       gluOrtho2D (0.0, 30.0, 0.0,
            30.0 * (float) h/(float) w);
   else
       gluOrtho2D (0.0, 30.0 * (float) w/(float) h, 0.0,
            30.0);
   glMatrixMode(GL_MODELVIEW);
}


int
main(int argc, char **argv)
{
 glutInit(&argc, argv);
 glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
 glutCreateWindow("colors");
 
 myinit();

 glutDisplayFunc(display);
 glutReshapeFunc(myReshape);
 glutMainLoop();

 return 0;             /* ANSI C requires main to return int. */
}



Thanks in advance,
gerd
6  Java Game APIs & Engines / JOGL Development / Calling glu functions on: 2003-12-12 09:08:21
Hi,

I have to raise this topic again since it seems that I'm not the only one having this. Whenever I call a glu function the JVM crashes with the latest jogl version on Linux.

I've noticed that the Xith3D guys had the same problem and simply reimplemented the glu function they needed, but that can't be the solution.

So, does anybody has an idea how to solve this problem or to track it down at least.

P.S. I'm using RedHat 9 with Mesa 5.
7  Java Game APIs & Engines / JOGL Development / Re: Native lib problem on: 2003-09-19 15:32:11
Again me with this gluPerspective problem. The hints of the related forum thread didn't help. But I've tracked the problem down as so far that I've found out that it happens with a certain combination of Mesa and JOGL.

All the precompiled binaries cause the problem if I use Mesa 5.0.1. With Mesa 3.4.x they work ! I've got a self-compiled JOGL from a few weeks ago which works with Mesa 5.0.1, but not the latest CVS snapshot.

Also I've found out the even if the exception occurs JOGL successfully retrieved those function addresses for the GLU stuff stored in GLUProcAddress.

Any ideas where I could look further to find out what's going on ?

P.S. I'm using RedHat 7.2.
8  Java Game APIs & Engines / JOGL Development / Native lib problem on: 2003-08-20 08:56:05
Hi,

I'm trying to run JOGL on a Mandrake 6.1 Linux (which is pretty the same as RedHat 6.1) with Mesa 5.0.1 and the latest JOGL version. But if I try to start  my program a get the following exception:


java.lang.UnsatisfiedLinkError: gluPerspective
       at net.java.games.jogl.impl.GLUImpl.gluPerspective(Native Method)
       at de.digitaleHaut.modeller4D.scenegraph.DHView.compile(DHView.java:94)
       at de.digitaleHaut.modeller4D.scenegraph.DHScene.reshape(DHScene.java:122)
       at net.java.games.jogl.impl.GLDrawableHelper.reshape(GLDrawableHelper.java:84)
       at net.java.games.jogl.GLCanvas$1.run(GLCanvas.java:101)
       at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:180)
       at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
       at net.java.games.jogl.Animator$1.run(Animator.java:87)
       at java.lang.Thread.run(Thread.java:536)


My Mesa installation contains this function, but I can't figure out what the problem is. I'm using JOGL also under Redhat 7.2 and Mesa 5.0.1 without  any problems. Are there any hidden flags that would enable some more debug information for JOGL ?

Best Regards,
blowfish
9  Java Game APIs & Engines / JOGL Development / picking on: 2003-07-23 17:48:22
Did anyone picking with JOGL ? I've tried to port the select-example from gl4java, but somehow it didn't work. It renders correctly, but the selection routine returns always 0 hits and I can't see a difference between the gl4java and JOGL version. Could someone provide example code ?

Thanks.
10  Java Game APIs & Engines / JOGL Development / Re: Memory leak under Linux ? on: 2003-07-23 17:42:34
Sorry, it was my failure. Because of an error in my scene loader there I had not only 50.000 triangles but 500.000 up to 1.000.000 !
11  Java Game APIs & Engines / JOGL Development / Memory leak under Linux ? on: 2003-07-21 09:58:56
Hi,

I'm loading a model with about 50.000 or more triangles into my JOGL- application. Where under Windows this is no problem, under Linux the memory usage of the JVM grows and grows (up to 500 MB). I've set the heap size of the JVM to 128MB, so it seems that the memory leak is in the native part of JOGL. Any ideas what this could be or how to trace it ?

I'm useing RedHat 7.2 with Mesa 5.0.1 on 1 GHz / 512 MB RAM machine without any graphics hardware acceleration.

Best Regards,
gerd
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.

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

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

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

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

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

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

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

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

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
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!