|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.terrain.TextureSurface
public class TextureSurface
This is a basic example GridShader implementation to show, how to improve terrain rendering by utilizing a detail texture.
| Constructor Summary | |
|---|---|
TextureSurface(GridResourceSpec<GridSurface> spec)
|
|
TextureSurface(java.net.URL mainTexture)
Constructs a GridShader with a single texture. |
|
TextureSurface(java.net.URL mainTexture,
Material material)
Constructs a GridShader with a single texture. |
|
TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode)
Constructs a GridShader with detail texture support. |
|
TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode,
Material material)
Constructs a GridShader with detail texture support. |
|
| Method Summary | |
|---|---|
Appearance |
getAppearance()
We only set up one appearance for our grid. |
int |
getTextureUnits()
Will be called to return the amount of texture units needed. |
org.openmali.vecmath2.TexCoord2f |
map(float s,
float t,
int unit)
Maps the passed grid coordinates to texture coordinates. |
void |
release()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextureSurface(java.net.URL mainTexture)
colorTexture - the name/path of the main color texture for the grid.
public TextureSurface(java.net.URL mainTexture,
Material material)
colorTexture - the name/path of the main color texture for the grid.material - the material properties of this surfacepublic TextureSurface(GridResourceSpec<GridSurface> spec)
public TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode)
mainTexture - the name/path of the main color texture for the grid.detailTexture - the name/path of the repeating detail texture.detailRepeat - the amount of repetitions (per side) of the detail textureblendMode - the blend mode of the detail texture (see TextureAttributes)
public TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode,
Material material)
mainTexture - the name/path of the main color texture for the grid.detailTexture - the name/path of the repeating detail texture.detailRepeat - the amount of repetitions (per side) of the detail textureblendMode - the blend mode of the detail texture (see TextureAttributes)material - the material properties of this surface| Method Detail |
|---|
public void release()
release in interface GridResourcerelease in interface GridSurfacepublic Appearance getAppearance()
getAppearance in interface GridSurfacepublic int getTextureUnits()
GridSurface
getTextureUnits in interface GridSurface
public org.openmali.vecmath2.TexCoord2f map(float s,
float t,
int unit)
GridSurface
map in interface GridSurfaces - the "longitude" coordinate of the gridt - the "latitude" coordinate of the gridunit - the texture unit for which the coordinates have to be calculated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||