igor::iRenderer Class Reference

#include <iRenderer.h>

Inherits igor::iModule< iRenderer >.

Classes

struct  iRendererStats
 

Public Member Functions

void init ()
 
void deinit ()
 
void setShaderMaterial (const iShaderMaterialPtr &material)
 
const iShaderMaterialPtrgetMaterial () const
 
void setPerspective (float64 fov, float64 aspect, float64 nearPlain, float64 farPlain)
 
void setOrtho (float64 left, float64 right, float64 bottom, float64 top, float64 nearPlain, float64 farPlain)
 
void setModelMatrix (const iaMatrixd &matrix)
 
void setViewMatrix (const iaMatrixd &matrix)
 
void setViewMatrixFromCam (const iaMatrixd &camMatrix)
 
void setProjectionMatrix (const iaMatrixd &matrix)
 
const iaMatrixdgetCamMatrix () const
 
const iaMatrixdgetModelMatrix () const
 
const iaMatrixdgetViewMatrix () const
 
const iaMatrixdgetProjectionMatrix () const
 
const iaMatrixdgetModelViewMatrix () const
 
const iaMatrixdgetModelViewProjectionMatrix () const
 
void setFallbackTexture (const iTexturePtr &texture)
 
template<typename T >
void drawPoint (T x, T y, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawPoint (const iaVector2< T > &v, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawPoint (const iaVector3< T > &v, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLine (T x1, T y1, T x2, T y2, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLine (const iaVector2< T > &v1, const iaVector2< T > &v2, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLine (const iaVector3< T > &v1, const iaVector3< T > &v2, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLineStrip (const std::vector< iaVector2< T > > &points, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLineStrip (const std::vector< iaVector3< T > > &points, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLineLoop (const std::vector< iaVector2< T > > &points, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawLineLoop (const std::vector< iaVector3< T > > &points, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawRectangle (T x, T y, T width, T height, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawRectangle (const iaRectangle< T > &rect, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawFilledRectangle (const iaRectangle< T > &rect, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawFilledRectangle (T x, T y, T width, T height, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawFilledRectangleColored (const iaRectangle< T > &rect, const iaColor4f &color1, const iaColor4f &color2, const iaColor4f &color3, const iaColor4f &color4)
 
template<typename T >
void drawQuad (const iaVector3< T > &o, const iaVector3< T > &u, const iaVector3< T > &v, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawQuad (const iaMatrix< T > &matrix, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawQuad (const iaVector3< T > &v1, const iaVector3< T > &v2, const iaVector3< T > &v3, const iaVector3< T > &v4, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawTexturedRectangle (T x, T y, T width, T height, const iTexturePtr &texture, const iaColor4f &color=iaColor4f::white, bool blend=false, const iaVector2< T > &tiling=iaVector2< T >(static_cast< T >(1), static_cast< T >(1)))
 
template<typename T >
void drawTexturedRectangle (const iaRectangle< T > &rect, const iTexturePtr &texture, const iaColor4f &color=iaColor4f::white, bool blend=false, const iaVector2< T > &tiling=iaVector2< T >(static_cast< T >(1), static_cast< T >(1)))
 
template<typename T >
void drawTexturedQuad (const iaMatrix< T > &matrix, const iTexturePtr &texture, const iaColor4f &color=iaColor4f::white, bool blend=false, const iaVector2< T > &tiling=iaVector2< T >(static_cast< T >(1), static_cast< T >(1)))
 
template<typename T >
void drawTexturedQuad (const iaVector3< T > &o, const iaVector3< T > &u, const iaVector3< T > &v, iTexturePtr texture, const iaColor4f &color=iaColor4f::white, bool blend=false, const iaVector2< T > &tiling=iaVector2< T >(static_cast< T >(1), static_cast< T >(1)))
 
template<typename T >
void drawTexturedQuad (const iaVector3< T > &v1, const iaVector3< T > &v2, const iaVector3< T > &v3, const iaVector3< T > &v4, const iTexturePtr &texture, const iaColor4f &color=iaColor4f::white, bool blend=false, const iaVector2< T > &tiling=iaVector2< T >(static_cast< T >(1), static_cast< T >(1)))
 
template<typename T >
void drawSprite (const iaMatrix< T > &matrix, const iSpritePtr &sprite, uint32 frameIndex=0, const iaVector2< T > &size=iaVector2< T >(1.0f, 1.0f), const iaColor4f &color=iaColor4f::white, bool blend=false)
 
void drawString (float32 x, float32 y, const iaString &text, iHorizontalAlignment horz, iVerticalAlignment vert, const iaColor4f &color=iaColor4f::white, float32 maxWidth=0.0f)
 
void drawString (float32 x, float32 y, const iaString &text, const iaColor4f &color=iaColor4f::white, float32 maxWidth=0.0f)
 
template<typename T >
void drawCircle (T x, T y, T radius, int segments=16, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawCircle (const iaVector2< T > &pos, T radius, int segments=16, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawCircle (const iaCircle< T > &circle, int segments=16, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawFilledCircle (T x, T y, T radius, int segments=16, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawFilledCircle (const iaVector2< T > &pos, T radius, int segments=16, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawFilledCircle (const iaCircle< T > &circle, int segments=16, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawBox (const iAACube< T > &cube, const iaColor4f &color=iaColor4f::white)
 
template<typename T >
void drawBox (const iAABox< T > &box, const iaColor4f &color=iaColor4f::white)
 
void drawMesh (iMeshPtr mesh, iMaterialPtr material)
 
void drawMeshInstanced (iMeshPtr mesh, iInstancingBufferPtr instancingBuffer, iMaterialPtr material=nullptr)
 
void drawBuffer (iVertexArrayPtr vertexArray, iRenderPrimitive primitiveType, iMaterialPtr material=nullptr)
 
void setLightPosition (int32 lightnum, const iaVector3d &pos)
 
void setLightAmbient (int32 lightnum, iaColor3f &ambient)
 
void setLightDiffuse (int32 lightnum, iaColor3f &diffuse)
 
void setLightSpecular (int32 lightnum, iaColor3f &specular)
 
void setLineWidth (float32 lineWidth)
 
float32 getLineWidth () const
 
void setPointSize (float32 pointSize)
 
float32 getPointSize () const
 
void setIgnoreRenderOrder (bool ignoreRenderOrder=true)
 
bool isIgnoringRenderOrder ()
 
void setFont (const iTextureFontPtr &font)
 
const iTextureFontPtrgetFont () const
 
void setFontSize (float32 fontSize)
 
float32 getFontSize () const
 
void setFontLineHeight (float32 lineHeight)
 
float32 getFontLineHeight () const
 
const iaRectangleigetViewport () const
 
void setViewport (const iaRectanglei &viewport)
 
void setViewport (int32 x, int32 y, int32 width, int32 height)
 
void clearStencilBuffer (int32 index=0)
 
void clearColorBuffer (const iaColor4f &color=iaColor4f::black)
 
void clearDepthBuffer (float32 depth=1.0)
 
const iaVector3d unProject (const iaVector3d &screenpos, const iaMatrixd &modelview, const iaMatrixd &projection, const iaRectanglei &viewport) const
 
const iaVector3d project (const iaVector3d &objectSpacePos, const iaMatrixd &modelview, const iaMatrixd &projection, const iaRectanglei &viewport) const
 
void setStencilTestActive (bool enable)
 
bool isStencilTestActive () const
 
void setStencilFunction (iStencilFunction function, int32 ref, uint32 mask)
 
void setStencilOperation (iStencilOperation fail, iStencilOperation zfail, iStencilOperation zpass)
 
void setStencilMask (uint8 mask)
 
void setDepthTestActive (bool enable)
 
bool isDepthTestActive () const
 
const iRendererStatsgetStats () const
 
void destroyBuffer (uint32 bufferID)
 
void setColorID (uint64 colorID)
 
void setColor (const iaColor4f &color)
 
iRenderTargetID createRenderTarget (uint32 width, uint32 height, iColorFormat format, iRenderTargetType renderTargetType, bool useDepthBuffer)
 
void destroyRenderTarget (iRenderTargetID id)
 
void setRenderTarget (iRenderTargetID id=DEFAULT_RENDER_TARGET)
 
iRenderTargetID getRenderTarget () const
 
void readPixels (int32 x, int32 y, int32 width, int32 height, iColorFormat format, uint8 *data)
 
void setWireframeEnabled (bool active)
 
bool isWireframeEnabled () const
 
const iShaderMaterialPtrgetDefaultShader () const
 
const iShaderMaterialPtrgetColorIDMaterial () const
 
void flush ()
 
template<typename T >
void drawPoint (const iaVector2< T > &v, const iaColor4f &color)
 
template<typename T >
void drawPoint (T x, T y, const iaColor4f &color)
 
template<typename T >
void drawPoint (const iaVector3< T > &v, const iaColor4f &color)
 
template<typename T >
void drawLine (T x1, T y1, T x2, T y2, const iaColor4f &color)
 
template<typename T >
void drawLine (const iaVector2< T > &v1, const iaVector2< T > &v2, const iaColor4f &color)
 
template<typename T >
void drawLine (const iaVector3< T > &v1, const iaVector3< T > &v2, const iaColor4f &color)
 
template<typename T >
void drawLineStrip (const std::vector< iaVector2< T > > &points, const iaColor4f &color)
 
template<typename T >
void drawLineStrip (const std::vector< iaVector3< T > > &points, const iaColor4f &color)
 
template<typename T >
void drawLineLoop (const std::vector< iaVector2< T > > &points, const iaColor4f &color)
 
template<typename T >
void drawLineLoop (const std::vector< iaVector3< T > > &points, const iaColor4f &color)
 
template<typename T >
void drawRectangle (T x, T y, T width, T height, const iaColor4f &color)
 
template<typename T >
void drawRectangle (const iaRectangle< T > &rect, const iaColor4f &color)
 
template<typename T >
void drawQuad (const iaVector3< T > &o, const iaVector3< T > &u, const iaVector3< T > &v, const iaColor4f &color)
 
template<typename T >
void drawQuad (const iaMatrix< T > &matrix, const iaColor4f &color)
 
template<typename T >
void drawQuad (const iaVector3< T > &v1, const iaVector3< T > &v2, const iaVector3< T > &v3, const iaVector3< T > &v4, const iaColor4f &color)
 
template<typename T >
void drawFilledRectangle (const iaRectangle< T > &rect, const iaColor4f &color)
 
template<typename T >
void drawFilledRectangleColored (const iaRectangle< T > &rect, const iaColor4f &color1, const iaColor4f &color2, const iaColor4f &color3, const iaColor4f &color4)
 
template<typename T >
void drawFilledRectangle (T x, T y, T width, T height, const iaColor4f &color)
 
template<typename T >
void drawTexturedRectangle (T x, T y, T width, T height, const iTexturePtr &texture, const iaColor4f &color, bool blend, const iaVector2< T > &tiling)
 
template<typename T >
void drawTexturedRectangle (const iaRectangle< T > &rect, const iTexturePtr &texture, const iaColor4f &color, bool blend, const iaVector2< T > &tiling)
 
template<typename T >
void drawTexturedQuad (const iaVector3< T > &o, const iaVector3< T > &u, const iaVector3< T > &v, iTexturePtr texture, const iaColor4f &color, bool blend, const iaVector2< T > &tiling)
 
template<typename T >
void drawTexturedQuad (const iaMatrix< T > &matrix, const iTexturePtr &texture, const iaColor4f &color, bool blend, const iaVector2< T > &tiling)
 
template<typename T >
void drawTexturedQuad (const iaVector3< T > &v1, const iaVector3< T > &v2, const iaVector3< T > &v3, const iaVector3< T > &v4, const iTexturePtr &texture, const iaColor4f &color, bool blend, const iaVector2< T > &tiling)
 
template<typename T >
void drawSprite (const iaMatrix< T > &matrix, const iSpritePtr &sprite, uint32 frameIndex, const iaVector2< T > &size, const iaColor4f &color, bool blend)
 
template<typename T >
void drawCircle (const iaCircle< T > &circle, int segments, const iaColor4f &color)
 
template<typename T >
void drawCircle (const iaVector2< T > &pos, T radius, int segments, const iaColor4f &color)
 
template<typename T >
void drawCircle (T x, T y, T radius, int segments, const iaColor4f &color)
 
template<typename T >
void drawFilledCircle (const iaCircle< T > &circle, int segments, const iaColor4f &color)
 
template<typename T >
void drawFilledCircle (const iaVector2< T > &pos, T radius, int segments, const iaColor4f &color)
 
template<typename T >
void drawFilledCircle (T x, T y, T radius, int segments, const iaColor4f &color)
 
template<typename T >
void drawBox (const iAACube< T > &cube, const iaColor4f &color)
 
template<typename T >
void drawBox (const iAABox< T > &box, const iaColor4f &color)
 
template<>
void drawSprite (const iaMatrix< float32 > &matrix, const iSpritePtr &sprite, uint32 frameIndex, const iaVector2< float32 > &size, const iaColor4f &color, bool blend)
 
template<>
void drawTexturedQuad (const iaVector3< float32 > &v1, const iaVector3< float32 > &v2, const iaVector3< float32 > &v3, const iaVector3< float32 > &v4, const iTexturePtr &texture, const iaColor4f &color, bool blend, const iaVector2< float32 > &tiling)
 
template<>
void drawTexturedQuad (const iaMatrix< float32 > &matrix, const iTexturePtr &texture, const iaColor4f &color, bool blend, const iaVector2< float32 > &tiling)
 
template<>
void drawTexturedQuad (const iaVector3< float32 > &o, const iaVector3< float32 > &u, const iaVector3< float32 > &v, iTexturePtr texture, const iaColor4f &color, bool blend, const iaVector2< float32 > &tiling)
 
template<>
void drawQuad (const iaMatrix< float32 > &matrix, const iaColor4f &color)
 
template<>
void drawLineStrip (const std::vector< iaVector3< float32 > > &points, const iaColor4f &color)
 
template<>
void drawLine (const iaVector3< float32 > &v1, const iaVector3< float32 > &v2, const iaColor4f &color)
 
template<>
void drawPoint (const iaVector3< float32 > &v, const iaColor4f &color)
 
template<>
void drawBox (const iAABox< float32 > &box, const iaColor4f &color)
 
template<>
void drawQuad (const iaVector3< float32 > &o, const iaVector3< float32 > &u, const iaVector3< float32 > &v, const iaColor4f &color)
 

Friends

class iModule< iRenderer >
 
class iWindow
 
class iView
 
class iEntityScene
 

Additional Inherited Members

- Static Public Member Functions inherited from igor::iModule< iRenderer >
static IGOR_INLINE iRenderergetInstance ()
 
static IGOR_INLINE bool isInstantiated ()
 
static void create ()
 
static void destroy ()
 
- Protected Member Functions inherited from igor::iModule< iRenderer >
 iModule ()=default
 
virtual ~iModule ()=default
 

Detailed Description

renderer interface

Member Function Documentation

◆ clearColorBuffer()

void igor::iRenderer::clearColorBuffer ( const iaColor4f color = iaColor4f::black)

clears color buffer with given color

Parameters
colorthe given clear color

◆ clearDepthBuffer()

void igor::iRenderer::clearDepthBuffer ( float32  depth = 1.0)

clears depth buffer with given depth

Parameters
depththe given depth

◆ clearStencilBuffer()

void igor::iRenderer::clearStencilBuffer ( int32  index = 0)

clears swtencil buffer with clear depth

◆ createRenderTarget()

iRenderTargetID igor::iRenderer::createRenderTarget ( uint32  width,
uint32  height,
iColorFormat  format,
iRenderTargetType  renderTargetType,
bool  useDepthBuffer 
)

creates a render target

Parameters
widththe width of the render target in pixel/texel
heightthe height of the render target in pixel/texel
formatthe color format of the render target
renderTargetTypethe render target type
useDepthBufferif true render target is having a depth buffer
Returns
id of render target

◆ deinit()

void igor::iRenderer::deinit ( )

cleanup renderer

◆ destroyBuffer()

void igor::iRenderer::destroyBuffer ( uint32  bufferID)

// TODO remove

◆ destroyRenderTarget()

void igor::iRenderer::destroyRenderTarget ( iRenderTargetID  id)

destroys render target by id

Parameters
idthe given render target id

◆ drawBox() [1/5]

template<>
void igor::iRenderer::drawBox ( const iAABox< float32 > &  box,
const iaColor4f &  color 
)
inline

◆ drawBox() [2/5]

template<typename T >
void igor::iRenderer::drawBox ( const iAABox< T > &  box,
const iaColor4f &  color 
)

◆ drawBox() [3/5]

template<typename T >
void igor::iRenderer::drawBox ( const iAABox< T > &  box,
const iaColor4f color = iaColor4f::white 
)

draw box based on given axis aligned box

Parameters
boxthe given box
colorthe color to draw with

◆ drawBox() [4/5]

template<typename T >
void igor::iRenderer::drawBox ( const iAACube< T > &  cube,
const iaColor4f &  color 
)

◆ drawBox() [5/5]

template<typename T >
void igor::iRenderer::drawBox ( const iAACube< T > &  cube,
const iaColor4f color = iaColor4f::white 
)

draw box based on given axis aligned cube

positioned based on current model view and projection matrices

Parameters
cubethe given cube
colorthe color to draw with

◆ drawBuffer()

void igor::iRenderer::drawBuffer ( iVertexArrayPtr  vertexArray,
iRenderPrimitive  primitiveType,
iMaterialPtr  material = nullptr 
)

draws buffer with given target material and primitive type

Parameters
vertexArraythe buffer to draw
primitiveTypethe given primitive type
materialthe target material (optional)

◆ drawCircle() [1/6]

template<typename T >
void igor::iRenderer::drawCircle ( const iaCircle< T > &  circle,
int  segments,
const iaColor4f &  color 
)

◆ drawCircle() [2/6]

template<typename T >
void igor::iRenderer::drawCircle ( const iaCircle< T > &  circle,
int  segments = 16,
const iaColor4f color = iaColor4f::white 
)

draw a circle.

Parameters
circlecircle definition to draw
segmentssegments count
colorthe color to draw with

◆ drawCircle() [3/6]

template<typename T >
void igor::iRenderer::drawCircle ( const iaVector2< T > &  pos,
radius,
int  segments,
const iaColor4f &  color 
)

◆ drawCircle() [4/6]

template<typename T >
void igor::iRenderer::drawCircle ( const iaVector2< T > &  pos,
radius,
int  segments = 16,
const iaColor4f color = iaColor4f::white 
)

draw a circle.

Parameters
poscenter position
radiusradius of the circle
segmentssegments count
colorthe color to draw with

◆ drawCircle() [5/6]

template<typename T >
void igor::iRenderer::drawCircle ( x,
y,
radius,
int  segments,
const iaColor4f &  color 
)

◆ drawCircle() [6/6]

template<typename T >
void igor::iRenderer::drawCircle ( x,
y,
radius,
int  segments = 16,
const iaColor4f color = iaColor4f::white 
)

draw a circle.

Parameters
xhorizontal center position
yvertical center position
radiusradius of the circle
segmentssegments count
colorthe color to draw with

◆ drawFilledCircle() [1/6]

template<typename T >
void igor::iRenderer::drawFilledCircle ( const iaCircle< T > &  circle,
int  segments,
const iaColor4f &  color 
)

◆ drawFilledCircle() [2/6]

template<typename T >
void igor::iRenderer::drawFilledCircle ( const iaCircle< T > &  circle,
int  segments = 16,
const iaColor4f color = iaColor4f::white 
)

draw a filled circle.

Parameters
circlecircle definition to draw
segmentssegments count
colorthe color to draw with

◆ drawFilledCircle() [3/6]

template<typename T >
void igor::iRenderer::drawFilledCircle ( const iaVector2< T > &  pos,
radius,
int  segments,
const iaColor4f &  color 
)

◆ drawFilledCircle() [4/6]

template<typename T >
void igor::iRenderer::drawFilledCircle ( const iaVector2< T > &  pos,
radius,
int  segments = 16,
const iaColor4f color = iaColor4f::white 
)

draw a filled circle.

Parameters
poscenter position
radiusradius of the circle
segmentssegments count
colorthe color to draw with

◆ drawFilledCircle() [5/6]

template<typename T >
void igor::iRenderer::drawFilledCircle ( x,
y,
radius,
int  segments,
const iaColor4f &  color 
)

◆ drawFilledCircle() [6/6]

template<typename T >
void igor::iRenderer::drawFilledCircle ( x,
y,
radius,
int  segments = 16,
const iaColor4f color = iaColor4f::white 
)

draw a filled circle.

Parameters
xhorizontal center position
yvertical center position
radiusradius of the circle
segmentssegments count
colorthe color to draw with

◆ drawFilledRectangle() [1/4]

template<typename T >
void igor::iRenderer::drawFilledRectangle ( const iaRectangle< T > &  rect,
const iaColor4f &  color 
)

◆ drawFilledRectangle() [2/4]

template<typename T >
void igor::iRenderer::drawFilledRectangle ( const iaRectangle< T > &  rect,
const iaColor4f color = iaColor4f::white 
)

draw filled rectangle (z = 0)

Parameters
rectthe rectangle to draw
colorthe color to draw with

◆ drawFilledRectangle() [3/4]

template<typename T >
void igor::iRenderer::drawFilledRectangle ( x,
y,
width,
height,
const iaColor4f &  color 
)

◆ drawFilledRectangle() [4/4]

template<typename T >
void igor::iRenderer::drawFilledRectangle ( x,
y,
width,
height,
const iaColor4f color = iaColor4f::white 
)

draw filled rectangle (z = 0)

Parameters
xhorizontal position
yvertical position
widthhorizontal size
heightvertical size
colorthe color to draw with

◆ drawFilledRectangleColored() [1/2]

template<typename T >
void igor::iRenderer::drawFilledRectangleColored ( const iaRectangle< T > &  rect,
const iaColor4f color1,
const iaColor4f color2,
const iaColor4f color3,
const iaColor4f color4 
)

draw filled rectangle (z = 0)

Parameters
rectthe rectangle to draw
color1the color top left
color2the color bottom left
color3the color bottom right
color4the color top right

◆ drawFilledRectangleColored() [2/2]

template<typename T >
void igor::iRenderer::drawFilledRectangleColored ( const iaRectangle< T > &  rect,
const iaColor4f &  color1,
const iaColor4f &  color2,
const iaColor4f &  color3,
const iaColor4f &  color4 
)

◆ drawLine() [1/7]

template<typename T >
void igor::iRenderer::drawLine ( const iaVector2< T > &  v1,
const iaVector2< T > &  v2,
const iaColor4f &  color 
)

◆ drawLine() [2/7]

template<typename T >
void igor::iRenderer::drawLine ( const iaVector2< T > &  v1,
const iaVector2< T > &  v2,
const iaColor4f color = iaColor4f::white 
)

draw line (z = 0)

Parameters
v1position of line start
v2position of line end
colorthe color to draw with

◆ drawLine() [3/7]

template<>
void igor::iRenderer::drawLine ( const iaVector3< float32 > &  v1,
const iaVector3< float32 > &  v2,
const iaColor4f &  color 
)
inline

◆ drawLine() [4/7]

template<typename T >
void igor::iRenderer::drawLine ( const iaVector3< T > &  v1,
const iaVector3< T > &  v2,
const iaColor4f &  color 
)

◆ drawLine() [5/7]

template<typename T >
void igor::iRenderer::drawLine ( const iaVector3< T > &  v1,
const iaVector3< T > &  v2,
const iaColor4f color = iaColor4f::white 
)

draw line

Parameters
v1position of line start
v2position of line end
colorthe color to draw with

◆ drawLine() [6/7]

template<typename T >
void igor::iRenderer::drawLine ( x1,
y1,
x2,
y2,
const iaColor4f &  color 
)

◆ drawLine() [7/7]

template<typename T >
void igor::iRenderer::drawLine ( x1,
y1,
x2,
y2,
const iaColor4f color = iaColor4f::white 
)

draw line (z = 0)

Parameters
x1horizontal position of line start
y1vertical position of line start
x2horizontal position of line end
y2vertical position of line end
colorthe color to draw with

◆ drawLineLoop() [1/4]

template<typename T >
void igor::iRenderer::drawLineLoop ( const std::vector< iaVector2< T > > &  points,
const iaColor4f &  color 
)

◆ drawLineLoop() [2/4]

template<typename T >
void igor::iRenderer::drawLineLoop ( const std::vector< iaVector2< T > > &  points,
const iaColor4f color = iaColor4f::white 
)

draw line loop (z = 0)

last point will be connected to the first point to close the loop

Parameters
pointspoints to draw the line strip with
colorthe color to draw with

◆ drawLineLoop() [3/4]

template<typename T >
void igor::iRenderer::drawLineLoop ( const std::vector< iaVector3< T > > &  points,
const iaColor4f &  color 
)

◆ drawLineLoop() [4/4]

template<typename T >
void igor::iRenderer::drawLineLoop ( const std::vector< iaVector3< T > > &  points,
const iaColor4f color = iaColor4f::white 
)

draw line loop

last point will be connected to the first point to close the loop

Parameters
pointspoints to draw the line strip with
colorthe color to draw with

◆ drawLineStrip() [1/5]

template<typename T >
void igor::iRenderer::drawLineStrip ( const std::vector< iaVector2< T > > &  points,
const iaColor4f &  color 
)

◆ drawLineStrip() [2/5]

template<typename T >
void igor::iRenderer::drawLineStrip ( const std::vector< iaVector2< T > > &  points,
const iaColor4f color = iaColor4f::white 
)

draw line strip (z = 0)

Parameters
pointspoints to draw the line strip with
colorthe color to draw with

◆ drawLineStrip() [3/5]

template<>
void igor::iRenderer::drawLineStrip ( const std::vector< iaVector3< float32 > > &  points,
const iaColor4f &  color 
)
inline

◆ drawLineStrip() [4/5]

template<typename T >
void igor::iRenderer::drawLineStrip ( const std::vector< iaVector3< T > > &  points,
const iaColor4f &  color 
)

◆ drawLineStrip() [5/5]

template<typename T >
void igor::iRenderer::drawLineStrip ( const std::vector< iaVector3< T > > &  points,
const iaColor4f color = iaColor4f::white 
)

draw line strip

Parameters
pointspoints to draw the line strip with
colorthe color to draw with

◆ drawMesh()

void igor::iRenderer::drawMesh ( iMeshPtr  mesh,
iMaterialPtr  material 
)

draw mesh

positioned based on current model view and projection matrices

Parameters
meshthe given mesh to draw
materialthe target material to use

◆ drawMeshInstanced()

void igor::iRenderer::drawMeshInstanced ( iMeshPtr  mesh,
iInstancingBufferPtr  instancingBuffer,
iMaterialPtr  material = nullptr 
)

draw mesh instanced

positioned based on current model view and projection matrices

Parameters
meshthe given mesh to draw
instancingBufferthe instancing buffer
materialthe target material to use

◆ drawPoint() [1/7]

template<typename T >
void igor::iRenderer::drawPoint ( const iaVector2< T > &  v,
const iaColor4f &  color 
)

◆ drawPoint() [2/7]

template<typename T >
void igor::iRenderer::drawPoint ( const iaVector2< T > &  v,
const iaColor4f color = iaColor4f::white 
)

draw point at given position (z = 0)

Parameters
vposition
colorthe color to draw with

◆ drawPoint() [3/7]

template<>
void igor::iRenderer::drawPoint ( const iaVector3< float32 > &  v,
const iaColor4f &  color 
)
inline

◆ drawPoint() [4/7]

template<typename T >
void igor::iRenderer::drawPoint ( const iaVector3< T > &  v,
const iaColor4f &  color 
)

◆ drawPoint() [5/7]

template<typename T >
void igor::iRenderer::drawPoint ( const iaVector3< T > &  v,
const iaColor4f color = iaColor4f::white 
)

draw point at given position

Parameters
vposition
colorthe color to draw with

◆ drawPoint() [6/7]

template<typename T >
void igor::iRenderer::drawPoint ( x,
y,
const iaColor4f &  color 
)

◆ drawPoint() [7/7]

template<typename T >
void igor::iRenderer::drawPoint ( x,
y,
const iaColor4f color = iaColor4f::white 
)

draw point at given position (z = 0)

Parameters
xhorizontal position
yvertical position
colorthe color to draw with

◆ drawQuad() [1/8]

template<>
void igor::iRenderer::drawQuad ( const iaMatrix< float32 > &  matrix,
const iaColor4f &  color 
)
inline

◆ drawQuad() [2/8]

template<typename T >
void igor::iRenderer::drawQuad ( const iaMatrix< T > &  matrix,
const iaColor4f &  color 
)

◆ drawQuad() [3/8]

template<typename T >
void igor::iRenderer::drawQuad ( const iaMatrix< T > &  matrix,
const iaColor4f color = iaColor4f::white 
)

draws a unit sized quad multiplied with given matrix

Parameters
matrixthe given matrix
colorthe color to draw with

◆ drawQuad() [4/8]

template<>
void igor::iRenderer::drawQuad ( const iaVector3< float32 > &  o,
const iaVector3< float32 > &  u,
const iaVector3< float32 > &  v,
const iaColor4f &  color 
)
inline

◆ drawQuad() [5/8]

template<typename T >
void igor::iRenderer::drawQuad ( const iaVector3< T > &  o,
const iaVector3< T > &  u,
const iaVector3< T > &  v,
const iaColor4f &  color 
)

◆ drawQuad() [6/8]

template<typename T >
void igor::iRenderer::drawQuad ( const iaVector3< T > &  o,
const iaVector3< T > &  u,
const iaVector3< T > &  v,
const iaColor4f color = iaColor4f::white 
)

draw quad

Parameters
ocenter/origin position of quad
uu/x/horizontal extension of quad
vv/y/vertical extension of quad
colorthe color to draw with

◆ drawQuad() [7/8]

template<typename T >
void igor::iRenderer::drawQuad ( const iaVector3< T > &  v1,
const iaVector3< T > &  v2,
const iaVector3< T > &  v3,
const iaVector3< T > &  v4,
const iaColor4f &  color 
)

◆ drawQuad() [8/8]

template<typename T >
void igor::iRenderer::drawQuad ( const iaVector3< T > &  v1,
const iaVector3< T > &  v2,
const iaVector3< T > &  v3,
const iaVector3< T > &  v4,
const iaColor4f color = iaColor4f::white 
)

draws a quad with 4 given points

Parameters
v1first given point
v2second given point
v3third given point
v4fourth given point
colorthe color to draw with

◆ drawRectangle() [1/4]

template<typename T >
void igor::iRenderer::drawRectangle ( const iaRectangle< T > &  rect,
const iaColor4f &  color 
)

◆ drawRectangle() [2/4]

template<typename T >
void igor::iRenderer::drawRectangle ( const iaRectangle< T > &  rect,
const iaColor4f color = iaColor4f::white 
)

draw rectangle (z = 0)

Parameters
rectthe rectangle to draw
colorthe color to draw with

◆ drawRectangle() [3/4]

template<typename T >
void igor::iRenderer::drawRectangle ( x,
y,
width,
height,
const iaColor4f &  color 
)

◆ drawRectangle() [4/4]

template<typename T >
void igor::iRenderer::drawRectangle ( x,
y,
width,
height,
const iaColor4f color = iaColor4f::white 
)

draw rectangle (z = 0)

Parameters
xhorizontal position
yvertical position
widthhorizontal size
heightvertical size
colorthe color to draw with

◆ drawSprite() [1/3]

template<>
void igor::iRenderer::drawSprite ( const iaMatrix< float32 > &  matrix,
const iSpritePtr sprite,
uint32  frameIndex,
const iaVector2< float32 > &  size,
const iaColor4f &  color,
bool  blend 
)
inline

◆ drawSprite() [2/3]

template<typename T >
void igor::iRenderer::drawSprite ( const iaMatrix< T > &  matrix,
const iSpritePtr sprite,
uint32  frameIndex,
const iaVector2< T > &  size,
const iaColor4f &  color,
bool  blend 
)

◆ drawSprite() [3/3]

template<typename T >
void igor::iRenderer::drawSprite ( const iaMatrix< T > &  matrix,
const iSpritePtr sprite,
uint32  frameIndex = 0,
const iaVector2< T > &  size = iaVector2< T >(1.0f, 1.0f),
const iaColor4f color = iaColor4f::white,
bool  blend = false 
)

draw specified frame of given sprite

Parameters
matrixthe matrix to position and scale the frame
spritethe sprite texture to use
frameIndexthe frame index in the sprite
sizethe size of the sprite (on top of matrix scale)
colorthe color to draw with
blendif true blending is used to draw the rectangle

◆ drawString() [1/2]

void igor::iRenderer::drawString ( float32  x,
float32  y,
const iaString text,
const iaColor4f color = iaColor4f::white,
float32  maxWidth = 0.0f 
)

draw string

Parameters
xhorizontal position
yvertical position
textthe text to draw
colorthe color to draw with
maxWidththe maximum width to render or else there will be line breaks

◆ drawString() [2/2]

void igor::iRenderer::drawString ( float32  x,
float32  y,
const iaString text,
iHorizontalAlignment  horz,
iVerticalAlignment  vert,
const iaColor4f color = iaColor4f::white,
float32  maxWidth = 0.0f 
)

draw string

Parameters
xhorizontal position
yvertical position
textthe text to draw
horzthe horizontal alignment
vertthe vertical alignment
colorthe color to draw with
maxWidththe maximum width to render or else there will be line breaks

◆ drawTexturedQuad() [1/9]

template<>
void igor::iRenderer::drawTexturedQuad ( const iaMatrix< float32 > &  matrix,
const iTexturePtr texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< float32 > &  tiling 
)
inline

◆ drawTexturedQuad() [2/9]

template<typename T >
void igor::iRenderer::drawTexturedQuad ( const iaMatrix< T > &  matrix,
const iTexturePtr texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< T > &  tiling 
)

◆ drawTexturedQuad() [3/9]

template<typename T >
void igor::iRenderer::drawTexturedQuad ( const iaMatrix< T > &  matrix,
const iTexturePtr texture,
const iaColor4f color = iaColor4f::white,
bool  blend = false,
const iaVector2< T > &  tiling = iaVector2< T >(static_cast< T >(1), static_cast< T >(1)) 
)

draw textured unit quad multiplied by a matrix

Parameters
matrixthe given matrix
texturethe texture to use. if invalid fallback texture is used
colorthe color to draw with
blendif true blending is used to draw the rectangle
tilingtiling of the texture in two dimensions

◆ drawTexturedQuad() [4/9]

template<>
void igor::iRenderer::drawTexturedQuad ( const iaVector3< float32 > &  o,
const iaVector3< float32 > &  u,
const iaVector3< float32 > &  v,
iTexturePtr  texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< float32 > &  tiling 
)
inline

◆ drawTexturedQuad() [5/9]

template<>
void igor::iRenderer::drawTexturedQuad ( const iaVector3< float32 > &  v1,
const iaVector3< float32 > &  v2,
const iaVector3< float32 > &  v3,
const iaVector3< float32 > &  v4,
const iTexturePtr texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< float32 > &  tiling 
)
inline

◆ drawTexturedQuad() [6/9]

template<typename T >
void igor::iRenderer::drawTexturedQuad ( const iaVector3< T > &  o,
const iaVector3< T > &  u,
const iaVector3< T > &  v,
iTexturePtr  texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< T > &  tiling 
)

◆ drawTexturedQuad() [7/9]

template<typename T >
void igor::iRenderer::drawTexturedQuad ( const iaVector3< T > &  o,
const iaVector3< T > &  u,
const iaVector3< T > &  v,
iTexturePtr  texture,
const iaColor4f color = iaColor4f::white,
bool  blend = false,
const iaVector2< T > &  tiling = iaVector2< T >(static_cast< T >(1), static_cast< T >(1)) 
)

draw textured quad

Parameters
ocenter/origin position of quad
uu/x/horizontal extension of quad
vv/y/vertical extension of quad
texturethe texture to use. if invalid fallback texture is used
colorthe color to draw with
blendif true blending is used to draw the rectangle
tilingtiling of the texture in two dimensions

◆ drawTexturedQuad() [8/9]

template<typename T >
void igor::iRenderer::drawTexturedQuad ( const iaVector3< T > &  v1,
const iaVector3< T > &  v2,
const iaVector3< T > &  v3,
const iaVector3< T > &  v4,
const iTexturePtr texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< T > &  tiling 
)

◆ drawTexturedQuad() [9/9]

template<typename T >
void igor::iRenderer::drawTexturedQuad ( const iaVector3< T > &  v1,
const iaVector3< T > &  v2,
const iaVector3< T > &  v3,
const iaVector3< T > &  v4,
const iTexturePtr texture,
const iaColor4f color = iaColor4f::white,
bool  blend = false,
const iaVector2< T > &  tiling = iaVector2< T >(static_cast< T >(1), static_cast< T >(1)) 
)

draw textured quad with four given points

Parameters
v1first given point
v2second given point
v3third given point
v4fourth given point
texturethe texture to use. if invalid fallback texture is used
colorthe color to draw with
blendif true blending is used to draw the rectangle
tilingtiling of the texture in two dimensions

◆ drawTexturedRectangle() [1/4]

template<typename T >
void igor::iRenderer::drawTexturedRectangle ( const iaRectangle< T > &  rect,
const iTexturePtr texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< T > &  tiling 
)

◆ drawTexturedRectangle() [2/4]

template<typename T >
void igor::iRenderer::drawTexturedRectangle ( const iaRectangle< T > &  rect,
const iTexturePtr texture,
const iaColor4f color = iaColor4f::white,
bool  blend = false,
const iaVector2< T > &  tiling = iaVector2< T >(static_cast< T >(1), static_cast< T >(1)) 
)

draw textured rectangle (z = 0)

Parameters
rectthe rectangle to draw
texturethe texture to use. if invalid fallback texture is used
colorthe color to draw with
blendif true blending is used to draw the rectangle
tilingtiling of the texture in two dimensions

◆ drawTexturedRectangle() [3/4]

template<typename T >
void igor::iRenderer::drawTexturedRectangle ( x,
y,
width,
height,
const iTexturePtr texture,
const iaColor4f &  color,
bool  blend,
const iaVector2< T > &  tiling 
)

◆ drawTexturedRectangle() [4/4]

template<typename T >
void igor::iRenderer::drawTexturedRectangle ( x,
y,
width,
height,
const iTexturePtr texture,
const iaColor4f color = iaColor4f::white,
bool  blend = false,
const iaVector2< T > &  tiling = iaVector2< T >(static_cast< T >(1), static_cast< T >(1)) 
)

draw textured rectangle (z = 0)

Parameters
xhorizontal position
yvertical position
widthhorizontal size
heightvertical size
texturethe texture to use. if invalid fallback texture is used
colorthe color to draw with
blendif true blending is used to draw the rectangle
tilingtiling of the texture in two dimensions

◆ flush()

void igor::iRenderer::flush ( )

draws everything that is still in the queue

◆ getCamMatrix()

const iaMatrixd & igor::iRenderer::getCamMatrix ( ) const
Returns
camera matrix in world coordinates

◆ getColorIDMaterial()

const iShaderMaterialPtr & igor::iRenderer::getColorIDMaterial ( ) const
Returns
colorID material

◆ getDefaultShader()

const iShaderMaterialPtr & igor::iRenderer::getDefaultShader ( ) const
Returns
default material

◆ getFont()

const iTextureFontPtr & igor::iRenderer::getFont ( ) const
Returns
current font in use

◆ getFontLineHeight()

float32 igor::iRenderer::getFontLineHeight ( ) const
Returns
the font line height

◆ getFontSize()

float32 igor::iRenderer::getFontSize ( ) const
Returns
the font size

◆ getLineWidth()

float32 igor::iRenderer::getLineWidth ( ) const
Returns
line width

◆ getMaterial()

const iShaderMaterialPtr & igor::iRenderer::getMaterial ( ) const
Returns
currently active material

◆ getModelMatrix()

const iaMatrixd & igor::iRenderer::getModelMatrix ( ) const
Returns
current model matrix

◆ getModelViewMatrix()

const iaMatrixd & igor::iRenderer::getModelViewMatrix ( ) const
Returns
current model view matrix

◆ getModelViewProjectionMatrix()

const iaMatrixd & igor::iRenderer::getModelViewProjectionMatrix ( ) const
Returns
current model view projection matrix

◆ getPointSize()

float32 igor::iRenderer::getPointSize ( ) const
Returns
point size

◆ getProjectionMatrix()

const iaMatrixd & igor::iRenderer::getProjectionMatrix ( ) const
Returns
current projection matrix

◆ getRenderTarget()

iRenderTargetID igor::iRenderer::getRenderTarget ( ) const
Returns
id of current active render target

◆ getStats()

const iRenderer::iRendererStats & igor::iRenderer::getStats ( ) const
Returns
copy of render stats

◆ getViewMatrix()

const iaMatrixd & igor::iRenderer::getViewMatrix ( ) const
Returns
current view matrix

◆ getViewport()

const iaRectanglei & igor::iRenderer::getViewport ( ) const
Returns
current viewport dimensions

◆ init()

void igor::iRenderer::init ( )

initializes renderer

◆ isDepthTestActive()

bool igor::iRenderer::isDepthTestActive ( ) const
Returns
true if depth test is enabled

◆ isIgnoringRenderOrder()

bool igor::iRenderer::isIgnoringRenderOrder ( )
Returns
true if render order is kept

◆ isStencilTestActive()

bool igor::iRenderer::isStencilTestActive ( ) const
Returns
true if stencil test is active

◆ isWireframeEnabled()

bool igor::iRenderer::isWireframeEnabled ( ) const
Returns
true if wireframe mode is on

◆ project()

const iaVector3d igor::iRenderer::project ( const iaVector3d objectSpacePos,
const iaMatrixd modelview,
const iaMatrixd projection,
const iaRectanglei viewport 
) const

projects a object space position in to screen space

Parameters
objectSpacePosthe object space position to project
modelviewthe model view matrix
projectionthe projection matrix
viewportthe viewport
Returns
the screen position

◆ readPixels()

void igor::iRenderer::readPixels ( int32  x,
int32  y,
int32  width,
int32  height,
iColorFormat  format,
uint8 data 
)

reads rectangular area from screen buffer

Parameters
xhorizontal position in pixel
yvertical position in pixel
widthwidth in pixel
heightheight in pixel
formatcolor format
datadestination buffer to store the data in

◆ setColor()

void igor::iRenderer::setColor ( const iaColor4f color)

sets the solid color

only used by specialized shaders. see UNIFORM_SOLIDCOLOR

Parameters
colorthe color to set

◆ setColorID()

void igor::iRenderer::setColorID ( uint64  colorID)

sets color Id to render with

is used by materials which use UNIFORM_SOLIDCOLOR to encode a color id

Parameters
colorIDnext color ID to render with

◆ setDepthTestActive()

void igor::iRenderer::setDepthTestActive ( bool  enable)

sets the depth test active/inactive

Parameters
enableif true the depth test is enabled

◆ setFallbackTexture()

void igor::iRenderer::setFallbackTexture ( const iTexturePtr texture)

sets a fallback texture if no other texture is available

by default this is already set with a generated texture by the iTextureResourceFactory

Parameters
texturethe texture to use

◆ setFont()

void igor::iRenderer::setFont ( const iTextureFontPtr font)

sets font to use

Parameters
fontthe font to use

◆ setFontLineHeight()

void igor::iRenderer::setFontLineHeight ( float32  lineHeight)

sets font line height

Parameters
lineHeightthe font line height

◆ setFontSize()

void igor::iRenderer::setFontSize ( float32  fontSize)

sets font size to use

Parameters
fontSizethe font size to use

◆ setIgnoreRenderOrder()

void igor::iRenderer::setIgnoreRenderOrder ( bool  ignoreRenderOrder = true)

sets ignore render order flag

If render order is ignored the amount of draw calls will be reduced but this could cause massive artefacts. Only use this if you know what xou are doing.

By default the renderer will always flush when the next render call changes the type of thing we are rendering.

For example: Points to Lines or Buffers to Quads

Parameters
ignoreRenderOrderif true render order will be ignored

◆ setLightAmbient()

void igor::iRenderer::setLightAmbient ( int32  lightnum,
iaColor3f ambient 
)

◆ setLightDiffuse()

void igor::iRenderer::setLightDiffuse ( int32  lightnum,
iaColor3f diffuse 
)

◆ setLightPosition()

void igor::iRenderer::setLightPosition ( int32  lightnum,
const iaVector3d pos 
)

◆ setLightSpecular()

void igor::iRenderer::setLightSpecular ( int32  lightnum,
iaColor3f specular 
)

◆ setLineWidth()

void igor::iRenderer::setLineWidth ( float32  lineWidth)

sets line render width

Parameters
lineWidthline render width

◆ setModelMatrix()

void igor::iRenderer::setModelMatrix ( const iaMatrixd matrix)

sets the model matrix

Parameters
matrixmatrix to set the model matrix

◆ setOrtho()

void igor::iRenderer::setOrtho ( float64  left,
float64  right,
float64  bottom,
float64  top,
float64  nearPlain,
float64  farPlain 
)

set projection matrix with orthogonal projection

Parameters
leftleft bounding
rightright bounding
bottombottom bounding
toptop bounding
nearPlainnear plane distance
farPlainfar plane distance

◆ setPerspective()

void igor::iRenderer::setPerspective ( float64  fov,
float64  aspect,
float64  nearPlain,
float64  farPlain 
)

set projection matrix with perspective projection

Parameters
fovfield of view in degrees
aspectaspect ratio of screen
nearPlainnear plane distance
farPlainfar plane distance

◆ setPointSize()

void igor::iRenderer::setPointSize ( float32  pointSize)

sets point size

Parameters
pointSizepoint size

◆ setProjectionMatrix()

void igor::iRenderer::setProjectionMatrix ( const iaMatrixd matrix)

sets projection matrix

Parameters
matrixthe new projection matrix

◆ setRenderTarget()

void igor::iRenderer::setRenderTarget ( iRenderTargetID  id = DEFAULT_RENDER_TARGET)

sets the current render target by id

Parameters
idthe render target id to be set current

◆ setShaderMaterial()

void igor::iRenderer::setShaderMaterial ( const iShaderMaterialPtr material)

sets current material to render with

Parameters
materialthe material to render with

◆ setStencilFunction()

void igor::iRenderer::setStencilFunction ( iStencilFunction  function,
int32  ref,
uint32  mask 
)

sets the stencil function

Parameters
functionthe stencil function (legal values are Never, Less, LessOrEqual, Greater, GreaterOrEqual, Equal, NotEqual, and Always)
refthe reference value
maskthe mask value to gate the result of the test

◆ setStencilMask()

void igor::iRenderer::setStencilMask ( uint8  mask)

sets the stencil mask value

Parameters
maskthe stencil mas

◆ setStencilOperation()

void igor::iRenderer::setStencilOperation ( iStencilOperation  fail,
iStencilOperation  zfail,
iStencilOperation  zpass 
)

sets the stencil test actions

legal values are Keep, Zero, Replace, Increment, IncrementWrap, Decrement, DecrementWrap, and Invert

Parameters
failaction when stencil test fails
zfailaction when stencil test passes but depth test fails
zpassaction when stencil and depth test passed

◆ setStencilTestActive()

void igor::iRenderer::setStencilTestActive ( bool  enable)

enables/disables stencil test

Parameters
enableif true stencil test will be enabled

◆ setViewMatrix()

void igor::iRenderer::setViewMatrix ( const iaMatrixd matrix)

sets the model matrix

Parameters
matrixmatrix to set the model matrix

◆ setViewMatrixFromCam()

void igor::iRenderer::setViewMatrixFromCam ( const iaMatrixd camMatrix)

sets view matrix from camera matrix

Parameters
camMatrixthe camera position and orientation in world space

◆ setViewport() [1/2]

void igor::iRenderer::setViewport ( const iaRectanglei viewport)

sets viewport dimensions

Parameters
viewportthe new viewport

◆ setViewport() [2/2]

void igor::iRenderer::setViewport ( int32  x,
int32  y,
int32  width,
int32  height 
)

sets viewport dimensions

Parameters
xhorizontal position
yvertical position
widthwidth
heightheight

◆ setWireframeEnabled()

void igor::iRenderer::setWireframeEnabled ( bool  active)

sets globally forced wireframe mode

Parameters
activeif true from now on everything is rendered in wireframe

◆ unProject()

const iaVector3d igor::iRenderer::unProject ( const iaVector3d screenpos,
const iaMatrixd modelview,
const iaMatrixd projection,
const iaRectanglei viewport 
) const

projects a screen position in to object space position

Parameters
screenposthe screen position (vertical origin is at top of screen)
modelviewthe model view matrix
projectionthe projection matrix
viewportthe viewport
Returns
world position of projection screen position

Friends And Related Function Documentation

◆ iEntityScene

friend class iEntityScene
friend

◆ iModule< iRenderer >

friend class iModule< iRenderer >
friend

◆ iView

friend class iView
friend

◆ iWindow

friend class iWindow
friend

The documentation for this class was generated from the following files: