public class IGraphicsGL2 extends java.lang.Object implements IGraphicsGL
| Modifier and Type | Field and Description |
|---|---|
double[][][] |
bgColor |
com.jogamp.opengl.util.texture.Texture |
bgTexture |
int |
bgTextureID |
static float[] |
defaultGLAmbientLight |
static float[] |
defaultGLDiffuseLight |
static float[] |
defaultGLLightPosition |
static float[] |
defaultGLSpecularLight |
static boolean |
defaultGLTwoSidedLighting |
boolean |
firstDraw |
java.awt.Graphics2D |
g |
com.jogamp.opengl.GL |
gl |
com.jogamp.opengl.GL2 |
gl2 |
(package private) java.lang.String |
imageFile |
IView |
view |
| Constructor and Description |
|---|
IGraphicsGL2() |
| Modifier and Type | Method and Description |
|---|---|
void |
ambient(float[] rgba) |
void |
ambient(float r,
float g,
float b) |
void |
ambient(float r,
float g,
float b,
float a) |
void |
ambient(IColor c) |
void |
ambient(IColor c,
float alpha) |
void |
beginTexture(ITexture tex) |
void |
clr(float[] rgba)
fill color (array of 4 float in order of r, g, b, a)
|
void |
clr(float red,
float green,
float blue)
fill color (float 0-255)
|
void |
clr(float red,
float green,
float blue,
float alpha)
fill color (float 0-255)
|
void |
clr(IColor c)
fill color
|
void |
clr(IColor c,
float alpha) |
void |
diffuse(float[] rgba) |
void |
diffuse(float r,
float g,
float b) |
void |
diffuse(float r,
float g,
float b,
float a)
diffuse color is same with color(Color c)
|
void |
diffuse(IColor c) |
void |
diffuse(IColor c,
float alpha) |
void |
disableLight() |
void |
draw(java.util.ArrayList<IGraphicI> objects,
IView v) |
void |
drawBG(com.jogamp.opengl.GL gl,
IView v) |
void |
drawLineLoop(IVec[] p) |
void |
drawLines(IVec[] p) |
void |
drawLineStrip(IVec[] p) |
void |
drawPoint(IVec p) |
void |
drawPoints(IVec[] p) |
void |
drawPolygon(IVec[] pts) |
void |
drawPolygon(IVec[] pts,
IColor[] clr,
float alpha,
boolean light) |
void |
drawPolygon(IVec[] pts,
IVec[] nml) |
void |
drawPolygon(IVec[] pts,
IVec[] nml,
IColor[] clr,
float alpha,
boolean light) |
void |
drawPolygon(IVec[] pts,
IVec[] nml,
IVec2f[] uv) |
void |
drawPolygon(IVec[] pts,
IVec2f[] uv) |
void |
drawQuadMatrix(IVec[][] pts) |
void |
drawQuadMatrix(IVec[][] pts,
IColor[][] clr,
float alpha,
boolean light) |
void |
drawQuadMatrix(IVec[][] pts,
IVec[][] nml) |
void |
drawQuadMatrix(IVec[][] pts,
IVec[][] nml,
IColor[][] clr,
float alpha,
boolean light) |
void |
drawQuadMatrix(IVec[][] pts,
IVec[][] nml,
IVec2f[][] uv) |
void |
drawQuadMatrix(IVec[][] pts,
IVec2f[][] uv) |
void |
drawQuads(IVec[] pts) |
void |
drawQuads(IVec[] pts,
IColor[] clr,
float alpha,
boolean light) |
void |
drawQuads(IVec[] pts,
IVec[] nml) |
void |
drawQuads(IVec[] pts,
IVec[] nml,
IColor[] clr,
float alpha,
boolean light) |
void |
drawQuads(IVec[] pts,
IVec[] nml,
IVec2f[] uv) |
void |
drawQuads(IVec[] pts,
IVec2f[] uv) |
void |
drawQuadStrip(IVec[] pts) |
void |
drawQuadStrip(IVec[] pts,
IColor[] clr,
float alpha,
boolean light) |
void |
drawQuadStrip(IVec[] pts,
IVec[] nml) |
void |
drawQuadStrip(IVec[] pts,
IVec[] nml,
IColor[] clr,
float alpha,
boolean light) |
void |
drawQuadStrip(IVec[] pts,
IVec[] nml,
IVec2f[] uv) |
void |
drawQuadStrip(IVec[] pts,
IVec2f[] uv) |
void |
drawTriangleFan(IVec[] pts) |
void |
drawTriangleFan(IVec[] pts,
IColor[] clr,
float alpha,
boolean light) |
void |
drawTriangleFan(IVec[] pts,
IVec[] nml) |
void |
drawTriangleFan(IVec[] pts,
IVec[] nml,
IColor[] clr,
float alpha,
boolean light) |
void |
drawTriangleFan(IVec[] pts,
IVec[] nml,
IVec2f[] uv) |
void |
drawTriangleFan(IVec[] pts,
IVec2f[] uv) |
void |
drawTriangles(IVec[] pts) |
void |
drawTriangles(IVec[] pts,
IColor[] clr,
float alpha,
boolean light) |
void |
drawTriangles(IVec[] pts,
IVec[] nml) |
void |
drawTriangles(IVec[] pts,
IVec[] nml,
IColor[] clr,
float alpha,
boolean light) |
void |
drawTriangles(IVec[] pts,
IVec[] nml,
IVec2f[] uv) |
void |
drawTriangles(IVec[] pts,
IVec2f[] uv) |
void |
drawTriangleStrip(IVec[] pts) |
void |
drawTriangleStrip(IVec[] pts,
IColor[] clr,
float alpha,
boolean light) |
void |
drawTriangleStrip(IVec[] pts,
IVec[] nml) |
void |
drawTriangleStrip(IVec[] pts,
IVec[] nml,
IColor[] clr,
float alpha,
boolean light) |
void |
drawTriangleStrip(IVec[] pts,
IVec[] nml,
IVec2f[] uv) |
void |
drawTriangleStrip(IVec[] pts,
IVec2f[] uv) |
void |
drawView(IView view) |
void |
emissive(float[] rgba) |
void |
emissive(float r,
float g,
float b) |
void |
emissive(float r,
float g,
float b,
float a) |
void |
emissive(IColor c) |
void |
emissive(IColor c,
float alpha) |
void |
enableLight() |
void |
endTexture() |
boolean |
firstDraw()
check if this is the first time frame to draw
|
void |
firstDraw(boolean f)
set the first draw flag
|
com.jogamp.opengl.GL |
getGL() |
java.awt.Graphics2D |
getGraphics() |
ITextureGraphicGL |
getTextureGraphic(java.awt.image.BufferedImage image) |
ITextureGraphicGL |
getTextureGraphic(java.lang.String filename) |
void |
pointSize(float sz) |
void |
setBGImage(java.lang.String imageFilename) |
void |
setGL(com.jogamp.opengl.GL gl) |
void |
setGraphics(java.awt.Graphics2D g) |
void |
shininess(float s) |
void |
specular(float[] rgba) |
void |
specular(float r,
float g,
float b) |
void |
specular(float r,
float g,
float b,
float a) |
void |
specular(IColor c) |
void |
specular(IColor c,
float alpha) |
void |
stroke(float[] rgba)
stroke color (array of 4 float in order of r, g, b, a)
|
void |
stroke(float red,
float green,
float blue)
stroke color (float 0-255)
|
void |
stroke(float red,
float green,
float blue,
float alpha)
stroke color (float 0-255)
|
void |
stroke(IColor c)
in GL, stroke color and fill color use both same glColor
|
IGraphicMode.GraphicType |
type() |
IView |
view() |
void |
weight(double w) |
void |
weight(float w) |
public static float[] defaultGLLightPosition
public static float[] defaultGLAmbientLight
public static float[] defaultGLDiffuseLight
public static float[] defaultGLSpecularLight
public static boolean defaultGLTwoSidedLighting
public com.jogamp.opengl.GL gl
public com.jogamp.opengl.GL2 gl2
public java.awt.Graphics2D g
public IView view
public double[][][] bgColor
public com.jogamp.opengl.util.texture.Texture bgTexture
public int bgTextureID
public boolean firstDraw
java.lang.String imageFile
public void setGL(com.jogamp.opengl.GL gl)
setGL in interface IGraphicsGLpublic void setGraphics(java.awt.Graphics2D g)
public com.jogamp.opengl.GL getGL()
getGL in interface IGraphicsGLpublic java.awt.Graphics2D getGraphics()
public IGraphicMode.GraphicType type()
public void setBGImage(java.lang.String imageFilename)
setBGImage in interface IGraphicsGLpublic void drawBG(com.jogamp.opengl.GL gl,
IView v)
public void drawView(IView view)
public boolean firstDraw()
IGraphicspublic void firstDraw(boolean f)
IGraphicspublic void clr(float[] rgba)
IGraphicspublic void clr(float red,
float green,
float blue,
float alpha)
IGraphicspublic void clr(float red,
float green,
float blue)
IGraphicspublic void clr(IColor c, float alpha)
public void stroke(IColor c)
public void stroke(float[] rgba)
IGraphicspublic void stroke(float red,
float green,
float blue,
float alpha)
IGraphicspublic void stroke(float red,
float green,
float blue)
IGraphicspublic void weight(double w)
public void diffuse(float[] rgba)
diffuse in interface IGraphics3Dpublic void diffuse(float r,
float g,
float b,
float a)
IGraphics3Ddiffuse in interface IGraphics3Dpublic void diffuse(float r,
float g,
float b)
diffuse in interface IGraphics3Dpublic void diffuse(IColor c)
diffuse in interface IGraphics3Dpublic void diffuse(IColor c, float alpha)
diffuse in interface IGraphics3Dpublic void ambient(float[] rgba)
ambient in interface IGraphics3Dpublic void ambient(float r,
float g,
float b,
float a)
ambient in interface IGraphics3Dpublic void ambient(float r,
float g,
float b)
ambient in interface IGraphics3Dpublic void ambient(IColor c)
ambient in interface IGraphics3Dpublic void ambient(IColor c, float alpha)
ambient in interface IGraphics3Dpublic void specular(float[] rgba)
specular in interface IGraphics3Dpublic void specular(float r,
float g,
float b,
float a)
specular in interface IGraphics3Dpublic void specular(float r,
float g,
float b)
specular in interface IGraphics3Dpublic void specular(IColor c)
specular in interface IGraphics3Dpublic void specular(IColor c, float alpha)
specular in interface IGraphics3Dpublic void emissive(float[] rgba)
emissive in interface IGraphics3Dpublic void emissive(float r,
float g,
float b,
float a)
emissive in interface IGraphics3Dpublic void emissive(float r,
float g,
float b)
emissive in interface IGraphics3Dpublic void emissive(IColor c)
emissive in interface IGraphics3Dpublic void emissive(IColor c, float alpha)
emissive in interface IGraphics3Dpublic void shininess(float s)
shininess in interface IGraphics3Dpublic void enableLight()
enableLight in interface IGraphics3Dpublic void disableLight()
disableLight in interface IGraphics3Dpublic void pointSize(float sz)
pointSize in interface IGraphics3Dpublic void drawPoint(IVec p)
drawPoint in interface IGraphics3Dpublic void drawPoints(IVec[] p)
drawPoints in interface IGraphics3Dpublic void drawLines(IVec[] p)
drawLines in interface IGraphics3Dpublic void drawLineStrip(IVec[] p)
drawLineStrip in interface IGraphics3Dpublic void drawLineLoop(IVec[] p)
drawLineLoop in interface IGraphics3Dpublic void drawPolygon(IVec[] pts, IVec[] nml)
drawPolygon in interface IGraphics3Dpublic void drawPolygon(IVec[] pts, IVec[] nml, IVec2f[] uv)
drawPolygon in interface IGraphics3Dpublic void drawPolygon(IVec[] pts, IVec[] nml, IColor[] clr, float alpha, boolean light)
drawPolygon in interface IGraphics3Dpublic void drawPolygon(IVec[] pts)
drawPolygon in interface IGraphics3Dpublic void drawPolygon(IVec[] pts, IVec2f[] uv)
drawPolygon in interface IGraphics3Dpublic void drawPolygon(IVec[] pts, IColor[] clr, float alpha, boolean light)
drawPolygon in interface IGraphics3Dpublic void drawQuads(IVec[] pts)
drawQuads in interface IGraphics3Dpublic void drawQuads(IVec[] pts, IVec2f[] uv)
drawQuads in interface IGraphics3Dpublic void drawQuads(IVec[] pts, IColor[] clr, float alpha, boolean light)
drawQuads in interface IGraphics3Dpublic void drawQuads(IVec[] pts, IVec[] nml)
drawQuads in interface IGraphics3Dpublic void drawQuads(IVec[] pts, IVec[] nml, IVec2f[] uv)
drawQuads in interface IGraphics3Dpublic void drawQuads(IVec[] pts, IVec[] nml, IColor[] clr, float alpha, boolean light)
drawQuads in interface IGraphics3Dpublic void drawQuadStrip(IVec[] pts)
drawQuadStrip in interface IGraphics3Dpublic void drawQuadStrip(IVec[] pts, IVec2f[] uv)
drawQuadStrip in interface IGraphics3Dpublic void drawQuadStrip(IVec[] pts, IColor[] clr, float alpha, boolean light)
drawQuadStrip in interface IGraphics3Dpublic void drawQuadStrip(IVec[] pts, IVec[] nml)
drawQuadStrip in interface IGraphics3Dpublic void drawQuadStrip(IVec[] pts, IVec[] nml, IVec2f[] uv)
drawQuadStrip in interface IGraphics3Dpublic void drawQuadStrip(IVec[] pts, IVec[] nml, IColor[] clr, float alpha, boolean light)
drawQuadStrip in interface IGraphics3Dpublic void drawQuadMatrix(IVec[][] pts)
drawQuadMatrix in interface IGraphics3Dpublic void drawQuadMatrix(IVec[][] pts, IVec2f[][] uv)
drawQuadMatrix in interface IGraphics3Dpublic void drawQuadMatrix(IVec[][] pts, IColor[][] clr, float alpha, boolean light)
drawQuadMatrix in interface IGraphics3Dpublic void drawQuadMatrix(IVec[][] pts, IVec[][] nml)
drawQuadMatrix in interface IGraphics3Dpublic void drawQuadMatrix(IVec[][] pts, IVec[][] nml, IVec2f[][] uv)
drawQuadMatrix in interface IGraphics3Dpublic void drawQuadMatrix(IVec[][] pts, IVec[][] nml, IColor[][] clr, float alpha, boolean light)
drawQuadMatrix in interface IGraphics3Dpublic void drawTriangles(IVec[] pts, IVec[] nml)
drawTriangles in interface IGraphics3Dpublic void drawTriangles(IVec[] pts, IVec[] nml, IVec2f[] uv)
drawTriangles in interface IGraphics3Dpublic void drawTriangles(IVec[] pts, IVec[] nml, IColor[] clr, float alpha, boolean light)
drawTriangles in interface IGraphics3Dpublic void drawTriangles(IVec[] pts)
drawTriangles in interface IGraphics3Dpublic void drawTriangles(IVec[] pts, IVec2f[] uv)
drawTriangles in interface IGraphics3Dpublic void drawTriangles(IVec[] pts, IColor[] clr, float alpha, boolean light)
drawTriangles in interface IGraphics3Dpublic void drawTriangleStrip(IVec[] pts, IVec[] nml)
drawTriangleStrip in interface IGraphics3Dpublic void drawTriangleStrip(IVec[] pts, IVec[] nml, IVec2f[] uv)
drawTriangleStrip in interface IGraphics3Dpublic void drawTriangleStrip(IVec[] pts, IVec[] nml, IColor[] clr, float alpha, boolean light)
drawTriangleStrip in interface IGraphics3Dpublic void drawTriangleStrip(IVec[] pts)
drawTriangleStrip in interface IGraphics3Dpublic void drawTriangleStrip(IVec[] pts, IVec2f[] uv)
drawTriangleStrip in interface IGraphics3Dpublic void drawTriangleStrip(IVec[] pts, IColor[] clr, float alpha, boolean light)
drawTriangleStrip in interface IGraphics3Dpublic void drawTriangleFan(IVec[] pts, IVec[] nml)
drawTriangleFan in interface IGraphics3Dpublic void drawTriangleFan(IVec[] pts, IVec[] nml, IVec2f[] uv)
drawTriangleFan in interface IGraphics3Dpublic void drawTriangleFan(IVec[] pts, IVec[] nml, IColor[] clr, float alpha, boolean light)
drawTriangleFan in interface IGraphics3Dpublic void drawTriangleFan(IVec[] pts)
drawTriangleFan in interface IGraphics3Dpublic void drawTriangleFan(IVec[] pts, IVec2f[] uv)
drawTriangleFan in interface IGraphics3Dpublic void drawTriangleFan(IVec[] pts, IColor[] clr, float alpha, boolean light)
drawTriangleFan in interface IGraphics3Dpublic void beginTexture(ITexture tex)
beginTexture in interface IGraphics3Dpublic void endTexture()
endTexture in interface IGraphics3Dpublic ITextureGraphicGL getTextureGraphic(java.lang.String filename)
getTextureGraphic in interface IGraphicsGLpublic ITextureGraphicGL getTextureGraphic(java.awt.image.BufferedImage image)
getTextureGraphic in interface IGraphicsGL