|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
This is the public interface for the drivers. Soon you'll be able to instance the drivers directly and use them to render on the screen in a standard way (this will enbale to have custom world engines)
| Method Summary | |
void |
beginScene()
call this metodh before starting to send faces |
int |
createTexture()
create a new texture |
void |
deleteTexture(int ID)
delete texture |
void |
destroyDevice()
destroy the device and frees all allocated datas |
void |
drawFace(float[] v0,
float[] v1,
float[] v2,
int clip)
draw a face given it's vertices and clipvalue |
void |
endScene()
call this method when you've sent all faces |
int |
getHeight()
returns the height of the screen |
int |
getWidth()
returns the width of the rendering screen |
void |
resetDevice()
reset this device deleting all textures and temporary datas |
void |
setBackgroundColor(float r,
float g,
float b)
sets the background color |
void |
setBackgroundImage(int[] pix,
int width,
int height)
sets the background image |
void |
setBilinear(boolean bilinear)
|
void |
setFilter(int filter)
|
void |
setFogActive(boolean flag)
switch fog on/off |
void |
setFogLinear(float near,
float far,
float r,
float g,
float b)
switch fog on and create a linear for |
void |
setKeyCode(java.lang.String key)
sets the registartion code |
void |
setPerspective(float fov2,
float fov,
float near,
float far)
sets the values used by the camera |
void |
setRenderState(int textureID,
boolean gouraud,
float rAlpha)
sets the render state for the rendering of all the next faces |
void |
setTextureBilinear(int ID,
boolean bilinear)
sets bilinear filtering of a texture |
void |
setTextureImage(int ID,
int[] pix,
int width,
int height)
sets the image of a texture |
| Method Detail |
public void setBackgroundColor(float r,
float g,
float b)
r - red componentg - green componentb - blue component
public void setBackgroundImage(int[] pix,
int width,
int height)
pix - an array of 0xrrggbb valueswidth - width of the arrayheight - height of the arraypublic int createTexture()
public void deleteTexture(int ID)
ID - texture ID to delete
public void setTextureImage(int ID,
int[] pix,
int width,
int height)
ID - the ID of the texture to modifypix - an array of 0xrrggbb valueswidth - width of the arrayheight - height of the array
public void setTextureBilinear(int ID,
boolean bilinear)
ID - the ID of the texturebilinear - true/false to switch bilinear filtering on/off for that texture
public void setRenderState(int textureID,
boolean gouraud,
float rAlpha)
textureID - ID of the texture to use or -1 if no texture is usedgouraud - true if the vertices contains color per vertex informationsrAlpha - a float in the range 0-1 to specify the alpha valuepublic void setBilinear(boolean bilinear)
public void beginScene()
public void endScene()
public void setFilter(int filter)
public void resetDevice()
public void destroyDevice()
public void drawFace(float[] v0,
float[] v1,
float[] v2,
int clip)
v0 - an array that contains:
v0[0],v0[1],v0[2] = x,y,z of the vertices
v0[3],v0[4],v0[5] = xr,yr,zr in screen coords
v0[6],v0[7],v0[8] = r,g,b for the vertices
v0[9],v0[10] = u,v for the verticespublic int getWidth()
public int getHeight()
public void setFogActive(boolean flag)
flag - true/false fog on/off
public void setFogLinear(float near,
float far,
float r,
float g,
float b)
near - near fog planefar - far fog planer - fog red componentg - fog green componentb - fog blue component
public void setPerspective(float fov2,
float fov,
float near,
float far)
fov - fov of the cameranear - near camera planefar - far camera planepublic void setKeyCode(java.lang.String key)
key - the license code
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||