32 #ifndef Shader_INCLUDE_ONCE 33 #define Shader_INCLUDE_ONCE 67 VL_DEBUG_SET_OBJECT_NAME()
101 VL_DEBUG_SET_OBJECT_NAME()
135 VL_DEBUG_SET_OBJECT_NAME()
169 VL_DEBUG_SET_OBJECT_NAME()
203 VL_DEBUG_SET_OBJECT_NAME()
218 mPostColorMatrixRedScale = 1;
219 mPostColorMatrixGreenScale = 1;
220 mPostColorMatrixBlueScale = 1;
221 mPostColorMatrixAlphaScale = 1;
222 mPostColorMatrixRedBias = 0;
223 mPostColorMatrixGreenBias = 0;
224 mPostColorMatrixBlueBias = 0;
225 mPostColorMatrixAlphaBias = 0;
226 mPostConvolutionRedScale = 1;
227 mPostConvolutionGreenScale = 1;
228 mPostConvolutionBlueScale = 1;
229 mPostConvolutionAlphaScale = 1;
230 mPostConvolutionRedBias = 0;
231 mPostConvolutionGreenBias = 0;
232 mPostConvolutionBlueBias = 0;
233 mPostConvolutionAlphaBias = 0;
354 VL_DEBUG_SET_OBJECT_NAME()
402 VL_DEBUG_SET_OBJECT_NAME()
435 VL_DEBUG_SET_OBJECT_NAME()
468 VL_DEBUG_SET_OBJECT_NAME()
475 void set(
EFunction depthfunc) { mDepthFunc = depthfunc; }
501 VL_DEBUG_SET_OBJECT_NAME()
508 void set(
bool depthmask) { mDepthMask = depthmask; }
534 VL_DEBUG_SET_OBJECT_NAME()
574 VL_DEBUG_SET_OBJECT_NAME()
606 mSrcRGB(src_rgb), mDstRGB(dst_rgb), mSrcAlpha(src_alpha), mDstAlpha(dst_alpha)
608 VL_DEBUG_SET_OBJECT_NAME()
619 void set(
EBlendFactor src_rgba,
EBlendFactor dst_rgba) { mSrcRGB = src_rgba; mSrcAlpha = src_rgba; mDstRGB = dst_rgba; mDstAlpha = dst_rgba; }
664 VL_DEBUG_SET_OBJECT_NAME()
673 void set(
EBlendEquation mode_rgba) { mModeRGB = mode_rgba; mModeAlpha = mode_rgba; }
702 SampleCoverage(GLclampf value=1.0f,
bool invert=
false): mValue(value), mInvert(invert)
704 VL_DEBUG_SET_OBJECT_NAME()
711 void set(GLclampf value,
bool invert) { mValue = value; mInvert = invert; }
717 GLclampf
value()
const {
return mValue; }
744 VL_DEBUG_SET_OBJECT_NAME()
751 void set(
EFunction alphafunc,
float ref_value) { mAlphaFunc = alphafunc; mRefValue = ref_value; }
783 void multiplyTransparency(
float alpha);
784 float getMinimumAlpha()
const;
786 void setTransparency(
float alpha);
787 void setFrontTransparency(
float alpha);
788 void setBackTransparency(
float alpha);
789 void setFrontFlatColor(
const fvec4& color);
790 void setBackFlatColor(
const fvec4& color);
791 void setFlatColor(
const fvec4& color);
797 void setShininess(
float shininess) { mFrontShininess = mBackShininess = shininess; }
866 VL_DEBUG_SET_OBJECT_NAME()
913 mColor(color), mMode(mode), mDensity(density), mStart(start), mEnd(end)
915 VL_DEBUG_SET_OBJECT_NAME()
922 void set(
EFogMode mode,
const fvec4& color,
float density,
float start,
float end) { mColor = color; mMode = mode; mDensity = density; mStart = start; mEnd = end; }
940 float start()
const {
return mStart; }
942 float end()
const {
return mEnd; }
970 VL_DEBUG_SET_OBJECT_NAME()
979 void set(
float factor,
float units) { mFactor = factor; mUnits = units; }
987 float units()
const {
return mUnits; }
1012 VL_DEBUG_SET_OBJECT_NAME()
1045 VL_DEBUG_SET_OBJECT_NAME()
1050 VL_DEBUG_SET_OBJECT_NAME()
1057 void set(
float znear,
float zfar) { mZNear = znear; mZFar = zfar; }
1065 float zFar()
const {
return mZFar; }
1090 VL_DEBUG_SET_OBJECT_NAME()
1097 void set(
float linewidth) { mLineWidth = linewidth; }
1123 VL_DEBUG_SET_OBJECT_NAME()
1130 void set(
float pointsize) { mPointSize = pointsize; }
1162 void set(
const unsigned char* mask);
1164 const unsigned char*
mask()
const {
return mMask; }
1174 unsigned char mMask[32*32/8];
1186 LineStipple(
int factor=1, GLushort pattern=~(GLushort)0): mFactor(factor), mPattern(pattern)
1188 VL_DEBUG_SET_OBJECT_NAME()
1195 void set(
int factor, GLushort pattern) { mFactor = factor; mPattern = pattern; }
1227 mDistanceAttenuation(distanceattenuation), mSizeMin(sizemin), mSizeMax(sizemax), mFadeThresholdSize(fadethresholdsize),
1230 VL_DEBUG_SET_OBJECT_NAME()
1236 void set(
float sizemin,
float sizemax,
float fadethresholdsize,
fvec3 distanceattenuation) { mDistanceAttenuation = distanceattenuation; mSizeMin = sizemin; mSizeMax = sizemax; mFadeThresholdSize = fadethresholdsize; }
1285 mFunction_Front(function), mFunction_Back(function),
1286 mRefValue_Front(refvalue), mRefValue_Back(refvalue),
1287 mMask_Front(mask), mMask_Back(mask)
1289 VL_DEBUG_SET_OBJECT_NAME()
1300 mFunction_Front =
function;
1301 mRefValue_Front = refvalue;
1306 mFunction_Back =
function;
1307 mRefValue_Back = refvalue;
1352 mSFail_Front(sfail), mSFail_Back(sfail),
1353 mDpFail_Front(dpfail), mDpFail_Back(dpfail),
1354 mDpPass_Front(dppass), mDpPass_Back(dppass)
1356 VL_DEBUG_SET_OBJECT_NAME()
1367 mSFail_Front = sfail;
1368 mDpFail_Front = dpfail;
1369 mDpPass_Front = dppass;
1373 mSFail_Back = sfail;
1374 mDpFail_Back = dpfail;
1375 mDpPass_Back = dppass;
1418 StencilMask(
unsigned int mask=~(
unsigned int)0): mMask_Front(mask), mMask_Back(mask)
1420 VL_DEBUG_SET_OBJECT_NAME()
1462 VL_DEBUG_SET_OBJECT_NAME()
1469 void set(
const fvec4& blendcolor) { mBlendColor = blendcolor; }
1493 ColorMask(
bool red=
true,
bool green=
true,
bool blue=
true,
bool alpha=
true): mRed(red), mGreen(green), mBlue(blue), mAlpha(alpha)
1495 VL_DEBUG_SET_OBJECT_NAME()
1502 void set(
bool red,
bool green,
bool blue,
bool alpha) { mRed = red; mGreen = green; mBlue = blue; mAlpha = alpha; }
1512 bool red()
const {
return mRed; }
1516 bool blue()
const {
return mBlue; }
1754 VL_DEBUG_SET_OBJECT_NAME()
1773 bool hasTexture()
const;
1804 virtual void updateShader(
Shader* shader,
Camera* camera, real cur_time) = 0;
1836 Shader& operator=(
const Shader&) {
return *
this; }
1857 super::operator=(other);
1864 if (mRenderStateSet.get() ==
NULL)
1869 mRenderStateSet =
NULL;
1873 if (mEnableSet.get() ==
NULL)
1882 if (mUniformSet.get() ==
NULL)
1893 #ifdef VL_USER_DATA_SHADER 1894 mShaderUserData = other.mShaderUserData;
1911 super::operator=(other);
1918 if (mRenderStateSet.get() ==
NULL)
1923 mRenderStateSet =
NULL;
1927 if (mEnableSet.get() ==
NULL)
1936 if (mUniformSet.get() ==
NULL)
1948 #ifdef VL_USER_DATA_SHADER 1949 mShaderUserData = other.mShaderUserData;
1959 eraseAllRenderStates();
1979 const Hint*
getHint()
const {
if (!getRenderStateSet())
return NULL;
else return static_cast<const Hint*
>( getRenderStateSet()->renderState(
RS_Hint ) ); }
2039 const Fog*
getFog()
const {
if (!getRenderStateSet())
return NULL;
else return static_cast<const Fog*
>( getRenderStateSet()->renderState(
RS_Fog ) ); }
2040 Fog*
getFog() {
if (!getRenderStateSet())
return NULL;
else return static_cast<Fog*
>( getRenderStateSet()->renderState(
RS_Fog ) ); }
2104 const VertexAttrib* getVertexAttrib(
int attr_index)
const;
2110 Light* gocLight(
int light_index);
2112 const Light* getLight(
int light_index)
const;
2114 Light* getLight(
int light_index);
2118 ClipPlane* gocClipPlane(
int plane_index);
2120 const ClipPlane* getClipPlane(
int plane_index)
const;
2122 ClipPlane* getClipPlane(
int plane_index);
2134 TexEnv* gocTexEnv(
int unit_index);
2142 TexGen* gocTexGen(
int unit_index);
2162 const std::vector<EEnable>&
enables()
const {
return getEnableSet()->enables(); }
2164 int isEnabled(
EEnable capability)
const {
if (!getEnableSet())
return false;
return getEnableSet()->isEnabled(capability); }
2166 void disableAll() {
if (getEnableSet()) getEnableSet()->disableAll(); }
2168 bool isBlendingEnabled()
const {
if (!getEnableSet())
return false;
return getEnableSet()->isBlendingEnabled(); }
2205 const std::vector< ref<Uniform> >&
uniforms()
const {
return getUniformSet()->uniforms(); }
2208 void eraseUniform(
const char* name) { gocUniformSet()->eraseUniform(name); }
2335 #ifdef VL_USER_DATA_SHADER 2337 const Object* shaderUserData()
const {
return mShaderUserData.get(); }
2338 Object* shaderUserData() {
return mShaderUserData.get(); }
2339 void setShaderUserData(
Object* user_data) { mShaderUserData = user_data; }
EStencilOp sFail_Back() const
const Hint * getHint() const
void setFogHint(EHintMode mode)
EStencilOp dpFail_Front() const
void setFrontSpecular(const fvec4 &color)
const fvec4 & objectPlaneQ() const
UniformSet * gocUniformSet()
Returns the UniformSet installed (creating it if no UniformSet has been installed) ...
void setOperand1Alpha(ETexEnvOperand operand)
void setBackFace(EPolygonMode backface)
BlendColor * getBlendColor()
BlendEquation * getBlendEquation()
ETexGenMode genModeR() const
virtual ERenderState type() const
void setPointSpriteCoordReplace(bool replace)
virtual ref< RenderState > clone() const
void setCombineRGB(ETexEnvMode combineRGB)
void setLastUpdateTime(real time)
Used internally.
void setRGBScale(float rgbscale)
bool pointSpriteCoordReplace() const
void setTexture(Texture *texture)
The texture sampler by a texture unit.
ETexEnvOperand mOperand2RGB
virtual ref< RenderState > clone() const
virtual ref< RenderState > clone() const
float mPostConvolutionAlphaScale
void setDensity(float density)
RenderState wrapping the OpenGL function glPointParameter(), see also http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml for more information.
void setSource1Alpha(ETexEnvSource source)
virtual ref< RenderState > clone() const
RenderState wrapping the OpenGL function glStencilOp() and glStencilOpSeparate(), see also http://www...
void setDepthBias(float depth_bias)
ShadeModel * getShadeModel()
float mPostColorMatrixAlphaScale
virtual ERenderState type() const
int isEnabled(EEnable capability) const
void setPointSmoothHint(EHintMode mode)
void setLodBias(float lodbias)
Vector3< float > fvec3
A 3 components vector with float precision.
virtual ERenderState type() const
ETexEnvOperand operand2RGB() const
const DepthRange * getDepthRange() const
void setPostColorMatrixGreenScale(float scale)
void setAlphaBias(float alpha_bias)
bool useCameraRotationInverse() const
void setFadeThresholdSize(float threshold)
EBlendFactor dstRGB() const
void setIndexOffset(int index_offset)
const RenderState * renderState(ERenderState type, int index=0) const
ref< RenderStateSet > mRenderStateSet
void setLineSmoothHint(EHintMode mode)
RenderStateSet * gocRenderStateSet()
virtual ref< RenderState > clone() const
const StencilFunc * getStencilFunc() const
const fvec4 & value() const
LineStipple * getLineStipple()
RenderState wrapping the OpenGL function glDepthFunc(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml for more information.
const PolygonOffset * getPolygonOffset() const
EShadeModel shadeModel() const
static void reset(int index, OpenGLContext *ctx)
Reset texture sampler to it's default disabled state.
RenderState wrapping the OpenGL function glHint(), see also http://www.opengl.org/sdk/docs/man/xhtml/...
ETexEnvSource mSource2Alpha
Vector4< float > fvec4
A 4 components vector with float precision.
void setPostColorMatrixRedScale(float scale)
EPolygonMode backFace() const
void setBackDiffuse(const fvec4 &color)
void eraseAllUniforms()
Equivalent to gocUniformSet()->eraseAllUniforms(...)
EBlendFactor srcAlpha() const
void setPerspectiveCorrectionHint(EHintMode mode)
SecondaryColor * getSecondaryColor()
float frontShininess() const
StencilOp * getStencilOp()
RenderState wrapping the OpenGL function glPolygonOffset(), see also http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml for more information.
ETexEnvOperand mOperand1RGB
RenderState wrapping the OpenGL function glPolygonMode(), see also http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml for more information.
const fvec4 & backDiffuse() const
float postColorMatrixBlueScale() const
float postConvolutionAlphaBias() const
ref< Shader > deepCopy() const
Returns the deep copy of a Shader.
void setGreen(bool green)
EColorMaterial colorMaterial() const
FrontFace * getFrontFace()
RenderState wrapping the OpenGL function glNormal(), see also http://www.opengl.org/sdk/docs/man/xhtm...
void setPointSpriteCoordOrigin(EPointSpriteCoordOrigin orig)
void setSource0RGB(ETexEnvSource source)
ETexGenMode
Texture generation modes, see also http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml for more information.
void setFrontAmbient(const fvec4 &color)
LightModel * getLightModel()
virtual ERenderState type() const
void setPostConvolutionAlphaBias(float bias)
EnableSet * getEnableSet()
RenderState wrapping the OpenGL function glLogicOp(), see also http://www.opengl.org/sdk/docs/man/xht...
void setOperand1RGB(ETexEnvOperand operand)
RenderState wrapping the OpenGL function glLightModel(), see also http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml for more information.
ETexEnvSource source1RGB() const
float mPostColorMatrixBlueScale
virtual ref< RenderState > clone() const
const fvec4 & objectPlaneS() const
DepthRange * getDepthRange()
ShaderAnimator * shaderAnimator()
Returns the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation)...
void setEyePlaneR(const fvec4 &plane)
float fadeThresholdSize() const
RenderState wrapping the OpenGL function glBlendFunc(), see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml for more information.
RenderStateSlot * renderStates()
void setRenderStateSet(RenderStateSet *rss)
float postColorMatrixRedBias() const
float mPostColorMatrixBlueBias
ETexEnvSource mSource2RGB
float mPostConvolutionGreenBias
virtual ref< RenderState > clone() const
const ShaderAnimator * shaderAnimator() const
Returns the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation)...
PolygonOffset(float factor, float units)
Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard...
RenderState wrapping the OpenGL function glPolygonStipple(), see also http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml for more information.
void setAlpha(bool alpha)
Shader & deepCopyFrom(const Shader &other)
Performs a deep copy from the given Shader.
void setPostConvolutionBlueBias(float bias)
void setShininess(float shininess)
void setMapColor(bool map_color)
void setGenModeS(ETexGenMode mode)
ETexEnvSource source2RGB() const
float postConvolutionRedBias() const
RenderState wrapping the OpenGL function glFrontFace(), see also http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml for more information.
Base class for those render states which have more than one binding points like lights, clipping planes and texture unit states.
DepthMask * getDepthMask()
LogicOp(ELogicOp logicop=LO_COPY)
RenderState wrapping the OpenGL function glShadeModel(), see also http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml for more information.
float postConvolutionBlueBias() const
void setFrontShininess(float shininess)
void setPolygonSmoohtHint(EHintMode mode)
void setObjectPlaneS(const fvec4 &plane)
const Fog * getFog() const
float postConvolutionAlphaScale() const
const AlphaFunc * getAlphaFunc() const
EnableSet * gocEnableSet()
virtual ref< RenderState > clone() const
const std::vector< ref< Uniform > > & uniforms() const
Equivalent to gocUniformSet()->uniforms(...)
const fvec4 & eyePlaneS() const
virtual ref< RenderState > clone() const
TextureSampler * getTextureSampler(int unit_index)
void setZNear(float znear)
void setSpecular(const fvec4 &color)
const DepthFunc * getDepthFunc() const
void setRenderState(RenderState *renderstate, int index)
Wraps a GLSL program to which you can bind vertex, fragment and geometry shaders. ...
void setObjectPlaneQ(const fvec4 &plane)
virtual ERenderState type() const
ETexGenMode genModeS() const
StencilMask(unsigned int mask=~(unsigned int) 0)
void setUseCameraRotationInverse(bool use)
Set this to true when you want your cubemap to appear in world space rather than eye space...
virtual ERenderState type() const
Wraps an OpenGL texture object representing and managing all the supported texture types...
void setValue(const fvec3 &color)
PointSize * getPointSize()
virtual ERenderState type() const
PixelTransfer * getPixelTransfer()
virtual ERenderState type() const
const TexEnv * getTexEnv(int unit_index) const
float postColorMatrixGreenBias() const
void setSource2RGB(ETexEnvSource source)
RenderState wrapping the OpenGL function glDepthMask(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDepthMask.xml for more information.
EBlendFactor srcRGB() const
virtual ERenderState type() const
EFrontFace frontFace() const
void setRedBias(float red_bias)
virtual ERenderState type() const
float postConvolutionRedScale() const
const fvec4 & color() const
const Color * getColor() const
virtual ref< RenderState > clone() const
ETexEnvOperand mOperand0Alpha
BlendEquation(EBlendEquation mode_rgb=BE_FUNC_ADD, EBlendEquation mode_alpha=BE_FUNC_ADD)
virtual ERenderState type() const
void setGenModeT(ETexGenMode mode)
void setBackSpecular(const fvec4 &color)
fvec3 distanceAttenuation() const
const ShadeModel * getShadeModel() const
ETexEnvSource mSource1Alpha
ColorMask(bool red=true, bool green=true, bool blue=true, bool alpha=true)
float postConvolutionBlueScale() const
const PointParameter * getPointParameter() const
void setBackEmission(const fvec4 &color)
const EnableSet * getEnableSet() const
RenderStateSet & shallowCopyFrom(const RenderStateSet &other)
StencilOp(EStencilOp sfail=SO_KEEP, EStencilOp dpfail=SO_KEEP, EStencilOp dppass=SO_KEEP)
Texture * texture()
The texture sampler by a texture unit.
void setPostConvolutionAlphaScale(float scale)
ETexEnvSource source2Alpha() const
const fvec4 & objectPlaneR() const
void setOperand2RGB(ETexEnvOperand operand)
virtual ref< RenderState > clone() const
virtual ref< RenderState > clone() const
RenderState * renderState(ERenderState type, int index=0)
EHintMode mPolygonSmoothHint
void setPostColorMatrixRedBias(float bias)
Uniform * gocUniform(const char *name)
Equivalent to gocUniformSet()->gocUniform(...)
RenderState wrapping the OpenGL function glPixelTransfer(), see also http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml for more information.
EHintMode perspectiveCorrectionHint() const
void setColor(const fvec4 &color)
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
bool isEnabled() const
Whether the ShaderAnimator is enabled or not.
void setShaderAnimator(ShaderAnimator *animator)
Installs the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation)...
virtual void apply(int index, const Camera *, OpenGLContext *ctx) const
The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it...
EColorMaterial mColorMaterial
void eraseRenderState(RenderState *rs, int index)
fvec3 mDistanceAttenuation
size_t renderStatesCount() const
void setIndexShift(int index_shift)
virtual ERenderState type() const
void disable(EEnable capability)
BlendFunc(EBlendFactor src_rgb=BF_SRC_ALPHA, EBlendFactor dst_rgb=BF_ONE_MINUS_SRC_ALPHA, EBlendFactor src_alpha=BF_SRC_ALPHA, EBlendFactor dst_alpha=BF_ONE_MINUS_SRC_ALPHA)
virtual ERenderState type() const
const fvec4 & backAmbient() const
virtual ref< RenderState > clone() const
EFunction function_Front() const
virtual ref< RenderState > clone() const
virtual ERenderState type() const
float postColorMatrixGreenScale() const
virtual ERenderState type() const
virtual ERenderState type() const
void setPostConvolutionRedScale(float scale)
bool mPointSpriteCoordReplace
RenderState wrapping the OpenGL function glColor(), see also http://www.opengl.org/sdk/docs/man/xhtml...
The TextureMatrix class uses a 4x4 matrix to transform the texture coordinates of a texture unit...
const LightModel * getLightModel() const
DepthFunc(EFunction depthfunc=FU_LESS)
const fvec4 & eyePlaneT() const
RenderState wrapping the OpenGL function glDepthRange(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml for more information.
float postColorMatrixAlphaScale() const
void setPostColorMatrixGreenBias(float bias)
void setPostColorMatrixBlueBias(float bias)
virtual ERenderState type() const
const fvec4 & backSpecular() const
Visualization Library main namespace.
virtual ref< RenderState > clone() const
bool mUseCameraRotationInverse
const fvec4 & ambientColor() const
void setSrcAlpha(EBlendFactor factor)
const fvec4 & frontAmbient() const
EHintMode mPerspectiveCorrectionHint
EStencilOp dpPass_Front() const
void setDepthScale(float depth_scale)
float mPostConvolutionRedBias
virtual ERenderState type() const
Shader & shallowCopyFrom(const Shader &other)
Performs a shallow copy from the given Shader.
ETexEnvMode combineAlpha() const
virtual ERenderState type() const
ETexEnvOperand operand0RGB() const
RenderState wrapping the OpenGL function glTexEnv(), see also http://www.opengl.org/sdk/docs/man/xhtm...
virtual ERenderState type() const
ShadeModel(EShadeModel shademodel=SM_SMOOTH)
const BlendFunc * getBlendFunc() const
DepthFunc * getDepthFunc()
const LogicOp * getLogicOp() const
RenderState wrapping the OpenGL function glBlendColor(), see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendColor.xml for more information.
EFunction function_Back() const
const fvec4 & frontDiffuse() const
StencilFunc(EFunction function=FU_ALWAYS, int refvalue=0, unsigned int mask=~(unsigned int) 0)
virtual ref< RenderState > clone() const
EPolygonMode frontFace() const
void setGenModeQ(ETexGenMode mode)
Base class for most of the OpenGL render state wrapper classes.
void setDiffuse(const fvec4 &color)
EHintMode polygonSmoohtHint() const
void setRenderState(RenderStateNonIndexed *renderstate)
const Normal * getNormal() const
RenderState wrapping the OpenGL function glLineStipple(), see also http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml for more information.
TexEnv * getTexEnv(int unit_index)
Fog(EFogMode mode=FM_LINEAR, const fvec4 &color=fvec4(0, 0, 0, 0), float density=1, float start=0, float end=1)
GLSLProgram * glslProgram()
Returns the GLSLProgram associated to a Shader (if any)
void setFrontEmission(const fvec4 &color)
void setBackShininess(float shininess)
ref< ShaderAnimator > mShaderAnimator
ETexEnvOperand mOperand2Alpha
virtual ERenderState type() const
void setSizeMax(float sizemax)
EPolygonFace mColorMaterialFace
Wraps the OpenGL function glClipPlane().
void setValue(const fvec3 &color)
void setEmission(const fvec4 &color)
bool mColorMaterialEnabled
RenderState wrapping the OpenGL function glColorMask(), see also http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml for more information.
EHintMode mGenerateMipmapHint
virtual ref< RenderState > clone() const
virtual ref< RenderState > clone() const
void setAmbientColor(const fvec4 &ambientcolor)
ETexEnvSource mSource0RGB
void setOperand0Alpha(ETexEnvOperand operand)
EPointSpriteCoordOrigin pointSpriteCoordOrigin() const
RenderState wrapping the OpenGL function glVertexAttrib(), see also http://www.opengl.org/sdk/docs/man3/xhtml/glVertexAttrib.xml for more information.
ETexEnvOperand mOperand0RGB
RenderStateSet & deepCopyFrom(const RenderStateSet &other)
ETexGenMode genModeQ() const
virtual ref< RenderState > clone() const
virtual ERenderState type() const
StencilFunc * getStencilFunc()
The base class for all the reference counted objects.
void setGreenBias(float green_bias)
Base class for those render states which have only one binding point (the vast majority).
const Texture * texture() const
The texture sampler by a texture unit.
const DepthMask * getDepthMask() const
PointParameter * getPointParameter()
void setCombineAlpha(ETexEnvMode combineAlpha)
const PixelTransfer * getPixelTransfer() const
const Material * getMaterial() const
virtual ref< RenderState > clone() const
The TextureSampler class associates a Texture object to an OpenGL texture unit.
ColorMask * getColorMask()
const fvec4 & objectPlaneT() const
DepthRange(float znear, float zfar)
void setGenerateMipmapHint(EHintMode mode)
const TextureMatrix * getTextureMatrix(int unit_index) const
void setValue(const fvec4 &value)
ETexEnvMode combineRGB() const
ETexEnvOperand mOperand1Alpha
void eraseUniform(const char *name)
Equivalent to gocUniformSet()->eraseUniform(...)
virtual ERenderState type() const
void setMapStencil(bool map_stencil)
EHintMode mPointSmoothHint
const StencilMask * getStencilMask() const
float postColorMatrixAlphaBias() const
const fvec4 & eyePlaneR() const
float mPostConvolutionRedScale
unsigned int mask_Front() const
void setEyePlaneS(const fvec4 &plane)
float postColorMatrixRedScale() const
void setSrcRGB(EBlendFactor factor)
PolygonStipple * getPolygonStipple()
ETexEnvOperand operand1Alpha() const
void setBackAmbient(const fvec4 &color)
RenderState wrapping the OpenGL function glTexGen(), see also http://www.opengl.org/sdk/docs/man/xhtm...
EFunction depthFunc() const
const Uniform * getUniform(const char *name) const
Equivalent to gocUniformSet()->getUniform(...)
EHintMode pointSmoothHint() const
virtual ref< RenderState > clone() const
virtual ref< RenderState > clone() const
LineWidth(float linewidth=1.0f)
SampleCoverage(GLclampf value=1.0f, bool invert=false)
virtual ref< RenderState > clone() const
Uniform * getUniform(const char *name)
Equivalent to gocUniformSet()->getUniform(...)
virtual ERenderState type() const
virtual ERenderState type() const
RenderState wrapping the OpenGL function glLineWidth(), see also http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml for more information.
void setBlueScale(float blue_scale)
Callback object used to update/animate a Shader during the rendering.
SampleCoverage * getSampleCoverage()
float postConvolutionGreenScale() const
int refValue_Back() const
float postConvolutionGreenBias() const
TextureMatrix * getTextureMatrix(int unit_index)
ETexGenMode genModeT() const
void setDistanceAttenuation(fvec3 attenuation)
const PolygonMode * getPolygonMode() const
void eraseAllRenderStates()
ETexEnvOperand operand2Alpha() const
void setDstAlpha(EBlendFactor factor)
virtual ERenderState type() const
DepthMask(bool depthmask=true)
void setGenModeR(ETexGenMode mode)
Wraps the OpenGL functions glStencilFunc() and glStencilFuncSeparate(), see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml and http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuncSeparate.xml for more information.
BlendFunc * getBlendFunc()
void setLocalViewer(bool localviewer)
void setAmbient(const fvec4 &color)
void setEnabled(bool enable)
Whether the ShaderAnimator is enabled or not.
float mPostConvolutionBlueScale
void setObjectPlaneT(const fvec4 &plane)
Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects...
LineStipple(int factor=1, GLushort pattern=~(GLushort) 0)
ETexEnvOperand operand0Alpha() const
ETexEnvOperand operand1RGB() const
A set of RenderState objects managed by a Shader.
RenderState wrapping the OpenGL function glBlendEquation()/glBlendEquationSeparate(), see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml and http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquationSeparate.xml for more information.
const Scissor * scissor() const
Returns the Scissor to be used when rendering an Actor.
const fmat4 & matrix() const
const fvec4 & color() const
virtual ref< RenderState > clone() const
EBlendEquation modeRGB() const
AlphaFunc * getAlphaFunc()
const BlendEquation * getBlendEquation() const
#define VLGRAPHICS_EXPORT
ETexEnvSource mSource0Alpha
PointParameter(float sizemin=0, float sizemax=1024.0f, float fadethresholdsize=1.0f, fvec3 distanceattenuation=fvec3(1, 0, 0))
EFunction mFunction_Front
RenderState wrapping the OpenGL function glMaterial() and glColorMaterial(), see also http://www...
void setSource1RGB(ETexEnvSource source)
void setUniformSet(UniformSet *us)
Installs a new UniformSet.
PolygonOffset * getPolygonOffset()
const fvec4 & frontSpecular() const
virtual ERenderState type() const
EFunction alphaFunc() const
const unsigned char * mask() const
unsigned int mask_Front() const
void setFrontFace(EPolygonMode frontface)
virtual ERenderState type() const
void setDstRGB(EBlendFactor factor)
TexGen * getTexGen(int unit_index)
CullFace(EPolygonFace cullface=PF_BACK)
float mPostConvolutionAlphaBias
void setSource2Alpha(ETexEnvSource source)
void setValue(GLclampf value)
EEnable
Constant that enable/disable a specific OpenGL feature, see also Shader, Shader::enable(), Shader::disable(), Shader::isEnabled()
RenderState wrapping the OpenGL function glPointSize(), see also http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml for more information.
virtual ERenderState type() const
void setEyePlaneT(const fvec4 &plane)
#define VL_INSTRUMENT_ABSTRACT_CLASS(ClassName, BaseClass)
const StencilOp * getStencilOp() const
EColorControl colorControl() const
const LineStipple * getLineStipple() const
void setColorMaterial(EPolygonFace face, EColorMaterial color)
const RenderStateSet * getRenderStateSet() const
const SampleCoverage * getSampleCoverage() const
const LineWidth * getLineWidth() const
UniformSet * getUniformSet()
Returns the UniformSet installed.
PolygonMode * getPolygonMode()
const CullFace * getCullFace() const
virtual ref< RenderState > clone() const
void setFrontDiffuse(const fvec4 &color)
EBlendEquation mModeAlpha
float mPostColorMatrixGreenScale
EStencilOp dpFail_Back() const
void setColorMaterialEnabled(bool enabled)
PolygonMode(EPolygonMode frontface=PM_FILL, EPolygonMode backface=PM_FILL)
void setFactor(float factor)
virtual ref< RenderState > clone() const
ref< EnableSet > mEnableSet
virtual ref< RenderState > clone() const
void setPostConvolutionGreenBias(float bias)
virtual ERenderState type() const
RenderStateSet * getRenderStateSet()
unsigned int mask_Back() const
float mPostColorMatrixRedBias
const PointSize * getPointSize() const
void setOperand0RGB(ETexEnvOperand operand)
void setOperand2Alpha(ETexEnvOperand operand)
AlphaFunc(EFunction alphafunc=FU_ALWAYS, float refvalue=0)
virtual ERenderState type() const
void setValue(const fvec4 &color)
const FrontFace * getFrontFace() const
void setPostColorMatrixBlueScale(float scale)
void setEyePlaneQ(const fvec4 &plane)
virtual ERenderState type() const
void setAlphaScale(float alpha_scale)
void setUnits(float units)
const TextureMatrix & setMatrix(const fmat4 &matrix)
void setColor(const fvec4 &color)
RenderState wrapping the OpenGL function glAlphaFunc(), see also http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml for more information.
const ColorMask * getColorMask() const
StencilMask * getStencilMask()
virtual ERenderState type() const
void setScissor(Scissor *scissor)
Sets the Scissor to be used when rendering an Actor.
ETexEnvMode mCombineAlpha
void setFactor(int factor)
float mPostColorMatrixGreenBias
void setRedScale(float red_scale)
float mPostColorMatrixRedScale
void setAlphaScale(float alphascale)
virtual ref< RenderState > clone() const
EColorControl mColorControl
EStencilOp dpPass_Back() const
const fvec4 & value() const
Wraps the OpenGL function glLight().
virtual ref< RenderState > clone() const
const fvec4 & eyePlaneQ() const
virtual ref< RenderState > clone() const
void setPostConvolutionGreenScale(float scale)
float mPostColorMatrixAlphaBias
void eraseUniform(const Uniform *uniform)
Equivalent to gocUniformSet()->eraseUniform(...)
float postColorMatrixBlueBias() const
virtual ref< RenderState > clone() const
The ref<> class is used to reference-count an Object.
ETexEnvSource mSource1RGB
void setPostColorMatrixAlphaScale(float scale)
const std::vector< EEnable > & enables() const
virtual ERenderState type() const
LineWidth * getLineWidth()
const PolygonStipple * getPolygonStipple() const
const BlendColor * getBlendColor() const
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
The Scissor class wraps the OpenGL function glScissor(), see http://www.opengl.org/sdk/docs/man/xhtml...
Scissor * scissor()
Returns the Scissor to be used when rendering an Actor.
EPolygonFace faceMode() const
unsigned int mask_Back() const
void setBlueBias(float blue_bias)
virtual ref< RenderState > clone() const
EBlendFactor dstAlpha() const
const GLSLProgram * glslProgram() const
Returns the GLSLProgram associated to a Shader (if any)
ETexEnvSource source0RGB() const
void setSource0Alpha(ETexEnvSource source)
void setGreenScale(float green_scale)
virtual ref< RenderState > clone() const
ref< UniformSet > mUniformSet
const fvec4 & backEmission() const
RenderState wrapping the OpenGL function glStencilMask() and glStencilMaskSeparate(), see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml and http://www.opengl.org/sdk/docs/man/xhtml/glStencilMaskSeparate.xml for more information.
float mPostConvolutionGreenScale
const SecondaryColor * getSecondaryColor() const
virtual ERenderState type() const
ETexEnvSource source1Alpha() const
const fvec4 & frontEmission() const
EHintMode mLineSmoothHint
virtual ERenderState type() const
EHintMode lineSmoothHint() const
const fvec4 & blendColor() const
void setUniform(Uniform *uniform)
Equivalent to gocUniformSet()->setUniform(...)
real lastUpdateTime() const
Last time this Actor was animated/updated using a shaderAnimator().
EPointSpriteCoordOrigin mPointSpriteCoordOrigin
void setTwoSide(bool twoside)
void reset()
Disables everything, erases all the render states, erases all the uniforms.
PointSize(float pointsize=1.0f)
void setStart(float start)
void setPostConvolutionRedBias(float bias)
const fvec3 & value() const
FrontFace(EFrontFace frontface=FF_CCW)
virtual ref< RenderState > clone() const
void setColorControl(EColorControl colorcontrol)
void enable(EEnable capability)
bool isBlendingEnabled() const
const UniformSet * getUniformSet() const
Returns the UniformSet installed.
void setPostColorMatrixAlphaBias(float bias)
const RenderStateSlot * renderStates() const
virtual ref< RenderState > clone() const
void setSizeMin(float sizemin)
EStencilOp sFail_Front() const
EHintMode generateMipmapHint() const
void setPattern(GLushort pattern)
float backShininess() const
EHintMode fogHint() const
void setMode(EFogMode mode)
ETexEnvSource source0Alpha() const
virtual ref< RenderState > clone() const
BlendColor(const fvec4 &blendcolor=fvec4(0, 0, 0, 0))
RenderState wrapping the OpenGL function glFog(), see also http://www.opengl.org/sdk/docs/man/xhtml/g...
void setInvert(bool invert)
virtual ERenderState type() const
EBlendEquation modeAlpha() const
const fvec3 & value() const
bool colorMaterialEnabled() const
float mPostConvolutionBlueBias
RenderState wrapping the OpenGL function glSecondaryColor(), see also http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml for more information.
void setEnableSet(EnableSet *es)
void setMode(ETexEnvMode mode)
A set of enables managed by Shader.
EPolygonFace colorMaterialFace() const
int refValue_Front() const
void eraseRenderState(ERenderState type, int index=-1)
If index == -1 all the renderstates of the given type are removed regardless of their binding index...
const TexGen * getTexGen(int unit_index) const
RenderState wrapping the OpenGL function glSampleCoverage(), see also http://www.opengl.org/sdk/docs/man/xhtml/glSampleCoverage.xml for more information.
RenderState wrapping the OpenGL function glCullFace(), see also http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml for more information.
const TextureSampler * getTextureSampler(int unit_index) const
ref< Shader > shallowCopy() const
Returns the shallow copy of a Shader.
void setPostConvolutionBlueScale(float scale)
void setObjectPlaneR(const fvec4 &plane)