|
Blender
V2.59
|
#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 | FlushDebugLines () |
| virtual void | DrawDebugLine (const MT_Vector3 &from, const MT_Vector3 &to, const MT_Vector3 &color) |
| 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 | SetBlendingMode (int blendmode) |
| virtual void | SetFrontFace (bool ccw) |
Public Attributes | |
| std::vector< OglDebugLine > | m_debugLines |
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 62 of file RAS_OpenGLRasterizer.h.
| RAS_OpenGLRasterizer::RAS_OpenGLRasterizer | ( | RAS_ICanvas * | canv | ) |
Definition at line 71 of file RAS_OpenGLRasterizer.cpp.
References hinterlace_mask, i, left_eye_vinterlace_mask, right_eye_vinterlace_mask, and MT_Matrix4x4::setIdentity().
| RAS_OpenGLRasterizer::~RAS_OpenGLRasterizer | ( | ) | [virtual] |
Definition at line 106 of file RAS_OpenGLRasterizer.cpp.
| bool RAS_OpenGLRasterizer::BeginFrame | ( | int | drawingmode, |
| double | time | ||
| ) | [virtual] |
BeginFrame is called at the start of each frame.
Implements RAS_IRasterizer.
Definition at line 279 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::BeginFrame(), GPU_BLEND_SOLID, GPU_set_material_blend_mode(), 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 348 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 335 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 342 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 215 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::DisableMotionBlur | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1155 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::DisplayFog | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 226 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::KX_SOLID, and m_drawingmode.
| 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 259 of file RAS_OpenGLRasterizer.h.
References MakeCursor::color, OglDebugLine::m_color, OglDebugLine::m_from, and OglDebugLine::m_to.
| void RAS_OpenGLRasterizer::EnableMotionBlur | ( | float | motionblurvalue | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1146 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 385 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::EndFrame(), and FlushDebugLines().
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 257 of file RAS_OpenGLRasterizer.cpp.
References EndFrame().
| void RAS_OpenGLRasterizer::FlushDebugLines | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 353 of file RAS_OpenGLRasterizer.cpp.
References i, and m_debugLines.
Referenced by EndFrame().
| bool RAS_OpenGLRasterizer::GetCameraOrtho | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1076 of file RAS_OpenGLRasterizer.cpp.
| const MT_Point3 & RAS_OpenGLRasterizer::GetCameraPosition | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1071 of file RAS_OpenGLRasterizer.cpp.
| int RAS_OpenGLRasterizer::GetDrawingMode | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 323 of file RAS_OpenGLRasterizer.cpp.
References m_drawingmode.
| RAS_IRasterizer::StereoEye RAS_OpenGLRasterizer::GetEye | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 521 of file RAS_OpenGLRasterizer.cpp.
| float RAS_OpenGLRasterizer::GetEyeSeparation | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 532 of file RAS_OpenGLRasterizer.cpp.
| float RAS_OpenGLRasterizer::GetFocalLength | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 543 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 937 of file RAS_OpenGLRasterizer.cpp.
References RAS_IRasterizer::RAS_STEREO_LEFTEYE, RAS_IRasterizer::RAS_STEREO_RIGHTEYE, MT_Matrix4x4::setValue(), and Stereo().
| virtual int RAS_OpenGLRasterizer::GetMotionBlurState | ( | ) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 283 of file RAS_OpenGLRasterizer.h.
| virtual float RAS_OpenGLRasterizer::GetMotionBlurValue | ( | ) | [inline, virtual] |
Implements RAS_IRasterizer.
Definition at line 282 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 988 of file RAS_OpenGLRasterizer.cpp.
References MT_Matrix4x4::setValue().
| RAS_IRasterizer::StereoMode RAS_OpenGLRasterizer::GetStereoMode | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 464 of file RAS_OpenGLRasterizer.cpp.
| double RAS_OpenGLRasterizer::GetTime | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1129 of file RAS_OpenGLRasterizer.cpp.
| const MT_Matrix4x4 & RAS_OpenGLRasterizer::GetViewInvMatrix | ( | ) | const [virtual] |
Implements RAS_IRasterizer.
Definition at line 561 of file RAS_OpenGLRasterizer.cpp.
| const MT_Matrix4x4 & RAS_OpenGLRasterizer::GetViewMatrix | ( | ) | const [virtual] |
Implements RAS_IRasterizer.
Definition at line 556 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 727 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 566 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 813 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_blend_mode(), GPU_material_from_blender(), GPU_material_vertex_attributes(), GPU_set_material_blend_mode(), i, RAS_MeshSlot::iterator::index, RAS_IRasterizer::KX_TWOSIDE, 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(), RAS_BLENDERGLSL, SetCullFace(), TexCoord(), RAS_MeshSlot::iterator::totindex, RAS_DisplayArray::TRIANGLE, and RAS_MeshSlot::iterator::vertex.
Referenced by RAS_VAOpenGLRasterizer::IndexPrimitives(), IndexPrimitives(), RAS_VAOpenGLRasterizer::IndexPrimitivesMulti(), and IndexPrimitivesMulti().
| void RAS_OpenGLRasterizer::IndexPrimitivesMulti | ( | class RAS_MeshSlot & | ms | ) | [virtual] |
Implements RAS_IRasterizer.
Reimplemented in RAS_ListRasterizer, and RAS_VAOpenGLRasterizer.
Definition at line 732 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 110 of file RAS_OpenGLRasterizer.cpp.
References GPU_BLEND_SOLID, GPU_set_material_blend_mode(), GPU_state_init(), and m_last_frontface.
| bool RAS_OpenGLRasterizer::InterlacedStereo | ( | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 477 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 220 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetAmbient | ( | float | factor | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 151 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetAmbientColor | ( | float | red, |
| float | green, | ||
| float | blue | ||
| ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 143 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetAttrib | ( | TexCoGen | coords, |
| int | unit | ||
| ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 657 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 643 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 158 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetBlendingMode | ( | int | blendmode | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1161 of file RAS_OpenGLRasterizer.cpp.
References GPU_set_material_blend_mode().
| void RAS_OpenGLRasterizer::SetCullFace | ( | bool | enable | ) | [virtual] |
Sets face culling
Implements RAS_IRasterizer.
Definition at line 1081 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 329 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 1116 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 315 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 1122 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetEye | ( | const StereoEye | eye | ) | [virtual] |
Definition at line 482 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 527 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 537 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 191 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetFogStart | ( | float | fogstart | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 183 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetFrontFace | ( | bool | ccw | ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 1194 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 1089 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 250 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 284 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 1134 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 916 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 925 of file RAS_OpenGLRasterizer.cpp.
References MT_Matrix4x4::getValue().
| 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 398 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 1108 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 1097 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetStereoMode | ( | const StereoMode | stereomode | ) | [virtual] |
SetStereoMode will set the stereo mode
Implements RAS_IRasterizer.
Definition at line 459 of file RAS_OpenGLRasterizer.cpp.
| void RAS_OpenGLRasterizer::SetTexCoord | ( | TexCoGen | coords, |
| int | unit | ||
| ) | [virtual] |
Implements RAS_IRasterizer.
Definition at line 650 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 636 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 1012 of file RAS_OpenGLRasterizer.cpp.
References MT_Vector3::cross(), MT_Matrix4x4::getValue(), MT_Matrix4x4::invert(), RAS_IRasterizer::RAS_STEREO_LEFTEYE, RAS_IRasterizer::RAS_STEREO_RIGHTEYE, MT_Transform::setIdentity(), Stereo(), 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 469 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 549 of file RAS_OpenGLRasterizer.cpp.
References RAS_ICanvas::SwapBuffers().
| void RAS_OpenGLRasterizer::TexCoord | ( | const RAS_TexVert & | tv | ) |
Definition at line 664 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 104 of file RAS_OpenGLRasterizer.h.
Referenced by IndexPrimitives_3DText(), SetAttrib(), and TexCoord().
int RAS_OpenGLRasterizer::m_attrib_num [protected] |
Definition at line 106 of file RAS_OpenGLRasterizer.h.
Referenced by IndexPrimitives_3DText(), SetAttribNum(), and TexCoord().
| std::vector<OglDebugLine> RAS_OpenGLRasterizer::m_debugLines |
Definition at line 268 of file RAS_OpenGLRasterizer.h.
Referenced by FlushDebugLines().
int RAS_OpenGLRasterizer::m_drawingmode [protected] |
Definition at line 102 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 108 of file RAS_OpenGLRasterizer.h.
Referenced by BeginFrame(), Init(), and SetFrontFace().
Stores the caching information for the last material activated.
Definition at line 111 of file RAS_OpenGLRasterizer.h.
Referenced by ClearCachingInfo(), and SetMaterial().
TexCoGen RAS_OpenGLRasterizer::m_texco[RAS_MAX_TEXCO] [protected] |
Definition at line 103 of file RAS_OpenGLRasterizer.h.
Referenced by SetTexCoord(), and TexCoord().
int RAS_OpenGLRasterizer::m_texco_num [protected] |
Definition at line 105 of file RAS_OpenGLRasterizer.h.
Referenced by SetTexCoordNum(), and TexCoord().