Constructor and Description |
---|
ColorState()
Constructs color state.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Applies this OpenGL state.
|
int |
getAttributeBits()
Gets the OpenGL attribute bits for this state.
|
java.awt.Color |
getColor()
Gets the current color.
|
int |
getShadeModel()
Gets the shade model.
|
boolean |
hasColor()
Determines whether current color is set.
|
boolean |
hasShadeModel()
Determines whether shade model is set.
|
void |
setColor(java.awt.Color color)
Sets the current color.
|
void |
setShadeModel(int shadeModel)
Sets the shade model.
|
void |
unsetColor()
Unsets the current color.
|
void |
unsetShadeModel()
Unsets the shade model.
|
public boolean hasColor()
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- the current color.public void unsetColor()
public boolean hasShadeModel()
public int getShadeModel()
public void setShadeModel(int shadeModel)
shadeModel
- the shade model.public void unsetShadeModel()
public void apply()
State
public int getAttributeBits()
State
State.apply()
. If these bits are passed to glPushAttrib before
calling State.apply()
, then glPopAttrib will restore any OpenGL
state that is changed by that method.getAttributeBits
in interface State