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

#include <RE_RenderUI.h>

+ Inheritance diagram for RE_RenderUI:

Public Member Functions

 RE_RenderUI ()
 
virtual ~RE_RenderUI ()
 
void prepare (fpreal xperpixel, fpreal yperpixel, fpreal xorigin, fpreal yorigin)
 
virtual void draw (RE_Render *r)
 
virtual void clearAllData ()
 
void bumpLayer (int delta)
 
virtual void setZStart (fpreal32 zStart)
 
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_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

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 ()
 

Protected Attributes

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 29 of file RE_RenderUI.h.

Constructor & Destructor Documentation

RE_RenderUI::RE_RenderUI ( )
virtual RE_RenderUI::~RE_RenderUI ( )
virtual

Member Function Documentation

virtual void RE_RenderUI::addVertex ( fpreal32  x,
fpreal32  y,
fpreal32  z,
fpreal32  u = -1.0f,
fpreal32  v = -1.0f 
)
protectedvirtual

The underlying function for adding a new vertex to our data arrays.

virtual bool RE_RenderUI::applyDepthTestingToText ( ) const
protectedvirtual
void RE_RenderUI::arcfS ( int  x,
int  y,
int  r,
int  angle_start,
int  angle_end 
)
void RE_RenderUI::arcfW ( float  x,
float  y,
float  r,
int  angle_start,
int  angle_end 
)
void RE_RenderUI::arcS ( int  x,
int  y,
int  r,
int  angle_start,
int  angle_end 
)
void RE_RenderUI::arcW ( float  x,
float  y,
float  r,
int  angle_start,
int  angle_end 
)
void RE_RenderUI::beginClosedLine ( )
void RE_RenderUI::beginLine ( )
void RE_RenderUI::beginLines ( )
void RE_RenderUI::beginPoint ( )
void RE_RenderUI::beginPolygon ( int  concave)
void RE_RenderUI::beginQuads ( )
void RE_RenderUI::beginQuadStrip ( )
void RE_RenderUI::beginTriangleFan ( )
void RE_RenderUI::beginTriangles ( )

These functions mark the start or end of primitives.

void RE_RenderUI::beginTriMesh ( )
virtual void RE_RenderUI::bindVertexArrays ( RE_Render r)
protectedvirtual
void RE_RenderUI::box2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RE_RenderUI::boxf2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RE_RenderUI::bumpLayer ( int  delta)

Change the rendering "layer". This just modifies the depth coordinate of the primitives.

void RE_RenderUI::c3DW ( const fpreal32  clr[3])
inline

Definition at line 314 of file RE_RenderUI.h.

void RE_RenderUI::c4DW ( const fpreal32  clr[4])
inline

Definition at line 320 of file RE_RenderUI.h.

void RE_RenderUI::circlefS ( int  x,
int  y,
int  r 
)
void RE_RenderUI::circlefW ( float  x,
float  y,
float  r 
)

Filled arcs.

void RE_RenderUI::circleS ( int  x,
int  y,
int  r 
)
void RE_RenderUI::circleW ( float  x,
float  y,
float  r 
)

Unfilled arcs.

virtual void RE_RenderUI::clearAllData ( )
virtual
void RE_RenderUI::clearSourceData ( )
protected
RE_Texture* RE_RenderUI::createPatternTexture ( RE_Render r)
protected
virtual void RE_RenderUI::createVertexArrays ( RE_Render r,
int  nelems 
)
protectedvirtual
virtual void RE_RenderUI::draw ( RE_Render r)
virtual

Reimplemented in RE_RenderFlush.

void RE_RenderUI::endLine ( )
void RE_RenderUI::endLines ( )
void RE_RenderUI::endPoint ( )
void RE_RenderUI::endPolygon ( )
void RE_RenderUI::endQuads ( )
void RE_RenderUI::endQuadStrip ( )
void RE_RenderUI::endTriangleFan ( )
void RE_RenderUI::endTriangles ( )
void RE_RenderUI::endTriMesh ( )
virtual void RE_RenderUI::fillVertexArrays ( RE_Render r,
int  nelems 
)
protectedvirtual
fpreal32 RE_RenderUI::getAlpha ( ) const
static fpreal32 RE_RenderUI::getBufferedRenderZBump ( )
static
void RE_RenderUI::getColor ( UT_Color c) const
static RE_ShaderHandle* RE_RenderUI::getUIShaderHandle ( RE_Render r)
static

