Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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 / OpenGL Development / Re: Is it possible to change the alpha range on the GPU ? on: 2012-03-07 15:00:10
thanks
so I will start reading shader information :-)
2  Java Game APIs & Engines / OpenGL Development / Re: Is it possible to change the alpha range on the GPU ? on: 2012-03-07 13:59:12
Thank you for the answer ..
A good information that a fragment shader can solve the problem.
I have to read a little bit more about shader programming, at the moment I did not unstand your code
because of less knowledge.
I use jogl to acces the OGL interface and I will look for examples

Is it possible to set new values from my program on the cpu during the shaders is working ?
3  Java Game APIs & Engines / OpenGL Development / Re: Is it possible to change the alpha range on the GPU ? on: 2012-03-07 12:16:25
Sorry I don´t understand your question .
I don´t know very much about shaders, can a shader be used to solve my problem ?
4  Java Game APIs & Engines / OpenGL Development / Is it possible to change the alpha range on the GPU ? on: 2012-03-06 15:57:55
Hello experts,

I hope you can help me.

I draw thousands of colored quads by using the Quadstrip and Quads functionality.
The vertices and colors are stored in vbo buffers and it works well and fast.

I use blending to just  create a let me say a brightness effect

glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ZERO) this works also well.

Now I want to adapt the alpha range to the lowest and highest value of my received alpha value
to spread the alpha range exactly to my maximum ranges.

normally :
alpha 0
my lowest value 0,234
my highest value 0,822
alpha 1

I need:
alpha 0 mapped to 0,234
alpha 1 mapped to 0,822

Has anybody an idea how I can solve this  so that the change affect directly the drawing of my stored quads in the vbo´s .
Is there a OGL functionality available or is a shader a solution (I never wrote one )
Thanks for your answers





5  Java Game APIs & Engines / OpenGL Development / Re: GPU, wich amount of VBO data can be allocated ? on: 2011-10-18 16:22:37
I try to use gl2.glMapBuffer ..

it crashes :-( .. has anybody a short example ?

I will try it again tomerrow now I have to go

bye
6  Java Game APIs & Engines / OpenGL Development / Re: GPU, wich amount of VBO data can be allocated ? on: 2011-10-18 15:50:19
That was the answer  princec :-)

thanks
7  Java Game APIs & Engines / OpenGL Development / Re: GPU, wich amount of VBO data can be allocated ? on: 2011-10-18 15:44:42
Thank you for the information ..

I´ve one further question, is it recommended to use glMapBuffer to update the data in my VBO´s ? For my first test I use glBufferData, it work but is it a fast way to do this ?

My English is not that good so I´m not sure if I have understand the performance hint from  theagentd correct :-)
8  Java Game APIs & Engines / OpenGL Development / GPU, wich amount of VBO data can be allocated ? on: 2011-10-18 10:13:21
Hello

I start working with VBO´s and my first tests look good.
For further planning the following question comes up.
Which amount of GPU memory can be allocated by using VBO´s ?
Just to get a rough feeling about the sizes that can be used.

I have a NVIDIA Quadro FX 770M GPU and a utility program shows that there are 512 MB available on the GPU card.
Are there 512MB available for use or how do I find out what is available ?

Thanks

9  Java Game APIs & Engines / JOGL Development / Re: DrawArrays() GL_QUAD_STRIP, alpha value is ignored ??? on: 2011-10-17 11:08:38
Ah thank you that was a good hint ..

I forgot to copy 
gl2.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ZERO);  // always drawn new

now it work :-)
thanks
10  Java Game APIs & Engines / JOGL Development / DrawArrays() GL_QUAD_STRIP, alpha value is ignored ??? on: 2011-10-17 10:45:04
Hello

in the past I used the alpha value to set the transparence of a color:

gl2.glEnable(GL.GL_BLEND); // Turn Blending On
// set the color red, green, blue , alpha
gl2.glColor4f( color[1], color[2], color[3], color[0]  );

this worked well

