Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (595)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
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]
deepthought (47 views)
2015-06-30 15:39:44

deepthought (50 views)
2015-06-30 15:39:09

deepthought (62 views)
2015-06-30 15:36:52

Za\'Anzabar (36 views)
2015-06-29 05:44:54

TritonDreyja (46 views)
2015-06-24 17:10:40

CopyableCougar4 (46 views)
2015-06-23 00:34:45

BurntPizza (51 views)
2015-06-21 20:36:46

cookiecompiler (93 views)
2015-06-11 15:42:53

cookiecompiler (55 views)
2015-06-11 15:41:14

NegativeZero (80 views)
2015-06-11 09:49:18
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

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