Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (550)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (593)
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:
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:
Caused by: 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:

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.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, getTrianglesNumber()*3);
gl.glDisableClientState(GL.GL_VERTEX_ARRAY);               // Disable Vertex Arrays

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
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
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
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:
GLCanvas temp = new GLCanvas()

when i tried to run this test i received the following errors:
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 prova.main(

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.

Archive (29 views)
2015-01-29 04:26:08

theagentd (24 views)
2015-01-28 15:33:52

GamerIDGoesHere (36 views)
2015-01-27 01:23:23

GamerIDGoesHere (37 views)
2015-01-27 01:22:15

CopyableCougar4 (46 views)
2015-01-27 00:34:41

CopyableCougar4 (30 views)
2015-01-26 04:47:56

Olo (23 views)
2015-01-25 21:26:00

Olo (28 views)
2015-01-25 18:44:22

Robo11 (46 views)
2015-01-25 06:14:26

basil_ (38 views)
2015-01-17 22:29:32
2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

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