Now I changed my code and use vbo´s and DrawArrays(..) and it look like the alpha value is ignored.
Do I have to set something special when I create the ColorPointer ?
Thanks

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  
   static void vboTestOnlyDrawSeveralQuadStrip(GL2 gl2){
     
      gl2.glEnable(GL.GL_BLEND); // Turn Blending On
     
      //--- turn shade Model Flat On
     // eaxh quad is filled with one color defined by the last vertex
     gl2.glShadeModel(GL2.GL_FLAT);
     
       for(int i=0; i<vboIndexArray.length/2; i++){
          // define which Types of Elements are a allowed
         gl2.glEnableClientState( GL2.GL_VERTEX_ARRAY );
          gl2.glEnableClientState( GL2.GL_COLOR_ARRAY );
       
          //--- set the vertex pointer
         // bind the buffer, from this moment this specific buffer is used
         gl2.glBindBuffer(GL2.GL_ARRAY_BUFFER, vboIndexArray[i]);
          // Get the Position of the data in the memory
         gl2.glVertexPointer(3, GL2.GL_FLOAT, 0, 0);
         
          //--- set the color pointer
            // bind the buffer, from this moment this specific buffer is used
         gl2.glBindBuffer(GL2.GL_ARRAY_BUFFER, vboIndexArray[i+(vboIndexArray.length/2)]);
          gl2.glColorPointer(4, GL2.GL_FLOAT, 0, 0);
                 
          // draw the Buffer
         gl2.glDrawArrays(GL2.GL_QUAD_STRIP, 0,((intCountOfQuads * 2) + 2));      
       
          // unbind the buffer, by using 0
         gl2.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);      
       
          // Disable vertex arrays
         gl2.glDisableClientState( GL2.GL_COLOR_ARRAY );
          gl2.glDisableClientState( GL2.GL_VERTEX_ARRAY );      
       }
     
   }//end: void vboTestOnlyDrawSeveralQuadStrip(






11  Java Game APIs & Engines / JOGL Development / Re: opengl.util.BufferUtil and VBO on: 2011-10-14 13:46:00
Yes I understand, I found everything  and at the moment my first VBO test programms  are running well :-)
12  Java Game APIs & Engines / JOGL Development / Re: opengl.util.BufferUtil and VBO on: 2011-10-14 09:23:03
Ok I ignore you ;-)

thanks for all your answers
13  Java Game APIs & Engines / JOGL Development / Re: opengl.util.BufferUtil and VBO on: 2011-10-13 12:26:08
Ok, thanks

but where can I download it ? It was not in the packages that I have downloaded for using jogl.

14  Java Game APIs & Engines / JOGL Development / opengl.util.BufferUtil and VBO on: 2011-10-13 10:50:19
Hello

I start using VBO´s and saw different ways to initialize the buffers.
One is using the opengl.util.BufferUtil classes.

Is this the best way and where do I get it ?
thanks
15  Java Game APIs & Engines / JOGL Development / Re: Search for a good jogl book on: 2011-10-12 08:38:40
Ok, the red book is online available ?

thanks
16  Java Game APIs & Engines / OpenGL Development / Draw a polar diplay by using VBO´s on: 2011-10-11 16:31:37
Hello

I want to implement a Polar Display, in principle similar to the drawPartitialDisk function.
I need round about 1300 cells (called one burst) from the center to the outside and I want to be able to set the color of each cell. The display has to draw about 200 of those bursts ..

My first idea is to store each burst in a VBO and draw it by using glDrawElements(GL_QUADStrip ..
I have no experience and my questions are

is this possible with VBO´s ?
Can I change dynamically the color of one burst while the others are drawn ?

I´m thankful for each hint or a better idea ?
thanks
17  Java Game APIs & Engines / OpenGL Development / Re: glGenBuffersARB not available on: 2011-10-11 16:06:41
Puuuuh that sounds good, I was a little bit confused :-)
 
Thank you for your answer ..

18  Java Game APIs & Engines / JOGL Development / Search for a good jogl book on: 2011-10-11 15:53:18
Hello

I just started working with jogl and there is a lot of stuff in the net about jogl but sometimes I prefer to read in a book.
Has anybody a suggestion for a good jogl book

thanks
19  Java Game APIs & Engines / OpenGL Development / glGenBuffersARB not available on: 2011-10-11 15:24:18
Hello
I´m very new in this area and hope an expert can help me. I wrote a programm by using jogl and it went well until now.
Now I try to use vertex buffer objects .. I found examples and in those examples the method
glGenBuffersARB(..) is used. I try to implement it but in my environment the method is undefined ??
I checked if the VBO functionality is available by using the following methods
       boolean bAvailable = gl2.isFunctionAvailable("glGenBuffersARB");       
       bAvailable = gl2.isExtensionAvailable("GL_ARB_vertex_buffer_object");
The functionality is available.
I checked other code samples and saw that glGenBuffers(..) is used.
My questions:
1) What is the difference between glGenBuffers(..) and glGenBuffersARB(..)
2) Why is glGenBuffersARB(..) undefined even the functionality is available ?
3) Can I use glGenBuffers(..)

Jogl version : jogl-2.0-b23-20110303-windows-i586
OGL version : GL_VERSION: 2.1.2

thanks for answers
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.

ctomni231 (34 views)
2014-07-18 06:55:21

Zero Volt (30 views)
2014-07-17 23:47:54

danieldean (25 views)
2014-07-17 23:41:23

MustardPeter (27 views)
2014-07-16 23:30:00

Cero (42 views)
2014-07-16 00:42:17

Riven (44 views)
2014-07-14 18:02:53

OpenGLShaders (32 views)
2014-07-14 16:23:47

Riven (32 views)
2014-07-14 11:51:35

quew8 (30 views)
2014-07-13 13:57:52

SHC (66 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!