Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
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
1  Java Game APIs & Engines / JOGL Development / Re: yet another Timer question on: 2005-06-26 01:53:45
yes, it can work, but not the best way. The best way should write an custom animator by yourself Smiley

And I don't think using the static class a good method.
2  Java Game APIs & Engines / JOGL Development / Re: animator on: 2005-06-25 12:26:39
I think the Animator is for an accruate FPS. While FPSAnimator can't get enough high FPS for the timer accuracy and the thread scheduling model, however FPSAnimator can reduce CPU usage.
3  Java Game APIs & Engines / JOGL Development / Re: Do s and Don't s? on: 2005-06-25 12:03:06
I think you can try display list and compare the performance difference for you don't have much choice Smiley
I don't know if Xith3D has similar functionalities you want, I think if Xith3D can support cylinders and torus well you many use Xith3D for Xith3D can support VBO well. Or maybe you generate these shapes manually?
4  Java Game APIs & Engines / JOGL Development / Re: Do s and Don't s? on: 2005-06-25 06:28:24
To Malek:
I mean if you leave the event handling to the system, i.e., the rendering thread of JOGL controlled by the system rather than manullay called in the Animator, things will go smoothly.

As to your last post, I didn't undertand much.
Do you mean that after you used VBO for your torus and cylinders then what kind of calling methods you should use?
If you don't have tens of thounds of objects I think you can just call them with glDrawElements, and instead, if you want to get better ( but maybe a little better) performance, you can use display list.

And to gverig:
Google is the biggest PhD supervisor in China now Smiley
One can found answers of most of his problems in Google, however, forums and mail lists are very important too.
5  Java Game APIs & Engines / JOGL Development / Re: JOGL 1.1 released on: 2005-06-25 06:15:00
Another small question to Ken, where can I find JSR 231 APIs ?? Thx . Grin
6  Java Game APIs & Engines / JOGL Development / Re: yet another Timer question on: 2005-06-25 06:13:21
What's the timer used for ? for FPS or some other stuff?

As to where to put the timer, I think it depends the thread model you use.

If you use Animator like rendering that call JOGL display in your own thread  then you can put the timer where you like, however, if you leave the rendering thread controlled by system I'm afraid that you have to put the code in display.
7  Java Game APIs & Engines / JOGL Development / Re: JOGL 1.1 released on: 2005-06-25 05:01:16
Congratulations!
8  Java Game APIs & Engines / JOGL Development / Re: Random color function for a simple triangle on: 2005-06-24 13:41:44
Riven's right of the problem that changeColor == false.

I've tested the program on Linux, for the most time the vertices change color well and for a few times the three vertices will have the same color for the problem Riven pointed out.

I think a better way is to put the changed color in an array instead of this method.
9  Java Game APIs & Engines / JOGL Development / Re: Do s and Don't s? on: 2005-06-22 11:11:29
I suggest you not use the Animator. Your demo is 100% CPU usage on my P4 2.4Gc, Nvidia 5700LE. When nothing changes, it should not keep drawing. Smiley And I don't think VBO will improve this unless you abandon Animator .
10  Java Game APIs & Engines / JOGL Development / Re: glPolygonStipple on: 2005-06-22 10:28:35
Can you post your sample code ?
11  Java Game APIs & Engines / JOGL Development / Re: If you use VBO u should set ByteOrder to LITTLE_ENDIAN on Intel platform on: 2005-06-22 10:26:20
There are many examples in C++ in the following URL
http://www.devmaster.net/forums/index.php?showtopic=360

