HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_RenderFlush Class Reference

#include <RE_RenderFlush.h>

+ Inheritance diagram for RE_RenderFlush:

Public Member Functions

 RE_RenderFlush ()
 
 ~RE_RenderFlush () override
 
void setViewportRenderer ()
 Flag this object as being used to render into a 3D viewport. More...
 
void setContextData (RE_PerContextData *data)
 Holds a pointer to per-context data we use to provide OGL buffers. More...
 
RE_PerContextDatagetContextData ()
 
void setZStart (fpreal32 zStart) override
 
void draw (RE_Render *r) override
 
bool flushRender (bool render_complete=false)
 
void pushViewport ()
 
void popViewport ()
 
void pushState (int viewing)
 
void popState ()
 
void handleViewportUpdate (const UT_DimRect &rect)
 
void handleScissorRectUpdate (const UT_DimRect &rect)
 
void handleScissorEnableUpdate (bool enable)
 
void clipPlaneDisable (int which)
 
void clipPlaneEnable (int which, const UT_Vector4D &plane)
 
UT_Vector4D planeToEyeCoords (const UT_Vector4D &plane)
 
void replacePushClipPlane (int which, const UT_Vector4D &plane, bool xform_to_eye_coords, RE_UniformStackEntry &stack_entry)
 
void replacePopClipPlane (int which, const RE_UniformStackEntry &stack_entry)
 
