Blender V2.61 - r43446
|
#include <RAS_OpenGLRasterizer.h>
Public Member Functions | |
double | GetTime () |
RAS_OpenGLRasterizer (RAS_ICanvas *canv) | |
virtual | ~RAS_OpenGLRasterizer () |
virtual void | SetDepthMask (DepthMask depthmask) |
virtual bool | SetMaterial (const RAS_IPolyMaterial &mat) |
virtual bool | Init () |
virtual void | Exit () |
virtual bool | BeginFrame (int drawingmode, double time) |
virtual void | ClearColorBuffer () |
virtual void | ClearDepthBuffer () |
virtual void | ClearCachingInfo (void) |
virtual void | EndFrame () |
virtual void | SetRenderArea () |
virtual void | SetStereoMode (const StereoMode stereomode) |
virtual RAS_IRasterizer::StereoMode | GetStereoMode () |
virtual bool | Stereo () |
virtual bool | InterlacedStereo () |
virtual void | SetEye (const StereoEye eye) |
virtual StereoEye | GetEye () |
virtual void | SetEyeSeparation (const float eyeseparation) |
virtual float | GetEyeSeparation () |
virtual void | SetFocalLength (const float focallength) |
virtual float | GetFocalLength () |
virtual void | SwapBuffers () |
virtual void | IndexPrimitives (class RAS_MeshSlot &ms) |
virtual void | IndexPrimitivesMulti (class RAS_MeshSlot &ms) |
virtual void | IndexPrimitives_3DText (class RAS_MeshSlot &ms, class RAS_IPolyMaterial *polymat, class RAS_IRenderTools *rendertools) |
void | IndexPrimitivesInternal (RAS_MeshSlot &ms, bool multi) |
virtual void | SetProjectionMatrix (MT_CmMatrix4x4 &mat) |
virtual void | SetProjectionMatrix (const MT_Matrix4x4 &mat) |
virtual void | SetViewMatrix (const MT_Matrix4x4 &mat, const MT_Matrix3x3 &ori, const MT_Point3 &pos, bool perspective) |
virtual const MT_Point3 & | GetCameraPosition () |
virtual bool | GetCameraOrtho () |
virtual void | SetFog (float start, float dist, float r, float g, float b) |
virtual void | SetFogColor (float r, float g, float b) |
virtual void | SetFogStart (float fogstart) |
virtual void | SetFogEnd (float fogend) |
void | DisableFog () |
virtual void | DisplayFog () |
virtual bool | IsFogEnabled () |
virtual void | SetBackColor (float red, float green, float blue, float alpha) |
virtual void | SetDrawingMode (int drawingmode) |
virtual int | GetDrawingMode () |
virtual void | SetCullFace (bool enable) |
virtual void | SetLines (bool enable) |
virtual MT_Matrix4x4 | GetFrustumMatrix (float left, float right, float bottom, float top, float frustnear, float frustfar, float focallength, bool perspective) |
virtual MT_Matrix4x4 | GetOrthoMatrix (float left, float right, float bottom, float top, float frustnear, float frustfar) |
virtual void | SetSpecularity (float specX, float specY, float specZ, float specval) |
virtual void | SetShinyness (float shiny) |
virtual void | SetDiffuse (float difX, float difY, float difZ, float diffuse) |
virtual void | SetEmissive (float eX, float eY, float eZ, float e) |
virtual void | SetAmbientColor (float red, float green, float blue) |
virtual void | SetAmbient (float factor) |
virtual void | SetPolygonOffset (float mult, float add) |
virtual void | FlushDebugShapes () |
virtual void | DrawDebugLine (const MT_Vector3 &from, const MT_Vector3 &to, const MT_Vector3 &color) |
virtual void | DrawDebugCircle (const MT_Vector3 ¢er, const MT_Scalar radius, const MT_Vector3 &color, const MT_Vector3 &normal, int nsector) |
virtual void | SetTexCoordNum (int num) |
virtual void | SetAttribNum (int num) |
virtual void | SetTexCoord (TexCoGen coords, int unit) |
virtual void | SetAttrib (TexCoGen coords, int unit) |
void | TexCoord (const RAS_TexVert &tv) |
const MT_Matrix4x4 & | GetViewMatrix () const |
const MT_Matrix4x4 & | GetViewInvMatrix () const |
virtual void | EnableMotionBlur (float motionblurvalue) |
virtual void | DisableMotionBlur () |
virtual float | GetMotionBlurValue () |
virtual int | GetMotionBlurState () |
virtual void | SetMotionBlurState (int newstate) |
virtual void | SetAlphaBlend (int alphablend) |
virtual void | SetFrontFace (bool ccw) |
virtual void | SetAnisotropicFiltering (short level) |
virtual short | GetAnisotropicFiltering () |
Public Attributes | |
std::vector< OglDebugShape > | m_debugShapes |
Protected Attributes | |
int | m_drawingmode |
TexCoGen | m_texco [RAS_MAX_TEXCO] |
TexCoGen | m_attrib [RAS_MAX_ATTRIB] |
int | m_texco_num |
int | m_attrib_num |
bool | m_last_frontface |
RAS_IPolyMaterial::TCachingInfo | m_materialCachingInfo |
3D rendering device context.
Definition at line 65 of file RAS_OpenGLRasterizer.h.
RAS_OpenGLRasterizer::RAS_OpenGLRasterizer | ( | RAS_ICanvas * | canv | ) |
Definition at line 74 of file RAS_OpenGLRasterizer.cpp.
References GPU_get_anisotropic(), hinterlace_mask, i, left_eye_vinterlace_mask, and right_eye_vinterlace_mask.
RAS_OpenGLRasterizer::~RAS_OpenGLRasterizer | ( | ) | [virtual] |
Definition at line 111 of file RAS_OpenGLRasterizer.cpp.
References GPU_set_anisotropic().
bool RAS_OpenGLRasterizer::BeginFrame | ( | int | drawingmode, |
double | time | ||
) | [virtual] |
BeginFrame is called at the start of each frame.
Implements RAS_IRasterizer.
Definition at line 286 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::BeginFrame(), GPU_BLEND_SOLID, GPU_set_material_alpha_blend(), RAS_IRasterizer::KX_SOLID, m_drawingmode, and m_last_frontface.
void RAS_OpenGLRasterizer::ClearCachingInfo | ( | void | ) | [virtual] |
ClearCachingInfo clears the currently cached material.
Implements RAS_IRasterizer.
Definition at line 355 of file RAS_OpenGLRasterizer.cpp.
References m_materialCachingInfo.
Referenced by IndexPrimitives_3DText().
void RAS_OpenGLRasterizer::ClearColorBuffer | ( | ) | [virtual] |
ClearColorBuffer clears the color buffer.
Implements RAS_IRasterizer.
Definition at line 342 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::ClearBuffer(), RAS_ICanvas::ClearColor(), and RAS_ICanvas::COLOR_BUFFER.
void RAS_OpenGLRasterizer::ClearDepthBuffer | ( | ) | [virtual] |
ClearDepthBuffer clears the depth buffer.
Implements RAS_IRasterizer.
Definition at line 349 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::ClearBuffer(), and RAS_ICanvas::DEPTH_BUFFER.
Referenced by SetEye().
void RAS_OpenGLRasterizer::DisableFog | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 222 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::DisableMotionBlur | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1200 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::DisplayFog | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 233 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::KX_SOLID, and m_drawingmode.
virtual void RAS_OpenGLRasterizer::DrawDebugCircle | ( | const MT_Vector3 & | center, |
const MT_Scalar | radius, | ||
const MT_Vector3 & | color, | ||
const MT_Vector3 & | normal, | ||
int | nsector | ||
) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 274 of file RAS_OpenGLRasterizer.h.
References OglDebugShape::CIRCLE, MakeCursor::color, OglDebugShape::m_color, OglDebugShape::m_param, OglDebugShape::m_param2, OglDebugShape::m_pos, OglDebugShape::m_type, MT_Tuple3::x(), and MT_Tuple3::y().
virtual void RAS_OpenGLRasterizer::DrawDebugLine | ( | const MT_Vector3 & | from, |
const MT_Vector3 & | to, | ||
const MT_Vector3 & | color | ||
) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 264 of file RAS_OpenGLRasterizer.h.
References MakeCursor::color, OglDebugShape::LINE, OglDebugShape::m_color, OglDebugShape::m_param, OglDebugShape::m_pos, and OglDebugShape::m_type.
void RAS_OpenGLRasterizer::EnableMotionBlur | ( | float | motionblurvalue | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1191 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::EndFrame | ( | ) | [virtual] |
EndFrame is called at the end of each frame.
Implements RAS_IRasterizer.
Definition at line 432 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::EndFrame(), and FlushDebugShapes().
Referenced by Exit().
void RAS_OpenGLRasterizer::Exit | ( | ) | [virtual] |
Exit cleans up the renderer.
Implements RAS_IRasterizer.
Reimplemented in RAS_ListRasterizer, and RAS_VAOpenGLRasterizer.
Definition at line 264 of file RAS_OpenGLRasterizer.cpp.
References EndFrame().
void RAS_OpenGLRasterizer::FlushDebugShapes | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 360 of file RAS_OpenGLRasterizer.cpp.
References OglDebugShape::CIRCLE, cos(), MT_Vector3::fuzzyZero(), i, OglDebugShape::LINE, m_debugShapes, M_PI, MT_cross(), norm(), sin(), MT_Tuple3::x(), MT_Tuple3::y(), and MT_Tuple3::z().
Referenced by EndFrame().
short RAS_OpenGLRasterizer::GetAnisotropicFiltering | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1257 of file RAS_OpenGLRasterizer.cpp.
References GPU_get_anisotropic().
bool RAS_OpenGLRasterizer::GetCameraOrtho | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1121 of file RAS_OpenGLRasterizer.cpp.
const MT_Point3 & RAS_OpenGLRasterizer::GetCameraPosition | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1116 of file RAS_OpenGLRasterizer.cpp.
int RAS_OpenGLRasterizer::GetDrawingMode | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 330 of file RAS_OpenGLRasterizer.cpp.
References m_drawingmode.
RAS_IRasterizer::StereoEye RAS_OpenGLRasterizer::GetEye | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 566 of file RAS_OpenGLRasterizer.cpp.
float RAS_OpenGLRasterizer::GetEyeSeparation | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 577 of file RAS_OpenGLRasterizer.cpp.
float RAS_OpenGLRasterizer::GetFocalLength | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 588 of file RAS_OpenGLRasterizer.cpp.
MT_Matrix4x4 RAS_OpenGLRasterizer::GetFrustumMatrix | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top, | ||
float | frustnear, | ||
float | frustfar, | ||
float | focallength, | ||
bool | perspective | ||
) | [virtual] |
Generates a projection matrix from the specified frustum.
left | the left clipping plane |
right | the right clipping plane |
bottom | the bottom clipping plane |
top | the top clipping plane |
frustnear | the near clipping plane |
frustfar | the far clipping plane |
Implements RAS_IRasterizer.
Definition at line 982 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::RAS_STEREO_LEFTEYE, RAS_IRasterizer::RAS_STEREO_RIGHTEYE, and Stereo().
virtual int RAS_OpenGLRasterizer::GetMotionBlurState | ( | ) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 302 of file RAS_OpenGLRasterizer.h.
virtual float RAS_OpenGLRasterizer::GetMotionBlurValue | ( | ) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 301 of file RAS_OpenGLRasterizer.h.
MT_Matrix4x4 RAS_OpenGLRasterizer::GetOrthoMatrix | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top, | ||
float | frustnear, | ||
float | frustfar | ||
) | [virtual] |
Generates a orthographic projection matrix from the specified frustum.
left | the left clipping plane |
right | the right clipping plane |
bottom | the bottom clipping plane |
top | the top clipping plane |
frustnear | the near clipping plane |
frustfar | the far clipping plane |
Implements RAS_IRasterizer.
Definition at line 1033 of file RAS_OpenGLRasterizer.cpp.
RAS_IRasterizer::StereoMode RAS_OpenGLRasterizer::GetStereoMode | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 509 of file RAS_OpenGLRasterizer.cpp.
double RAS_OpenGLRasterizer::GetTime | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1174 of file RAS_OpenGLRasterizer.cpp.
const MT_Matrix4x4 & RAS_OpenGLRasterizer::GetViewInvMatrix | ( | ) | const [virtual] |
Implements RAS_IRasterizer.
Definition at line 606 of file RAS_OpenGLRasterizer.cpp.
const MT_Matrix4x4 & RAS_OpenGLRasterizer::GetViewMatrix | ( | ) | const [virtual] |
Implements RAS_IRasterizer.
Definition at line 601 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::IndexPrimitives | ( | class RAS_MeshSlot & | ms | ) | [virtual] |
IndexPrimitives: Renders primitives from mesh slot.
Implements RAS_IRasterizer.
Reimplemented in RAS_ListRasterizer, and RAS_VAOpenGLRasterizer.
Definition at line 772 of file RAS_OpenGLRasterizer.cpp.
References IndexPrimitivesInternal().
void RAS_OpenGLRasterizer::IndexPrimitives_3DText | ( | class RAS_MeshSlot & | ms, |
class RAS_IPolyMaterial * | polymat, | ||
class RAS_IRenderTools * | rendertools | ||
) | [virtual] |
IndexPrimitives_3DText will render text into the polygons. The text to be rendered is from
rendertools | client object's text property. |
Implements RAS_IRasterizer.
Definition at line 611 of file RAS_OpenGLRasterizer.cpp.
References RAS_MeshSlot::iterator::array, RAS_MeshSlot::begin(), ClearCachingInfo(), RAS_MeshSlot::end(), RAS_IPolyMaterial::GetDrawingMode(), RAS_TexVert::getXYZ(), i, RAS_MeshSlot::iterator::index, RAS_DisplayArray::LINE, m_attrib, m_attrib_num, RAS_MeshSlot::m_bObjectColor, RAS_MeshSlot::m_RGBAcolor, RAS_DisplayArray::m_type, RAS_MeshSlot::next(), NULL, RAS_IRasterizer::RAS_TEXCO_UV1, RAS_IRenderTools::RenderText(), RAS_MeshSlot::iterator::totindex, and RAS_MeshSlot::iterator::vertex.
void RAS_OpenGLRasterizer::IndexPrimitivesInternal | ( | RAS_MeshSlot & | ms, |
bool | multi | ||
) |
Definition at line 858 of file RAS_OpenGLRasterizer.cpp.
References RAS_MeshSlot::iterator::array, RAS_MeshSlot::begin(), CheckMaterialDM(), CheckTexDM(), current_blmat_nr, current_wireframe, DerivedMesh::drawFacesGLSL, DerivedMesh::drawFacesTex, RAS_MeshSlot::end(), RAS_IPolyMaterial::GetBlenderImage(), RAS_IPolyMaterial::GetBlenderMaterial(), RAS_IPolyMaterial::GetBlenderScene(), RAS_IPolyMaterial::GetDrawingMode(), RAS_IPolyMaterial::GetFlag(), RAS_IPolyMaterial::GetMaterialIndex(), RAS_TexVert::getNormal(), RAS_MaterialBucket::GetPolyMaterial(), RAS_TexVert::getRGBA(), RAS_TexVert::getUV1(), RAS_TexVert::getXYZ(), GPU_get_material_alpha_blend(), GPU_material_from_blender(), GPU_material_vertex_attributes(), GPU_set_material_alpha_blend(), i, RAS_MeshSlot::iterator::index, RAS_IRasterizer::KX_BACKCULL, RAS_IRasterizer::KX_WIREFRAME, RAS_DisplayArray::LINE, RAS_MeshSlot::m_bObjectColor, RAS_MeshSlot::m_bucket, m_drawingmode, RAS_MeshSlot::m_mesh, RAS_MeshSlot::m_pDerivedMesh, RAS_MeshSlot::m_RGBAcolor, RAS_DisplayArray::m_type, RAS_MeshSlot::next(), NULL, RAS_BLENDERGLSL, SetCullFace(), TexCoord(), RAS_MeshSlot::iterator::totindex, RAS_DisplayArray::TRIANGLE, and RAS_MeshSlot::iterator::vertex.
Referenced by RAS_VAOpenGLRasterizer::IndexPrimitives(), IndexPrimitives(), IndexPrimitivesMulti(), and RAS_VAOpenGLRasterizer::IndexPrimitivesMulti().
void RAS_OpenGLRasterizer::IndexPrimitivesMulti | ( | class RAS_MeshSlot & | ms | ) | [virtual] |
Implements RAS_IRasterizer.
Reimplemented in RAS_ListRasterizer, and RAS_VAOpenGLRasterizer.
Definition at line 777 of file RAS_OpenGLRasterizer.cpp.
References IndexPrimitivesInternal().
bool RAS_OpenGLRasterizer::Init | ( | ) | [virtual] |
Init initialises the renderer.
Implements RAS_IRasterizer.
Reimplemented in RAS_ListRasterizer, and RAS_VAOpenGLRasterizer.
Definition at line 117 of file RAS_OpenGLRasterizer.cpp.
References GPU_BLEND_SOLID, GPU_set_material_alpha_blend(), GPU_state_init(), and m_last_frontface.
bool RAS_OpenGLRasterizer::InterlacedStereo | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 522 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::RAS_STEREO_INTERLACED, and RAS_IRasterizer::RAS_STEREO_VINTERLACE.
bool RAS_OpenGLRasterizer::IsFogEnabled | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 227 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetAlphaBlend | ( | int | alphablend | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1206 of file RAS_OpenGLRasterizer.cpp.
References GPU_set_material_alpha_blend().
void RAS_OpenGLRasterizer::SetAmbient | ( | float | factor | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 158 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetAmbientColor | ( | float | red, |
float | green, | ||
float | blue | ||
) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 150 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetAnisotropicFiltering | ( | short | level | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1252 of file RAS_OpenGLRasterizer.cpp.
References GPU_set_anisotropic().
void RAS_OpenGLRasterizer::SetAttrib | ( | TexCoGen | coords, |
int | unit | ||
) | [virtual] |
Definition at line 702 of file RAS_OpenGLRasterizer.cpp.
References m_attrib, and RAS_MAX_ATTRIB.
void RAS_OpenGLRasterizer::SetAttribNum | ( | int | num | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 688 of file RAS_OpenGLRasterizer.cpp.
References m_attrib_num, and RAS_MAX_ATTRIB.
void RAS_OpenGLRasterizer::SetBackColor | ( | float | red, |
float | green, | ||
float | blue, | ||
float | alpha | ||
) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 165 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetCullFace | ( | bool | enable | ) | [virtual] |
Sets face culling
Implements RAS_IRasterizer.
Definition at line 1126 of file RAS_OpenGLRasterizer.cpp.
Referenced by IndexPrimitivesInternal().
void RAS_OpenGLRasterizer::SetDepthMask | ( | DepthMask | depthmask | ) | [virtual] |
SetDepthMask enables or disables writing a fragment's depth value to the Z buffer.
Implements RAS_IRasterizer.
Definition at line 336 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::KX_DEPTHMASK_DISABLED.
void RAS_OpenGLRasterizer::SetDiffuse | ( | float | difX, |
float | difY, | ||
float | difZ, | ||
float | diffuse | ||
) | [virtual] |
Sets the diffuse color component of the lighting equation.
Implements RAS_IRasterizer.
Definition at line 1161 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetDrawingMode | ( | int | drawingmode | ) | [virtual] |
drawingmode | = KX_BOUNDINGBOX, KX_WIREFRAME, KX_SOLID, KX_SHADED or KX_TEXTURED. |
Implements RAS_IRasterizer.
Reimplemented in RAS_ListRasterizer, and RAS_VAOpenGLRasterizer.
Definition at line 322 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::KX_WIREFRAME, and m_drawingmode.
void RAS_OpenGLRasterizer::SetEmissive | ( | float | eX, |
float | eY, | ||
float | eZ, | ||
float | e | ||
) | [virtual] |
Sets the emissive color component of the lighting equation.
Implements RAS_IRasterizer.
Definition at line 1167 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetEye | ( | const StereoEye | eye | ) | [virtual] |
Sets which eye buffer subsequent primitives will be rendered to.
Implements RAS_IRasterizer.
Definition at line 527 of file RAS_OpenGLRasterizer.cpp.
References ClearDepthBuffer(), hinterlace_mask, left_eye_vinterlace_mask, RAS_IRasterizer::RAS_STEREO_ANAGLYPH, RAS_IRasterizer::RAS_STEREO_INTERLACED, RAS_IRasterizer::RAS_STEREO_LEFTEYE, RAS_IRasterizer::RAS_STEREO_QUADBUFFERED, RAS_IRasterizer::RAS_STEREO_RIGHTEYE, RAS_IRasterizer::RAS_STEREO_VINTERLACE, and right_eye_vinterlace_mask.
void RAS_OpenGLRasterizer::SetEyeSeparation | ( | const float | eyeseparation | ) | [virtual] |
Sets the distance between eyes for stereo mode.
Implements RAS_IRasterizer.
Definition at line 572 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetFocalLength | ( | const float | focallength | ) | [virtual] |
Sets the focal length for stereo mode.
Implements RAS_IRasterizer.
Definition at line 582 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetFog | ( | float | start, |
float | dist, | ||
float | r, | ||
float | g, | ||
float | b | ||
) | [virtual] |
void RAS_OpenGLRasterizer::SetFogColor | ( | float | r, |
float | g, | ||
float | b | ||
) | [virtual] |
void RAS_OpenGLRasterizer::SetFogEnd | ( | float | fogend | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 198 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetFogStart | ( | float | fogstart | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 190 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetFrontFace | ( | bool | ccw | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1239 of file RAS_OpenGLRasterizer.cpp.
References m_last_frontface.
void RAS_OpenGLRasterizer::SetLines | ( | bool | enable | ) | [virtual] |
Sets wireframe mode.
Implements RAS_IRasterizer.
Definition at line 1134 of file RAS_OpenGLRasterizer.cpp.
bool RAS_OpenGLRasterizer::SetMaterial | ( | const RAS_IPolyMaterial & | mat | ) | [virtual] |
SetMaterial sets the material settings for subsequent primitives to be rendered with. The material will be cached.
Implements RAS_IRasterizer.
Definition at line 257 of file RAS_OpenGLRasterizer.cpp.
References RAS_IPolyMaterial::Activate(), and m_materialCachingInfo.
virtual void RAS_OpenGLRasterizer::SetMotionBlurState | ( | int | newstate | ) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 303 of file RAS_OpenGLRasterizer.h.
void RAS_OpenGLRasterizer::SetPolygonOffset | ( | float | mult, |
float | add | ||
) | [virtual] |
Sets a polygon offset. z depth will be: z1 = mult*z0 + add
Implements RAS_IRasterizer.
Definition at line 1179 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::KX_SHADED, and m_drawingmode.
void RAS_OpenGLRasterizer::SetProjectionMatrix | ( | MT_CmMatrix4x4 & | mat | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 961 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetProjectionMatrix | ( | const MT_Matrix4x4 & | mat | ) | [virtual] |
Set the projection matrix for the rasterizer. This projects from camera coordinates to window coordinates.
mat | The projection matrix. |
Implements RAS_IRasterizer.
Definition at line 970 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetRenderArea | ( | ) | [virtual] |
SetRenderArea sets the render area from the 2d canvas. Returns true if only of subset of the canvas is used.
Implements RAS_IRasterizer.
Definition at line 443 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::GetHeight(), RAS_ICanvas::GetWidth(), RAS_IRasterizer::RAS_STEREO_ABOVEBELOW, RAS_IRasterizer::RAS_STEREO_LEFTEYE, RAS_IRasterizer::RAS_STEREO_RIGHTEYE, RAS_IRasterizer::RAS_STEREO_SIDEBYSIDE, RAS_Rect::SetBottom(), RAS_ICanvas::SetDisplayArea(), RAS_Rect::SetLeft(), RAS_Rect::SetRight(), and RAS_Rect::SetTop().
void RAS_OpenGLRasterizer::SetShinyness | ( | float | shiny | ) | [virtual] |
Sets the specular exponent component of the lighting equation.
Implements RAS_IRasterizer.
Definition at line 1153 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetSpecularity | ( | float | specX, |
float | specY, | ||
float | specZ, | ||
float | specval | ||
) | [virtual] |
Sets the specular color component of the lighting equation.
Implements RAS_IRasterizer.
Definition at line 1142 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetStereoMode | ( | const StereoMode | stereomode | ) | [virtual] |
Definition at line 504 of file RAS_OpenGLRasterizer.cpp.
void RAS_OpenGLRasterizer::SetTexCoord | ( | TexCoGen | coords, |
int | unit | ||
) | [virtual] |
Definition at line 695 of file RAS_OpenGLRasterizer.cpp.
References m_texco, and RAS_MAX_TEXCO.
void RAS_OpenGLRasterizer::SetTexCoordNum | ( | int | num | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 681 of file RAS_OpenGLRasterizer.cpp.
References m_texco_num, and RAS_MAX_TEXCO.
void RAS_OpenGLRasterizer::SetViewMatrix | ( | const MT_Matrix4x4 & | mat, |
const MT_Matrix3x3 & | ori, | ||
const MT_Point3 & | pos, | ||
bool | perspective | ||
) | [virtual] |
Sets the modelview matrix.
Implements RAS_IRasterizer.
Definition at line 1057 of file RAS_OpenGLRasterizer.cpp.
References MT_Vector3::cross(), RAS_IRasterizer::RAS_STEREO_LEFTEYE, RAS_IRasterizer::RAS_STEREO_RIGHTEYE, MT_Transform::setIdentity(), Stereo(), transform(), and MT_Transform::translate().
bool RAS_OpenGLRasterizer::Stereo | ( | ) | [virtual] |
Stereo can be used to query if the rasterizer is in stereo mode.
Implements RAS_IRasterizer.
Definition at line 514 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::RAS_STEREO_NOSTEREO.
Referenced by GetFrustumMatrix(), and SetViewMatrix().
void RAS_OpenGLRasterizer::SwapBuffers | ( | ) | [virtual] |
SwapBuffers swaps the back buffer with the front buffer.
Implements RAS_IRasterizer.
Definition at line 594 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::SwapBuffers().
void RAS_OpenGLRasterizer::TexCoord | ( | const RAS_TexVert & | tv | ) |
Definition at line 709 of file RAS_OpenGLRasterizer.cpp.
References RAS_TexVert::getFlag(), RAS_TexVert::getNormal(), RAS_TexVert::getRGBA(), RAS_TexVert::getTangent(), RAS_TexVert::getUnit(), RAS_TexVert::getUV1(), RAS_TexVert::getUV2(), RAS_TexVert::getXYZ(), m_attrib, m_attrib_num, m_texco, m_texco_num, RAS_IRasterizer::RAS_TEXCO_GLOB, RAS_IRasterizer::RAS_TEXCO_NORM, RAS_IRasterizer::RAS_TEXCO_ORCO, RAS_IRasterizer::RAS_TEXCO_UV1, RAS_IRasterizer::RAS_TEXCO_UV2, RAS_IRasterizer::RAS_TEXCO_VCOL, RAS_IRasterizer::RAS_TEXTANGENT, and RAS_TexVert::SECOND_UV.
Referenced by IndexPrimitivesInternal().
TexCoGen RAS_OpenGLRasterizer::m_attrib[RAS_MAX_ATTRIB] [protected] |
Definition at line 109 of file RAS_OpenGLRasterizer.h.
Referenced by IndexPrimitives_3DText(), SetAttrib(), and TexCoord().
int RAS_OpenGLRasterizer::m_attrib_num [protected] |
Definition at line 111 of file RAS_OpenGLRasterizer.h.
Referenced by IndexPrimitives_3DText(), SetAttribNum(), and TexCoord().
std::vector<OglDebugShape> RAS_OpenGLRasterizer::m_debugShapes |
Definition at line 287 of file RAS_OpenGLRasterizer.h.
Referenced by FlushDebugShapes().
int RAS_OpenGLRasterizer::m_drawingmode [protected] |
Definition at line 107 of file RAS_OpenGLRasterizer.h.
Referenced by BeginFrame(), DisplayFog(), GetDrawingMode(), RAS_VAOpenGLRasterizer::IndexPrimitives(), IndexPrimitivesInternal(), RAS_VAOpenGLRasterizer::IndexPrimitivesMulti(), RAS_VAOpenGLRasterizer::SetDrawingMode(), SetDrawingMode(), and SetPolygonOffset().
bool RAS_OpenGLRasterizer::m_last_frontface [protected] |
Definition at line 113 of file RAS_OpenGLRasterizer.h.
Referenced by BeginFrame(), Init(), and SetFrontFace().
Stores the caching information for the last material activated.
Definition at line 116 of file RAS_OpenGLRasterizer.h.
Referenced by ClearCachingInfo(), and SetMaterial().
TexCoGen RAS_OpenGLRasterizer::m_texco[RAS_MAX_TEXCO] [protected] |
Definition at line 108 of file RAS_OpenGLRasterizer.h.
Referenced by SetTexCoord(), and TexCoord().
int RAS_OpenGLRasterizer::m_texco_num [protected] |
Definition at line 110 of file RAS_OpenGLRasterizer.h.
Referenced by SetTexCoordNum(), and TexCoord().