Get some standard fonts.

fpreal32 RE_RenderUI::getXOrigin ( ) const
inline

Definition at line 64 of file RE_RenderUI.h.

fpreal32 RE_RenderUI::getXPerPixel ( ) const
inline

Get x or y distance in current units that corresponds to 1 pixel.

Definition at line 60 of file RE_RenderUI.h.

fpreal32 RE_RenderUI::getYOrigin ( ) const
inline

Definition at line 66 of file RE_RenderUI.h.

fpreal32 RE_RenderUI::getYPerPixel ( ) const
inline

Definition at line 62 of file RE_RenderUI.h.

fpreal32 RE_RenderUI::getZEnd ( ) const
fpreal32 RE_RenderUI::getZStart ( ) const
bool RE_RenderUI::hasAnyData ( )
protected
void RE_RenderUI::incrementZEnd ( )
static void RE_RenderUI::initUIShaderUniforms ( RE_Render r,
RE_ShaderHandle shader 
)
static
static void RE_RenderUI::initUIShaderUniforms ( RE_Render r,
RE_Shader shader 
)
static
void RE_RenderUI::popColor ( )
void RE_RenderUI::popDepthStateAfterDraw ( RE_Render r)
protected
void RE_RenderUI::popLineSmoothing ( )
void RE_RenderUI::popLineStyle ( )
void RE_RenderUI::popLineWidth ( )
void RE_RenderUI::popPointSize ( )
void RE_RenderUI::prepare ( fpreal  xperpixel,
fpreal  yperpixel,
fpreal  xorigin,
fpreal  yorigin 
)
bool RE_RenderUI::prepareText ( RE_Render r,
bool  use_shared_buffers 
)
protected
void RE_RenderUI::pushColor ( )

These are options that can change per-vertex.

Examples:
DM/DM_InfoHook.C, and DM/DM_OverdrawHook.C.
void RE_RenderUI::pushColor ( const UT_Color c,
fpreal32  a = 1.0f 
)
void RE_RenderUI::pushColor ( fpreal32  r,
fpreal32  g,
fpreal32  b,
fpreal32  a = 1.0f 
)
void RE_RenderUI::pushDepthStateBeforeDraw ( RE_Render r)
protected
void RE_RenderUI::pushLineSmoothing ( bool  smooth_lines)

Line options that can change per-line.

void RE_RenderUI::pushLineSmoothing ( )
void RE_RenderUI::pushLineStyle ( RE_LineStyle  style)
void RE_RenderUI::pushLineStyle ( )
void RE_RenderUI::pushLineWidth ( fpreal32  width)
void RE_RenderUI::pushLineWidth ( )
void RE_RenderUI::pushPointSize ( fpreal32  size)

Point options that can change per-point.

void RE_RenderUI::putChar ( utf32  c)
void RE_RenderUI::putMultiLineString ( const utf8 str)
void RE_RenderUI::putString ( RE_Font font,
const utf8 start,
const utf8 end,
UT_Unicode::transform xform = nullptr 
)
void RE_RenderUI::putString ( RE_Font font,
const UT_StringView sv,
UT_Unicode::transform xform = nullptr 
)
inline

Definition at line 149 of file RE_RenderUI.h.

void RE_RenderUI::putString ( const utf8 start,
const utf8 end 
)
void RE_RenderUI::putString ( const utf8 str)
void RE_RenderUI::rect2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RE_RenderUI::rect2DW ( fpreal32  x1,
fpreal32  y1,
fpreal32  x2,
fpreal32  y2 
)

Unfilled rectangles.

void RE_RenderUI::rectf2DS ( int  x1,
int  y1,
int  x2,
int  y2 
)
void RE_RenderUI::rectf2DW ( fpreal32  x1,
fpreal32  y1,
fpreal32  x2,
fpreal32  y2 
)

Filled rectangles.

void RE_RenderUI::renderText ( RE_Render r)
protected
void RE_RenderUI::resetCurrentZ ( )
protected
void RE_RenderUI::ringfS ( int  x,
int  y,
int  inner_r,
int  outer_r 
)
void RE_RenderUI::ringfW ( float  x,
float  y,
float  inner_r,
float  outer_r 
)

Partially filled circles (filled between inner and outer radii).

void RE_RenderUI::sectorfW ( float  x,
float  y,
float  inner_r,
float  outer_r,
float  angle_start,
float  angle_end 
)
void RE_RenderUI::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).

void RE_RenderUI::setAlpha ( fpreal32  a)
void RE_RenderUI::setColor ( const UT_Color c,
fpreal32  a = 1.0f 
)
void RE_RenderUI::setColor ( fpreal32  r,
fpreal32  g,
fpreal32  b,
fpreal32  a = 1.0f 
)
void RE_RenderUI::setFont ( RE_Font font)

Text rendering functions.

Examples:
DM/DM_InfoHook.C.
void RE_RenderUI::setLineSmoothing ( bool  smooth_lines)
void RE_RenderUI::setLineStyle ( RE_LineStyle  style)
void RE_RenderUI::setLineWidth ( fpreal32  width)
void RE_RenderUI::setPointSize ( fpreal32  size)
virtual void RE_RenderUI::setZStart ( fpreal32  zStart)
virtual

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 in RE_RenderFlush.

void RE_RenderUI::t2DW ( const fpreal32  tx[2])
inline

Set vertex attributes.

Definition at line 308 of file RE_RenderUI.h.

void RE_RenderUI::textMove3W ( float  x,
float  y,
float  z 
)
void RE_RenderUI::textMoveS ( int  x,
int  y 
)
void RE_RenderUI::textMoveW ( fpreal32  x,
fpreal32  y 
)
virtual void RE_RenderUI::unbindVertexArrays ( RE_Render r)
protectedvirtual
void RE_RenderUI::v2DI ( const int  vtx[2])
inline

Definition at line 347 of file RE_RenderUI.h.

void RE_RenderUI::v2DW ( const fpreal32  vtx[2])

Create vertices for primitives.

void RE_RenderUI::v3DW ( const float  vtx[3])

A few limited functions for handling drawing to a 3D viewport.

void RE_RenderUI::vertex2DI ( int  x,
int  y 
)
inline

Definition at line 333 of file RE_RenderUI.h.

void RE_RenderUI::vertex2DS ( int  x,
int  y 
)
inline

Definition at line 340 of file RE_RenderUI.h.

void RE_RenderUI::vertex2DW ( fpreal32  x,
fpreal32  y 
)
inline

Definition at line 326 of file RE_RenderUI.h.

void RE_RenderUI::vertex3DW ( float  x,
float  y,
float  z 
)

Member Data Documentation

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myColorArray
protected

Definition at line 233 of file RE_RenderUI.h.

UT_Array<UT_FRGBA> RE_RenderUI::myColorData
protected

Definition at line 232 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myImageUVArray
protected

Definition at line 237 of file RE_RenderUI.h.

UT_Vector2Array RE_RenderUI::myImageUVData
protected

Definition at line 236 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myLineElementArray
protected

Definition at line 245 of file RE_RenderUI.h.

UT_IntArray RE_RenderUI::myLineElementData
protected

Line primitives.

Definition at line 244 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myLineSmoothElementArray
protected

Definition at line 247 of file RE_RenderUI.h.

UT_IntArray RE_RenderUI::myLineSmoothElementData
protected

Definition at line 246 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myLineWideElementArray
protected

Definition at line 249 of file RE_RenderUI.h.

UT_IntArray RE_RenderUI::myLineWideElementData
protected

Definition at line 248 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myPatternUVArray
protected

Definition at line 235 of file RE_RenderUI.h.

UT_Vector2Array RE_RenderUI::myPatternUVData
protected

Definition at line 234 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myPointElementArray
protected

Definition at line 253 of file RE_RenderUI.h.

UT_IntArray RE_RenderUI::myPointElementData
protected

Point primitives.

Definition at line 252 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myPointSizeArray
protected

Definition at line 255 of file RE_RenderUI.h.

UT_Fpreal32Array RE_RenderUI::myPointSizeData
protected

Definition at line 254 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myPositionArray
protected

Definition at line 231 of file RE_RenderUI.h.

UT_Vector3Array RE_RenderUI::myPositionData
protected

Basic vertex properties.

Definition at line 230 of file RE_RenderUI.h.

UT_UniquePtr<RE_VertexArray> RE_RenderUI::myTriangleElementArray
protected

Definition at line 241 of file RE_RenderUI.h.

UT_IntArray RE_RenderUI::myTriangleElementData
protected

Triangle primitives.

Definition at line 240 of file RE_RenderUI.h.


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