org.deegree.services.wpvs.rendering.jogl
Class ConfiguredOpenGLInitValues

java.lang.Object
  extended by org.deegree.services.wpvs.rendering.jogl.ConfiguredOpenGLInitValues
All Implemented Interfaces:
EventListener, javax.media.opengl.GLEventListener

public class ConfiguredOpenGLInitValues
extends Object
implements javax.media.opengl.GLEventListener

The ConfiguredOpenGLInitValues class initializes a GL context with some configured values.

Version:
$Revision: 22370 $, $Date: 2010-02-03 13:03:34 +0100 (Wed, 03 Feb 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
ConfiguredOpenGLInitValues(int numberOfTexturesUnits)
           
 
Method Summary
 void createCompositingTextureShaderPrograms(javax.media.opengl.GL gl)
          Create the dem compositing texture shader programs for the given context
 void display(javax.media.opengl.GLAutoDrawable drawable)
           
 void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
           
 ShaderProgram[] getCompositingTextureShaderPrograms()
           
static float[] getTerrainAmbient()
           
static float[] getTerrainDiffuse()
           
static float getTerrainShininess()
           
static float[] getTerrainSpecular()
           
 void init(javax.media.opengl.GLAutoDrawable drawable)
           
 void reshape(javax.media.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfiguredOpenGLInitValues

public ConfiguredOpenGLInitValues(int numberOfTexturesUnits)
Parameters:
numberOfTexturesUnits -
Method Detail

display

public void display(javax.media.opengl.GLAutoDrawable drawable)
Specified by:
display in interface javax.media.opengl.GLEventListener

displayChanged

public void displayChanged(javax.media.opengl.GLAutoDrawable drawable,
                           boolean modeChanged,
                           boolean deviceChanged)
Specified by:
displayChanged in interface javax.media.opengl.GLEventListener

init

public void init(javax.media.opengl.GLAutoDrawable drawable)
Specified by:
init in interface javax.media.opengl.GLEventListener

createCompositingTextureShaderPrograms

public void createCompositingTextureShaderPrograms(javax.media.opengl.GL gl)
Create the dem compositing texture shader programs for the given context

Parameters:
gl -

reshape

public void reshape(javax.media.opengl.GLAutoDrawable drawable,
                    int x,
                    int y,
                    int width,
                    int height)
Specified by:
reshape in interface javax.media.opengl.GLEventListener

getCompositingTextureShaderPrograms

public ShaderProgram[] getCompositingTextureShaderPrograms()
Returns:
the shader programs for compositing multiple textures.

getTerrainAmbient

public static float[] getTerrainAmbient()
Returns:
new float[] { .6f, .6f, .6f, 1 };

getTerrainDiffuse

public static float[] getTerrainDiffuse()
Returns:
new float[] { .8f, .8f, .8f, 1 };

getTerrainSpecular

public static float[] getTerrainSpecular()
Returns:
float[]{.2f,.2f,.2f,1}

getTerrainShininess

public static float getTerrainShininess()
Returns:
1.5f, this value should be configured.


Copyright © 2011. All Rights Reserved.