I also have some code but not very clear Smiley
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  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
// put this in your init()
public void initBufferObject(GL gl) {
      gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
     
      gl.glGenBuffersARB(4, bufID);
      gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, bufID[0]);
     
      gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, vbuf.capacity() ),
            vbuf, GL.GL_STATIC_DRAW_ARB);
      System.out.println(vbuf.capacity() + " " + counter.end());
      gl.glVertexPointer(3, GL.GL_FLOAT, 0, BufferUtils.bufferOffset(0));
     
      vbuf = null;
      System.gc();
     
      buf_size = (int) ( );
     
      gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, bufID[1]);
      gl.glBufferDataARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, fbuf.capacity() *  BufferUtils.SIZEOF_FLOAT,
            fbuf, GL.GL_STATIC_DRAW_ARB);
     
     
      fbuf = null;
      System.gc();
     
      if (vertexNormal) {
         gl.glEnableClientState(GL.GL_NORMAL_ARRAY);
         gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, bufID[2]);
         
         gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, nbuf.capacity() * BufferUtils.SIZEOF_FLOAT, nbuf, GL.GL_STATIC_DRAW_ARB);
         gl.glNormalPointer(GL.GL_FLOAT, 0, BufferUtils.bufferOffset(0));
         nbuf = null;
         System.gc();
      }
     
      if (RGBPointsAvailable) {
         gl.glEnableClientState(GL.GL_COLOR_ARRAY);
         gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, bufID[3]);
         
         gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, cbuf.capacity(),
               cbuf, GL.GL_STATIC_DRAW_ARB);
         gl.glColorPointer(3, GL.GL_UNSIGNED_BYTE, 0, BufferUtils.bufferOffset(0));
         cbuf = null;
         System.gc();
      }
   }
   
// put this in your display()
   public void drawBufferObject(GL gl) {
      gl.glDrawElements(GL.GL_TRIANGLS, numTri * 3, GL.GL_UNSIGNED_INT, BufferUtils.bufferOffset(0)); //last 0 is offset in element-array
      }
   }

There may be some errors, but I've deleted some mess code here.
12  Java Game APIs & Engines / JOGL Development / Time precision in Java on: 2005-06-22 07:26:50
Do not use System.currentTimeMillis() on Windows platform.
Use JDK 1.5 and System.nanoTime()

I read the source of JDK 1.5, the implementation of System.nanoTime is:
QueryPerformanceCounter on Windows ( the highest precision method on Windows)
gettimeofday for most Linux  ( 1 microsecond precsion, just print the nanosecond, if it ends with 000, then JVM uses gettimeofday)

However the implementation of System.cuurentTimeMillis() is:
GetSystemTimeAsFileTime on Windows which has only 10 - 15ms granularity on Windows XP and 2000
on Linux, it still uses gettimeofday, just divide the microseconds wth 1000.

However, the java.util.Timer still used System.currentTimeMillis() in JDK 1.5, so it can not get a frequecy higher than 65Hz on Windows platform.

Hope this be useful.
13  Java Game APIs & Engines / JOGL Development / Re: Where can I find articles on performance comparation of JOGL and native Open on: 2005-06-21 05:52:58
VA needs to transfer the buffer to VRAM every frame while VBO should prefer to be in the RAM. From the API you can say VBO sits on VA, but the performance differs large. This is extremely important for people like me who want to draw models of several millions triangles.

However according to my test, it seems that NV cards doesn't put VBO in the VRAM after the size of total VBOs exceed 128M, even on a card with 256 VRAM installed, I don't know where to ask for more informations about it. For with a 256M VRAM, models of 10million triangles or less can be held fully in the VRAM, while the FPS showed that it's not the case. Both 6800GT and 5950Ultra have the problem.

I don't have ATI card with 256M VRAM so I don't know about it.
14  Java Game APIs & Engines / JOGL Development / Re: Where can I find articles on performance comparation of JOGL and native Open on: 2005-06-20 02:21:31
Thanks Ken for such important informations.

And about Tang, I don't agree with you, I think VA is a tight pack of vertex and other data, and every frame these data need to be transferred to the video card.  However, VBO's not, VBO will reside in the video card after the glBufferDataARB ( in fact this will depends on the driver to decide where to put it)

So VBO will be much faster than VA !

