codeanticode.glgraphics
Class GLTextureWindow

java.lang.Object
  extended by codeanticode.glgraphics.GLWindow
      extended by codeanticode.glgraphics.GLTextureWindow

public class GLTextureWindow
extends GLWindow

An undecorated ligheweight AWT window to show just a single texture created in the main OpenGL context of the parent PApplet. The renderer in parent must be of type GLGraphics.


Field Summary
 int frameCount
           
 float frameRate
           
 
Constructor Summary
GLTextureWindow(processing.core.PApplet parent, int x, int y, int w, int h)
          Creates a visible instance of GLTextureWindow with the specified size (w, h) and position (x, y), which will show texture tex in it.
GLTextureWindow(processing.core.PApplet parent, int x, int y, int w, int h, boolean v)
           
GLTextureWindow(processing.core.PApplet parent, int x, int y, int w, int h, boolean v, boolean b)
           
GLTextureWindow(processing.core.PApplet parent, java.lang.String s, int x, int y, int w, int h, boolean v, boolean b, boolean r)
          Creates an instance of GLTextureWindow with the specified size (w, h) and position (x, y), which will show texture tex in it.
 
Method Summary
 void delete()
           
 void frameRate(float newRateTarget)
           
 int getHeight()
          Returns the current height of the window.
 int getWidth()
          Returns the current width of the window.
 int getX()
          Returns the current X coordinate of the window (upper left corner).
 int getY()
          Returns the current Y coordinate of the window (upper left corner).
 void hide()
          Hides the window.
 void init()
           
 boolean isInitialized()
          Returns true if the window and all necessary elements have been initialized.
 boolean isVisible()
          Returns whether the window is visible or not.
 boolean ready()
          Returns true if the renderer is ready to draw.
 void render()
          Draws the window, if the renderer has been initialized.
 void setLocation(int x, int y)
          Sets the window location.
 void setOverride(boolean override)
          Sets the override property to the desired value.
 void setTexture(GLTexture tex)
           
 void show()
          Shows the window.
 void tint(int color)
          Sets the texture tint color.
 void yeah()
           
 
Methods inherited from class codeanticode.glgraphics.GLWindow
getOverride
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frameRate

public float frameRate

frameCount

public int frameCount
Constructor Detail

GLTextureWindow

public GLTextureWindow(processing.core.PApplet parent,
                       int x,
                       int y,
                       int w,
                       int h)
Creates a visible instance of GLTextureWindow with the specified size (w, h) and position (x, y), which will show texture tex in it.

Parameters:
parent - PApplet
tex - GLTexture
x - int
y - int
w - int
h - int

GLTextureWindow

public GLTextureWindow(processing.core.PApplet parent,
                       int x,
                       int y,
                       int w,
                       int h,
                       boolean v)

GLTextureWindow

public GLTextureWindow(processing.core.PApplet parent,
                       int x,
                       int y,
                       int w,
                       int h,
                       boolean v,
                       boolean b)

GLTextureWindow

public GLTextureWindow(processing.core.PApplet parent,
                       java.lang.String s,
                       int x,
                       int y,
                       int w,
                       int h,
                       boolean v,
                       boolean b,
                       boolean r)
Creates an instance of GLTextureWindow with the specified size (w, h) and position (x, y), which will show texture tex in it.

Parameters:
parent - PApplet
tex - GLTexture
name - String
x - int
y - int
w - int
h - int
v - boolean
d - boolean
r - boolean
Method Detail

init

public void init()
Specified by:
init in class GLWindow

frameRate

public void frameRate(float newRateTarget)

delete

public void delete()

setTexture

public void setTexture(GLTexture tex)

setOverride

public void setOverride(boolean override)
Sets the override property to the desired value.

Overrides:
setOverride in class GLWindow
Parameters:
override - boolean

show

public void show()
Shows the window.

Specified by:
show in class GLWindow

hide

public void hide()
Hides the window.

Specified by:
hide in class GLWindow

isVisible

public boolean isVisible()
Returns whether the window is visible or not.

Specified by:
isVisible in class GLWindow
Returns:
boolean

getWidth

public int getWidth()
Returns the current width of the window.

Returns:
int

getHeight

public int getHeight()
Returns the current height of the window.

Returns:
int

getX

public int getX()
Returns the current X coordinate of the window (upper left corner).

Returns:
int

getY

public int getY()
Returns the current Y coordinate of the window (upper left corner).

Returns:
int

tint

public void tint(int color)
Sets the texture tint color.

Parameters:
int - color

ready

public boolean ready()
Returns true if the renderer is ready to draw.

Specified by:
ready in class GLWindow
Returns:
boolean

isInitialized

public boolean isInitialized()
Returns true if the window and all necessary elements have been initialized.

Overrides:
isInitialized in class GLWindow
Returns:
boolean

yeah

public void yeah()

render

public void render()
Draws the window, if the renderer has been initialized.

Specified by:
render in class GLWindow

setLocation

public void setLocation(int x,
                        int y)
Sets the window location.

Parameters:
x - int
y - int


processing library GLGraphics by Andres Colubri. (c) 2008-2011