void pushMatrix (bool all_matrices=true, RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void popMatrix (bool all_matrices=true, RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void loadIdentityMatrix (RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void loadMatrix (const UT_Matrix4 &m, RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void loadMatrix (const UT_DMatrix4 &m, RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void getMatrix (UT_Matrix4 &m, RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void getMatrix (UT_DMatrix4 &m, RE_MatrixMode mmode=RE_MATRIX_VIEWING)
 
void multiplyMatrix (const UT_Matrix4 &m)
 
void multiplyMatrix (const UT_DMatrix4 &m)
 
void translate (float x, float y, float z=0.0)
 
void scale (float x=1.0, float y=1.0, float z=1.0)
 
void rotate (float angle, char axis)
 
void ortho2DW (float l, float r, float b, float t)
 
void orthoFromViewport2DI (const UT_DimRect &rect)
 
void ortho3DW (float l, float r, float b, float t, float n, float f)
 
void window3DW (float l, float r, float b, float t, float n, float f)
 
void getProjectiveTextureTransform (const RE_Light *light, bool bias, UT_Matrix4 &mat)
 
- Public Member Functions inherited from RE_RenderUI
 RE_RenderUI ()
 
virtual ~RE_RenderUI ()
 
void prepare (fpreal xperpixel, fpreal yperpixel, fpreal xorigin, fpreal yorigin)
 
virtual void clearAllData ()
 
void bumpLayer (int delta)
 
fpreal32 getZStart () const
 
fpreal32 getZEnd () const
 
void incrementZEnd ()
 
fpreal32 getXPerPixel () const
 Get x or y distance in current units that corresponds to 1 pixel. More...
 
fpreal32 getYPerPixel () const
 
fpreal32 getXOrigin () const
 
fpreal32 getYOrigin () const
 
void pushColor ()
 These are options that can change per-vertex. More...
 
void pushColor (const UT_Color &c, fpreal32 a=1.0f)
 
void pushColor (fpreal32 r, fpreal32 g, fpreal32 b, fpreal32 a=1.0f)
 
void setColor (const UT_Color &c, fpreal32 a=1.0f)
 
void setColor (fpreal32 r, fpreal32 g, fpreal32 b, fpreal32 a=1.0f)
 
void setAlpha (fpreal32 a)
 
void popColor ()
 
void getColor (UT_Color &c) const
 
fpreal32 getAlpha () const
 
void pushPointSize (fpreal32 size)
 Point options that can change per-point. More...
 
void setPointSize (fpreal32 size)
 
void popPointSize ()
 
void pushLineSmoothing (bool smooth_lines)
 Line options that can change per-line. More...
 
void pushLineSmoothing ()
 
void setLineSmoothing (bool smooth_lines)
 
void popLineSmoothing ()
 
void pushLineStyle (RE_LineStyle style)
 
void pushLineStyle ()
 
void setLineStyle (RE_LineStyle style)
 
void popLineStyle ()
 
void pushLineWidth (fpreal32 width)
 
void pushLineWidth ()
 
void setLineWidth (fpreal32 width)
 
void popLineWidth ()
 
void beginTriangles ()
 These functions mark the start or end of primitives. More...
 
void endTriangles ()
 
void beginTriangleFan ()
 
void endTriangleFan ()
 
void beginTriMesh ()
 
void endTriMesh ()
 
void beginQuads ()
 
void endQuads ()
 
void beginQuadStrip ()
 
void endQuadStrip ()
 
void beginPolygon (int concave)
 
void endPolygon ()
 
void beginLine ()
 
void beginClosedLine ()
 
void endLine ()
 
void beginLines ()
 
void endLines ()
 
void beginPoint ()
 
void endPoint ()
 
void t2DW (const fpreal32 tx[2])
 Set vertex attributes. More...
 
void c3DW (const fpreal32 clr[3])
 
void c4DW (const fpreal32 clr[4])
 
void v2DW (const fpreal32 vtx[2])
 Create vertices for primitives. More...
 
void v2DI (const int vtx[2])
 
void vertex2DW (fpreal32 x, fpreal32 y)
 
void vertex2DI (int x, int y)
 
void vertex2DS (int x, int y)
 
void setFont (RE_Font &font)
 Text rendering functions. More...
 
void textMoveW (fpreal32 x, fpreal32 y)
 
void textMoveS (int x, int y)
 
void putMultiLineString (const utf8 *str)
 
void putString (RE_Font &font, const utf8 *start, const utf8 *end, UT_Unicode::transform *xform=nullptr)
 
void putString (RE_Font &font, const UT_StringView &sv, UT_Unicode::transform *xform=nullptr)
 
void putString (const utf8 *start, const utf8 *end)
 
void putString (const utf8 *str)
 
void putChar (utf32 c)
 
void rect2DW (fpreal32 x1, fpreal32 y1, fpreal32 x2, fpreal32 y2)
 Unfilled rectangles. More...
 
void rect2DS (int x1, int y1, int x2, int y2)
 
void box2DS (int x1, int y1, int x2, int y2)
 
void rectf2DW (fpreal32 x1, fpreal32 y1, fpreal32 x2, fpreal32 y2)
 Filled rectangles. More...
 
void rectf2DS (int x1, int y1, int x2, int y2)
 
void boxf2DS (int x1, int y1, int x2, int y2)
 
void circleW (float x, float y, float r)
 Unfilled arcs. More...
 
void circleS (int x, int y, int r)
 
void arcW (float x, float y, float r, int angle_start, int angle_end)
 
void arcS (int x, int y, int r, int angle_start, int angle_end)
 
void circlefW (float x, float y, float r)
 Filled arcs. More...
 
void circlefS (int x, int y, int r)
 
void arcfW (float x, float y, float r, int angle_start, int angle_end)
 
void arcfS (int x, int y, int r, int angle_start, int angle_end)
 
void ringfW (float x, float y, float inner_r, float outer_r)
 Partially filled circles (filled between inner and outer radii). More...
 
void ringfS (int x, int y, int inner_r, int outer_r)
 
void sectorW (float x, float y, float inner_r, float outer_r, float angle_start, float angle_end)
 Partially filled arcs (filled between inner and outer radii). More...
 
void sectorfW (float x, float y, float inner_r, float outer_r, float angle_start, float angle_end)
 
void v3DW (const float vtx[3])
 A few limited functions for handling drawing to a 3D viewport. More...
 
void vertex3DW (float x, float y, float z)
 
void textMove3W (float x, float y, float z)
 

Static Public Member Functions

static RE_FontgetViewportFont ()
 
static UT_DMatrix4 getOrthoMatrix (float l, float r, float b, float t, float n, float f)
 
static UT_DMatrix4 getPerspectiveMatrix (float l, float r, float b, float t, float n, float f)
 
static UT_DMatrix4 getLookatMatrix (const UT_Vector3F &eye, const UT_Vector3F &target, const UT_Vector3F &up)
 
static bool mapWorld (fpreal xs, fpreal ys, const UT_DimRect &viewport, const UT_Matrix4D &proj, const UT_Matrix4D &view, fpreal *x1, fpreal *y1, fpreal *z1, fpreal *x2, fpreal *y2, fpreal *z2)
 
static bool mapScreen (fpreal xw, fpreal yw, fpreal zw, const UT_DimRect &viewport, const UT_Matrix4D &proj, const UT_Matrix4D &view, fpreal *xs, fpreal *ys)
 
static void debugOutput (bool enable)
 
- Static Public Member Functions inherited from RE_RenderUI
static RE_ShaderHandlegetUIShaderHandle (RE_Render *r)
 Get some standard fonts. More...
 
static void initUIShaderUniforms (RE_Render *r, RE_ShaderHandle &shader)
 
static void initUIShaderUniforms (RE_Render *r, RE_Shader *shader)
 
static fpreal32 getBufferedRenderZBump ()
 

Protected Member Functions

void setRender (RE_Render *r)
 
- Protected Member Functions inherited from RE_RenderUI
virtual void addVertex (fpreal32 x, fpreal32 y, fpreal32 z, fpreal32 u=-1.0f, fpreal32 v=-1.0f)
 The underlying function for adding a new vertex to our data arrays. More...
 
virtual void createVertexArrays (RE_Render *r, int nelems)
 
virtual void fillVertexArrays (RE_Render *r, int nelems)
 
virtual void bindVertexArrays (RE_Render *r)
 
virtual void unbindVertexArrays (RE_Render *r)
 
virtual bool applyDepthTestingToText () const
 
RE_TexturecreatePatternTexture (RE_Render *r)
 
void pushDepthStateBeforeDraw (RE_Render *r)
 
void popDepthStateAfterDraw (RE_Render *r)
 
bool prepareText (RE_Render *r, bool use_shared_buffers)
 
void renderText (RE_Render *r)
 
void resetCurrentZ ()
 
bool hasAnyData ()
 
void clearSourceData ()
 

Additional Inherited Members

- Protected Attributes inherited from RE_RenderUI
UT_Vector3Array myPositionData
 Basic vertex properties. More...
 
UT_UniquePtr< RE_VertexArraymyPositionArray
 
UT_Array< UT_FRGBAmyColorData
 
UT_UniquePtr< RE_VertexArraymyColorArray
 
UT_Vector2Array myPatternUVData
 
UT_UniquePtr< RE_VertexArraymyPatternUVArray
 
UT_Vector2Array myImageUVData
 
UT_UniquePtr< RE_VertexArraymyImageUVArray
 
UT_IntArray myTriangleElementData
 Triangle primitives. More...
 
UT_UniquePtr< RE_VertexArraymyTriangleElementArray
 
UT_IntArray myLineElementData
 Line primitives. More...
 
UT_UniquePtr< RE_VertexArraymyLineElementArray
 
UT_IntArray myLineSmoothElementData
 
UT_UniquePtr< RE_VertexArraymyLineSmoothElementArray
 
UT_IntArray myLineWideElementData
 
UT_UniquePtr< RE_VertexArraymyLineWideElementArray
 
UT_IntArray myPointElementData
 Point primitives. More...
 
UT_UniquePtr< RE_VertexArraymyPointElementArray
 
UT_Fpreal32Array myPointSizeData
 
UT_UniquePtr< RE_VertexArraymyPointSizeArray
 

Detailed Description

Definition at line 22 of file RE_RenderFlush.h.

Constructor & Destructor Documentation

RE_RenderFlush::RE_RenderFlush ( )
RE_RenderFlush::~RE_RenderFlush ( )
override

Member Function Documentation

void RE_RenderFlush::clipPlaneDisable ( int  which)
void RE_RenderFlush::clipPlaneEnable ( int  which,
const UT_Vector4D plane 
)
static void RE_RenderFlush::debugOutput ( bool  enable)
static
void RE_RenderFlush::draw ( RE_Render r)
overridevirtual

Reimplemented from RE_RenderUI.

bool RE_RenderFlush::flushRender ( bool  render_complete = false)
inline

Definition at line 166 of file RE_RenderFlush.h.

RE_PerContextData* RE_RenderFlush::getContextData ( )
inline

Definition at line 34 of file RE_RenderFlush.h.

static UT_DMatrix4 RE_RenderFlush::getLookatMatrix ( const UT_Vector3F eye,
const UT_Vector3F target,
const UT_Vector3F up 
)
static
void RE_RenderFlush::getMatrix ( UT_Matrix4 m,
RE_MatrixMode  mmode = RE_MATRIX_VIEWING 
)
void RE_RenderFlush::getMatrix ( UT_DMatrix4 m,
RE_MatrixMode  mmode = RE_MATRIX_VIEWING 
)
static UT_DMatrix4 RE_RenderFlush::getOrthoMatrix ( float  l,
float  r,
float  b,
float  t,
float  n,
float  f 
)
static
static UT_DMatrix4 RE_RenderFlush::getPerspectiveMatrix ( float  l,
float  r,
float  b,
float  t,
float  n,
float  f 
)
static
void RE_RenderFlush::getProjectiveTextureTransform ( const RE_Light light,
bool  bias,
UT_Matrix4 mat 
)
static RE_Font& RE_RenderFlush::getViewportFont ( )
static
void RE_RenderFlush::handleScissorEnableUpdate ( bool  enable)
void RE_RenderFlush::handleScissorRectUpdate ( const UT_DimRect rect)
void RE_RenderFlush::handleViewportUpdate ( const UT_DimRect rect)
void RE_RenderFlush::loadIdentityMatrix ( RE_MatrixMode  mmode = RE_MATRIX_VIEWING)
void RE_RenderFlush::loadMatrix ( const UT_Matrix4 m,
RE_MatrixMode  mmode = RE_MATRIX_VIEWING 
)
void RE_RenderFlush::loadMatrix ( const UT_DMatrix4 m,
RE_MatrixMode  mmode = RE_MATRIX_VIEWING 
)
static bool RE_RenderFlush::mapScreen ( fpreal  xw,
fpreal  yw,
fpreal  zw,
const UT_DimRect viewport,
const UT_Matrix4D proj,
const UT_Matrix4D view,
fpreal xs,
fpreal ys 
)
static
static bool RE_RenderFlush::mapWorld ( fpreal  xs,
fpreal  ys,
const UT_DimRect viewport,
const UT_Matrix4D proj,
const UT_Matrix4D view,
fpreal x1,
fpreal y1,
fpreal z1,
fpreal x2,
fpreal y2,
fpreal z2 
)
static
void RE_RenderFlush::multiplyMatrix ( const UT_Matrix4 m)
void RE_RenderFlush::multiplyMatrix ( const UT_DMatrix4 m)
void RE_RenderFlush::ortho2DW ( float  l,
float  r,
float  b,
float  t 
)
void RE_RenderFlush::ortho3DW ( float  l,
float  r,
float  b,
float  t,
float  n,
float  f 
)
void RE_RenderFlush::orthoFromViewport2DI ( const UT_DimRect rect)
UT_Vector4D RE_RenderFlush::planeToEyeCoords ( const UT_Vector4D plane)
void RE_RenderFlush::popMatrix ( bool  all_matrices = true,
RE_MatrixMode  mmode = RE_MATRIX_VIEWING 
)
void RE_RenderFlush::popState ( )
void RE_RenderFlush::popViewport ( )
void RE_RenderFlush::pushMatrix ( bool  all_matrices = true,
RE_MatrixMode  mmode = RE_MATRIX_VIEWING 
)
void RE_RenderFlush::pushState ( int  viewing)
void RE_RenderFlush::pushViewport ( )
void RE_RenderFlush::replacePopClipPlane ( int  which,
const RE_UniformStackEntry stack_entry 
)
void RE_RenderFlush::replacePushClipPlane ( int  which,
const UT_Vector4D plane,
bool  xform_to_eye_coords,
RE_UniformStackEntry stack_entry 
)
void RE_RenderFlush::rotate ( float  angle,
char  axis 
)
void RE_RenderFlush::scale ( float  x = 1.0,
float  y = 1.0,
float  z = 1.0 
)
void RE_RenderFlush::setContextData ( RE_PerContextData data)

Holds a pointer to per-context data we use to provide OGL buffers.

void RE_RenderFlush::setRender ( RE_Render r)
protected
void RE_RenderFlush::setViewportRenderer ( )

Flag this object as being used to render into a 3D viewport.

void RE_RenderFlush::setZStart ( fpreal32  zStart)
overridevirtual

Set the base depth for rendering this object. Provide a function the get the final Z to use as the base for another object.

Reimplemented from RE_RenderUI.

void RE_RenderFlush::translate ( float  x,
float  y,
float  z = 0.0 
)
void RE_RenderFlush::window3DW ( float  l,
float  r,
float  b,
float  t,
float  n,
float  f 
)

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