Smiley
15  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-20 01:57:35
No, I didn't use JOGL Animator, I'm using java.util.Timer.scheduleAtFixedRate() to call gldrawable.display(). I think this method is less efficient for it needs to pump the event into the event queue and the real rendering occurs in another thread.
16  Java Game APIs & Engines / JOGL Development / Re: Any plans to support Frame buffer Object? on: 2005-06-20 01:49:44
Ha, that's great, thank JOGL guys.
17  Java Game APIs & Engines / JOGL Development / Re: Where can I find articles on performance comparation of JOGL and native Open on: 2005-06-19 14:50:34
Vertex Arrays are still immediate mode, for the maximum speed  one should use Vertex Buffer Object.
Due to the high overehead of JNI calls, glVertex calls will be the bottleneck, especially for high polygon count. For example I can render a 1 million happy budday model at 14-21fps ( no triangle strips used)  with VBO mode while with glVertex I can only render at 1.2fps on my 5700LE.

However, according to my experience of various benchmarks, JOGL can only reach about 60% of the corresponding C++ code.

For example C++ code can render a 176 million triangle model at 55fps on 9700 pro, while JOGL can only reach 34 fps ( but not the same model and no triangle strips used both)
18  Java Game APIs & Engines / JOGL Development / Any plans to support Frame buffer Object? on: 2005-06-19 14:35:17
As Frame Buffer Object will replace pbuffer and be a part of OpenGL standard, I don't know when JOGL will support it. At present, JOGL can support the EXT first I think.
19  Java Game APIs & Engines / OpenGL Development / Re: Vertex Buffer Objects? on: 2005-06-17 07:57:04
I think VBO is very important for performance, and JOGL can fully supports it !
20  Java Game APIs & Engines / JOGL Development / Re: Where can I find articles on performance comparation of JOGL and native Open on: 2005-06-15 16:22:35
Thanks, I don't know if there are any bench marks.

And about Grand Canyon,  I think it's  a little old tough we can learn much from it Smiley
21  Java Game APIs & Engines / JOGL Development / Where can I find articles on performance comparation of JOGL and native OpenGL on: 2005-06-15 10:17:52
or even LWJGL.

I don't know the performance difference of JOGL and native OpenGL

Thanks
22  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 08:51:51
Thank you all, I know what the problem is!!!!
For I use a timer to drive the JOGL rendering, and I don't know before that the time precision on Windows can only reach 15ms.
I found it's very strange that the fps can't exceed 65fps, so I searched google for "java 15ms", and I got it
http://forum.java.sun.com/thread.jspa?threadID=612991&messageID=3387915

They call it "damn windows", maybe some truth, it means that under windows you can't use a timer to reach more than 65 Hz, really bad.

However, I'm very glad to find the answer at last and learned much from the forum, it's great!!
Thank all who helped me. Welcome to China!
23  Java Game APIs & Engines / JOGL Development / Re: how to use glBlendEquationEXT? on: 2005-06-15 08:19:17
Yes, and if you want to use alpha values, such as in Volume rendering, u need to set Alpha bits to 8, or you will get nothing of alpha value when you read RGBA
24  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 08:04:34
There must be some place wrong with my program for I just test Gears, it can run at 900fps on the windows box, but I don't know where the problem is, maybe the swing or java thread related problems.
25  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 07:15:10
I don't think it's the problem of driver setting, for the vsync setting of my 5700LE is  "application control"
I don't know if there are any benchmark program in JOGL to test the frame rates.
Strange.
26  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 04:46:56
One thing to note is that I'm not using double buffer at present, doese it matter ?

Thanks
27  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 04:43:27
Oops, Cry I changed to b12 and used gl.setSwapInterval(0), but no frame rates change be visible
I tried both ATI 9700 and Nvidia 5700LE on WindowsXP
It remains 64fps while on a Debian box I can render up to 250fps

28  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 03:37:15
Thank you very much indeed, you are great!! Grin
29  Java Game APIs & Engines / JOGL Development / Re: Hi, Guys, what's your maximum fps with JOGL on Windows?? on: 2005-06-15 03:25:38
Thanks, but is it a new API ?? I can't find it in my b10, should I use b12 ??
30  Java Game APIs & Engines / JOGL Development / If you use VBO u should set ByteOrder to LITTLE_ENDIAN on Intel platform on: 2005-06-15 03:15:46
It cost me one day to realize it  Undecided
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

theagentd (14 views)
2014-10-25 15:46:29

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (45 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!