Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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: Vbo help on: 2008-08-11 13:28:53
You can use static VBOs instead of display lists, it depends on your graphics card too.

How can i use them in static mode? I just followed some tutorials online to lear how to use vbo and the resulting code is:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
gl.glGenBuffersARB(1, VBOVertices, 0);                                      // Get A Valid Name
           gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, VBOVertices[0]);         // Bind The Buffer
           
            // Load The Data
           gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, trianglesNumber * 9 * BufferUtil.SIZEOF_FLOAT, vertices, GL.GL_STATIC_DRAW_ARB);

            // Generate And Bind The Texture Coordinate Buffer
           gl.glGenBuffersARB(1, VBOTexCoords, 0);                                     // Get A Valid Name
           gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, VBOTexCoords[0]);      // Bind The Buffer
           // Load The Data
           gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, trianglesNumber * 6 * BufferUtil.SIZEOF_FLOAT, texCoords, GL.GL_STATIC_DRAW_ARB);


then to call vbo to draw i just used the code i posted previously but i think i did something wrong becouse i have a significant drop in fps using vbos in stand of dl and if i use the call drawelements i got and exception. I am a bit miss.
2  Java Game APIs & Engines / JOGL Development / Re: Vbo help on: 2008-08-11 08:31:33
I have the problem that i need to draw in my scene a variable number of instances of the same mesh of about 2500 triangles. In your opinion is it better to use a display list or a vbo in that case?

I tried to use gl.glDrawElements in stand of gl.glDrawArrays but i got an exception that tells me:
1  
Caused by: javax.media.opengl.GLException: element vertex_buffer_object must be enabled to call this method


It's quite strange, why do i have this exception using gldrawelements and not with drawarrays?
3  Java Game APIs & Engines / JOGL Development / Re: Vbo help on: 2008-08-10 09:14:56
The largest benefit to vbo's IMO is that you only have to bind the data once in the beginning, then you can make 1000 glDrawX calls (assuming you want the same geometry rendered each time).  This enables the graphics card to cache a lot of results, generally, I see very good performance (although I haven't tried using display lists).

I think this is the same benefit of DL, storing data in the gc and draw data accessing them by id.
What i just want to realize if i can have better performances using Vbo in stand of Dl but i think i got something wrong because it's quite strange to have a fps of 2-5 using vbos and a fps of 37 using dl.
Maybe i do not understand the right way to call gc stored data through vbo, if I tried to call only gl.gldrawarrays i can't see anything on screen. Every time i want to draw my model i have to call gl.glEnableClientState and it's quite strange for me, why do i have to enable client state if i've just stored my datas in the graphic card?
Can't i simply access those data using the index gave by glbindbufferARB?
4  Java Game APIs & Engines / JOGL Development / Vbo help on: 2008-08-09 15:59:14
Hi all.
I am developing a benchmark to find if it's better to use display lists or vbos for future private purposes.

The benchmark is quite simple, it consists in a window where a static model of about
4000 triangles is drawed multiple times.
First i stored my model data in a display list and then in my render i called that dl 1000
times per frame. I got a result of about 37 fps.

Then i tried to use Vbos to draw my model but i am quite new with vbos so i think i've just got
something wrong becouse drawing 1000 models on screen i go a result of 2 to 5 fps.

I just followed some tutorials to implements vbos and i used the following code in my vbo model draw method:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
gl.glEnableClientState(GL.GL_VERTEX_ARRAY);      // Enable Vertex Arrays
gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);   // Enable Texture Coord Arrays
gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, VBOTexCoords[0]);
           
gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);      // Set The TexCoord Pointer To The TexCoord Buffer
gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, VBOVertices[0]);
           
gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, getTrianglesNumber()*3);
gl.glDisableClientState(GL.GL_VERTEX_ARRAY);               // Disable Vertex Arrays
gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY);  


Did i do something wrong or is it common that with many triangles my performances drop significantly using vbos?
5  Game Development / Newbie & Debugging Questions / Java MS3D Animation on: 2008-03-27 16:47:12
Hi,
i am working on a 3D project by my own and i developed a working loader of ms3d milkshape format in Java.
Then i tried to develop a good animation class following the tips in the ms3d specs but my animator doesn't work
correctly. Is there any Java tutorial to develop a working ms3d animator?
6  Java Game APIs & Engines / JOGL Development / Re: Suggestion to increase the performances of a 3D simulation on: 2007-10-29 21:21:42
I understand, so it's better to avoid the use of the skeletal tecnique and it's better to focus on the key framing tecnique. Do you have any relevant book or article regarding keyframing and VBO that a beginner like me have to read?
7  Java Game APIs & Engines / JOGL Development / Re: Suggestion to increase the performances of a 3D simulation on: 2007-10-29 08:15:28
I've another doubt regarding performances, if i work on making the animations for a human body, is it better to work on a complete body generating its key frames, or is it better to work on a model for every part of the body and generate key frames only for the moving parts? Is there any other tecnique to make human body animation that could be useful for performances in a simulation with about 1000 or 2000 humans walking?
8  Java Game APIs & Engines / JOGL Development / Re: Suggestion to increase the performances of a 3D simulation on: 2007-10-24 19:47:07
I red something about VBO and Displaylist but some people say that vbo are better and some other suggest to use displaylist, actually i don't know wich is better.
9  Java Game APIs & Engines / JOGL Development / Suggestion to increase the performances of a 3D simulation on: 2007-10-24 13:57:15
Hi,
i am a quite good Java programmer but i have to admit that i am a newby regarding OpenGL and JOGL. I started using this library becouse i am developing a 3D pedestrian mobility simulator where a user can see the movements of many entities inside a 3D environment. The problem is that it could possibly happen that i need to show about 1000 or 2000 moving entities at the same time, at the moment the pedestrian entities are rappresented by spheres or cylinders but i want to work on a 3D skeletal human body to make a better visual simulation for the user, but I fear that this could decrease significantly the performances of the simulator. Can someone help me suggesting some good programming tecniques or paperworks to read to develop a good program that could manage at runtime many 3D animated entities without a significant loss in performances?
10  Java Game APIs & Engines / JOGL Development / Re: Problem using eclipse and jogl on: 2007-10-15 06:23:13
yes i have it.
11  Java Game APIs & Engines / JOGL Development / Problem using eclipse and jogl on: 2007-10-14 15:31:48
Hi,
i've just discovered Jogl a few days ago and i decided to use it with eclipse. I followed all the installation's steps for windows users writtend in the beginner guide and then i wrote just a little test to see if the library works under eclipse.
The test was:
Quote
GLCanvas temp = new GLCanvas()

when i tried to run this test i received the following errors:
Quote
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/gluegen/runtime/DynamicLookupHelper
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   ....
        ....
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:117)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:86)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:79)
   at prova.main(prova.java:9)


i can't understand why i receive this error even if i made all the stuff to have a correct binding between eclipse and jogl library. Can someone help me?
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.

Nickropheliac (16 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

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

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

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

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

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

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

BurntPizza (49 views)
2014-08-09 21:09:32
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!