Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Quadrics and Translucency  (Read 608 times)
0 Members and 1 Guest are viewing this topic.
Offline SamiLakka

JGO n00b
*

Posts: 15


Java games rock!


« on: 2003-11-22 07:25:19 »

Hi,


how do I make my quadrics translucent? I'm using glutSolidSphere to draw
my quadrics, and I color them with glColor3f. I tried to change glColor3f to
glColor4f and specify alpha-value but it didn't have any effect. My quadrics'
materials are:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
private float no_mat[] = {0.0f,0.0f,0.0f,1.0f}; // Materials

private float mat_diffuse[] = {0.1f,0.5f,0.8f,1.0f};

private float mat_specular[] = {1.0f,1.0f,1.0f,1.0f};

private float no_shininess[] = {3.0f};

glMaterialfv (GL.GL_FRONT, GL.GL_AMBIENT, no_mat);

gl.glMaterialfv (GL.GL_FRONT, GL.GL_DIFFUSE, mat_diffuse);

gl.glMaterialfv (GL.GL_FRONT, GL.GL_SPECULAR, no_mat);

gl.glMaterialfv (GL.GL_FRONT, GL.GL_SHININESS, no_shininess);

gl.glMaterialfv (GL.GL_FRONT, GL.GL_EMISSION, no_mat);




Regards,

- Sami


Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.101 seconds with 21 queries.