|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.imp3d.gl20.GL20GfxServer
public class GL20GfxServer
Field Summary | |
---|---|
static int |
ELEMENTS_BYTE
elements are stored as byte indicator |
static int |
ELEMENTS_INT
elements are stored as int |
static int |
ELEMENTS_MASK
elements storage mask |
static int |
ELEMENTS_SHORT
elements are stored as short |
static int |
HAS_NO_NORMALS
no normals are stored |
static int |
HAS_NO_TEXTURE_UV
no texture coordinates are stored |
static int |
HAS_NORMALS_BYTE
normals are stored in byte indicator |
static int |
HAS_NORMALS_FLOAT
normals are stored in float indicator |
static int |
HAS_TEXTURE_UV_FLOAT
texture coordinates are stored in float indicator |
static int |
HAS_TEXTURE_UV_SHORT
texture coordinates are stored in short indicator |
static int |
HAS_VERTEX_3_FLOAT
vertex with 3 elements are stored in float indicator |
static int |
HAS_VERTEX_3_SHORT
vertex with 3 elements are stored in short indicator |
static int |
HAS_VERTEX_4_FLOAT
vetrex with 4 elements are stored in float indicator |
static int |
HAS_VERTEX_4_SHORT
vertex with 4 elements are stored in short indicator |
static int |
LINES
line indicator |
static int |
NORMAL_MASK
normal mask |
static int |
ORDER_MASK
order mask |
static int |
ORDER_N_UV_V
normal - uv - vertex order indicator |
static int |
ORDER_N_V_UV
normal - vertex - uv order indicator |
static int |
ORDER_UV_N_V
uv - normal - vertex order indicator |
static int |
ORDER_UV_V_N
uv - vertex - normal order indicator |
static int |
ORDER_V_N_UV
vertex - normal - uv order indicator |
static int |
ORDER_V_UV_N
vertex - uv - normal order indicator |
static int |
PRIMITIVE_MASK
primitive mask |
static int |
QUADS
quadrilaterals indicator |
static int |
TEXTURE_MASK
texture mask |
static int |
TRIANGLES
triangle indicator |
static int |
VERTEX_MASK
vertex mask |
Method Summary | |
---|---|
void |
addNodeToScene(GL20Node node)
add a GL20Node to the current scene. |
void |
addNodeToTool(GL20Node node)
add a GL20Node to the current tool nodes |
boolean |
beginScene(javax.media.opengl.GL currentGL)
begin a new scene |
boolean |
bindTextureIndex(int dimensions,
int textureIndex,
int textureStage)
bind a texture given by its textureIndex to a texture
stage given by its textureStage . |
void |
checkExtensions()
|
void |
closeArrayBuffer(int arrayBufferIndex)
close an array buffer, that was opened before with openArrayBuffer() |
void |
closeElementArrayBuffer(int elementArrayBufferIndex)
close an element array buffer that was opened before with openElementArrayBuffer() |
int |
createArrayBuffer()
create a new array buffer that can contain vertex data |
int |
createElementArrayBuffer()
create a new element array buffer that can contain indices to vertices in a array buffer |
int |
createShader(de.grogra.imp3d.gl20.GL20GLSLCode code)
|
int |
createTextureIndex(int dimensions)
create a new texture index |
void |
deleteArrayBuffer(int arrayBufferIndex)
delete an array buffer given by its index |
void |
deleteElementArrayBuffer(int elementArrayBufferIndex)
delete an element array buffer given by its index |
void |
deleteTextureIndex(int dimensions,
int textureIndex)
delete a texture index that was created via createTextureIndex() |
boolean |
drawElementArrayBuffer(int elementArrayBufferIndex,
int arrayBufferIndex,
int firstElementIndex,
int elementUsedCount,
int flags)
draw an array buffer while using an element array buffer for the element indices. |
void |
drawLine(Tuple3f start,
Tuple3f end)
draw a single line should only called for very few reasons, e.g. like lines for tools |
void |
endScene()
end the current scene |
int |
getContextID()
get the current OpenGL context ID. every context change the context ID will be incremented. |
Vector4f |
getCurrentColor()
get the current color |
int |
getFrameID()
get the current frame ID. every frame the frame ID will be incremented. |
static GL20GfxServer |
getInstance()
get the server instance of this GL20GfxServer |
Matrix4d |
getViewToClipMatrix()
get the view to clip matrix |
Matrix4d |
getWorldToClipMatrix()
get the world to clip matrix. |
Matrix4d |
getWorldToViewMatrix()
get the world to view matrix |
boolean |
inScene()
check if this GL20GfxServer is between beginScene()
and endScene() |
boolean |
openArrayBuffer(int arrayBufferIndex,
int size)
open an array buffer for writing |
boolean |
openElementArrayBuffer(int elementArrayBufferIndex,
int size)
open an element array buffer for writing |
void |
setCurrentColor(Vector4f color)
set the current color |
int |
setTextureImage(int textureIndex,
int width,
int height,
int depth,
int[] pixelData)
|
boolean |
setViewToClipMatrix(Matrix4d viewToClipMatrix)
set the view to clip matrix. can only be setted before beginScene() |
boolean |
setWorldToViewMatrix(Matrix4d worldToViewMatrix)
set the world to view matrix. can only be setted before beginScene() |
void |
setWorldTransformationMatrix(Matrix4d worldMatrix)
set the world transformation matrix |
void |
unbindTexture(int dimensions,
int textureStage)
unbind a texture from a given textureStage |
int |
writeArrayBuffer2b(byte a,
byte b)
|
int |
writeArrayBuffer2f(float x,
float y)
|
int |
writeArrayBuffer2i(int a,
int b)
|
int |
writeArrayBuffer3b(byte a,
byte b,
byte c)
|
int |
writeArrayBuffer3f(float x,
float y,
float z)
|
int |
writeArrayBuffer3i(int a,
int b,
int c)
|
int |
writeArrayBuffer4b(byte a,
byte b,
byte c,
byte d)
|
int |
writeArrayBuffer4f(float x,
float y,
float z,
float w)
|
int |
writeArrayBuffer4i(int a,
int b,
int c,
int d)
|
int |
writeArrayBufferbv(byte[] v,
int count)
|
int |
writeArrayBufferfv(float[] v,
int count)
|
int |
writeArrayBufferiv(int[] v,
int count)
|
int |
writeElementArrayBuffer2b(byte a,
byte b)
|
int |
writeElementArrayBuffer2f(float x,
float y)
|
int |
writeElementArrayBuffer2i(int a,
int b)
|
int |
writeElementArrayBuffer3b(byte a,
byte b,
byte c)
|
int |
writeElementArrayBuffer3f(float x,
float y,
float z)
|
int |
writeElementArrayBuffer3i(int a,
int b,
int c)
|
int |
writeElementArrayBuffer4b(byte a,
byte b,
byte c,
byte d)
|
int |
writeElementArrayBuffer4f(float x,
float y,
float z,
float w)
|
int |
writeElementArrayBuffer4i(int a,
int b,
int c,
int d)
|
int |
writeElementArrayBufferbv(byte[] v,
int count)
|
int |
writeElementArrayBufferfv(float[] v,
int count)
|
int |
writeElementArrayBufferiv(int[] v,
int count)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ELEMENTS_BYTE
public static final int ELEMENTS_INT
public static final int ELEMENTS_MASK
public static final int ELEMENTS_SHORT
public static final int HAS_NO_NORMALS
public static final int HAS_NO_TEXTURE_UV
public static final int HAS_NORMALS_BYTE
public static final int HAS_NORMALS_FLOAT
public static final int HAS_TEXTURE_UV_FLOAT
public static final int HAS_TEXTURE_UV_SHORT
public static final int HAS_VERTEX_3_FLOAT
public static final int HAS_VERTEX_3_SHORT
public static final int HAS_VERTEX_4_FLOAT
public static final int HAS_VERTEX_4_SHORT
public static final int LINES
public static final int NORMAL_MASK
public static final int ORDER_MASK
public static final int ORDER_N_UV_V
public static final int ORDER_N_V_UV
public static final int ORDER_UV_N_V
public static final int ORDER_UV_V_N
public static final int ORDER_V_N_UV
public static final int ORDER_V_UV_N
public static final int PRIMITIVE_MASK
public static final int QUADS
public static final int TEXTURE_MASK
public static final int TRIANGLES
public static final int VERTEX_MASK
Method Detail |
---|
public final void addNodeToScene(GL20Node node)
GL20Node
to the current scene.
node
- the node that should be addedpublic final void addNodeToTool(GL20Node node)
GL20Node
to the current tool nodes
node
- the node that should be addedpublic final boolean beginScene(javax.media.opengl.GL currentGL)
true
- successfulpublic final boolean bindTextureIndex(int dimensions, int textureIndex, int textureStage)
textureIndex
to a texture
stage given by its textureStage
.
dimensions
- number of dimensions of the texture with given textureIndex
textureIndex
- a texture index that was return by createTextureIndex
textureStage
- the stage to which the texture should be bound
true
successful bound to given texture stage
false
textureStage
and/or textureIndex
are invalidpublic final void checkExtensions()
public final void closeArrayBuffer(int arrayBufferIndex)
openArrayBuffer()
arrayBufferIndex
- the index of the array buffer that should closedpublic final void closeElementArrayBuffer(int elementArrayBufferIndex)
openElementArrayBuffer()
elementArrayBufferIndex
- the index of the element array buffer that should closedpublic final int createArrayBuffer()
public final int createElementArrayBuffer()
createArrayBuffer
public final int createShader(de.grogra.imp3d.gl20.GL20GLSLCode code)
public final int createTextureIndex(int dimensions)
dimensions
- number of the dimensions that the texture should have
public final void deleteArrayBuffer(int arrayBufferIndex)
index
- the array buffer indexpublic final void deleteElementArrayBuffer(int elementArrayBufferIndex)
index
- the element array buffer indexpublic final void deleteTextureIndex(int dimensions, int textureIndex)
createTextureIndex()
dimensions
- number of the dimensions that the texture with textureIndex
havetextureIndex
- the texture index that should be deletedpublic final boolean drawElementArrayBuffer(int elementArrayBufferIndex, int arrayBufferIndex, int firstElementIndex, int elementUsedCount, int flags)
firstElementIndex
and elementUsedCount
you can control
if the whole element array buffer or just a part of it should used for drawing
elementArrayBufferIndex
- the index of the element array bufferarrayBufferIndex
- the index of the array bufferfirstElementIndex
- the index of the first index in element array bufferelementUsedCount
- the number of elements that should used starting at firstElementIndex
flags
- flags the inform the GL20GfxServer
how the buffers are build up
true
- successful drawingpublic final void drawLine(Tuple3f start, Tuple3f end)
start
- the start
coordinate of the lineend
- the end
coordinate of the linepublic final void endScene()
public final int getContextID()
public final Vector4f getCurrentColor()
public final int getFrameID()
public static final GL20GfxServer getInstance()
GL20GfxServer
public final Matrix4d getViewToClipMatrix()
public final Matrix4d getWorldToClipMatrix()
inScene()
or inRendering()
null
- not inScene()
or inRendering()
otherwise - the world to clip matrixpublic final Matrix4d getWorldToViewMatrix()
public final boolean inScene()
GL20GfxServer
is between beginScene()
and endScene()
true
- this GL20GfxServer
is between
beginScene()
and endScene()
public final boolean openArrayBuffer(int arrayBufferIndex, int size)
arrayBufferIndex
- the index of the array buffer that should openedsize
- the size in bytes that the buffer should contain
true
- buffer is opened for writingcreateArrayBuffer()
public final boolean openElementArrayBuffer(int elementArrayBufferIndex, int size)
elementArrayBufferIndex
- the index of the element array buffer that should openedsize
- the size in bytes that the buffer should contain
true
- buffer is opened for writingcreateElementArrayBuffer()
public final void setCurrentColor(Vector4f color)
color
- the color that should setpublic final int setTextureImage(int textureIndex, int width, int height, int depth, int[] pixelData)
textureIndex
- width
- the width of the image in pixel. must be power of 2height
- the height of the image in pixel. must be power of 2depth
- the depth of the image in pixel. must be power of 2pixelData
-
0
image wasn't set
otherwise the dimension of the image that was setpublic final boolean setViewToClipMatrix(Matrix4d viewToClipMatrix)
beginScene()
viewToClipMatrix
- the matrix that should set
true
- the view to clip matrix was set successfulpublic final boolean setWorldToViewMatrix(Matrix4d worldToViewMatrix)
beginScene()
worldToViewMatrix
- the world to view matrix
true
- the world to view matrix was set successfulpublic final void setWorldTransformationMatrix(Matrix4d worldMatrix)
worldMatrix
- the world transformation matrixpublic final void unbindTexture(int dimensions, int textureStage)
textureStage
dimensions
- number of dimensions that the texture of given textureStage
hastextureStage
- the stage which should unbindpublic final int writeArrayBuffer2b(byte a, byte b)
public final int writeArrayBuffer2f(float x, float y)
public final int writeArrayBuffer2i(int a, int b)
public final int writeArrayBuffer3b(byte a, byte b, byte c)
public final int writeArrayBuffer3f(float x, float y, float z)
public final int writeArrayBuffer3i(int a, int b, int c)
public final int writeArrayBuffer4b(byte a, byte b, byte c, byte d)
public final int writeArrayBuffer4f(float x, float y, float z, float w)
public final int writeArrayBuffer4i(int a, int b, int c, int d)
public final int writeArrayBufferbv(byte[] v, int count)
public final int writeArrayBufferfv(float[] v, int count)
public final int writeArrayBufferiv(int[] v, int count)
public final int writeElementArrayBuffer2b(byte a, byte b)
public final int writeElementArrayBuffer2f(float x, float y)
public final int writeElementArrayBuffer2i(int a, int b)
public final int writeElementArrayBuffer3b(byte a, byte b, byte c)
public final int writeElementArrayBuffer3f(float x, float y, float z)
public final int writeElementArrayBuffer3i(int a, int b, int c)
public final int writeElementArrayBuffer4b(byte a, byte b, byte c, byte d)
public final int writeElementArrayBuffer4f(float x, float y, float z, float w)
public final int writeElementArrayBuffer4i(int a, int b, int c, int d)
public final int writeElementArrayBufferbv(byte[] v, int count)
public final int writeElementArrayBufferfv(float[] v, int count)
public final int writeElementArrayBufferiv(int[] v, int count)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |