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

#include <RE_Render.h>

+ Inheritance diagram for RE_Render:

Public Member Functions

 RE_Render (int do_foreground, const char *appname=0)
 
virtual ~RE_Render ()
 
RE_RendercreateNewRenderContext ()
 
- Public Member Functions inherited from RE_OGLRender
 RE_OGLRender (int do_foreground, const char *appname=0)
 
virtual ~RE_OGLRender ()
 
const char * className () const
 
int getContextID () const
 
bool isInitialized () const
 
RE_RendergetRender ()
 
const RE_RendergetRender () const
 
int glslMajorVersion ()
 
int glslMinorVersion ()
 
int glslMaxOutputComponents (RE_ShaderType stage)
 
int glslMaxUniformComponents (RE_ShaderType stage)
 
bool hasGLExtension (RE_Extension e) const
 
RE_OGLExtgetExt () const
 
int64 getFreeTextureMemoryKB (int64 *largest_chunk=NULL)
 
int64 getFreeBufferMemoryKB (int64 *largest_chunk=NULL)
 
int64 getFreeFramebufferMemoryKB (int64 *largest_chunk=NULL)
 
void checkForSuspendResume ()
 
RE_DisplayMode getMode () const
 
RE_VisualType getVisualType () const
 
void enableMultisample (bool enable)
 
bool isMultisampleEnabled () const
 
void enableAlphaToCoverage (bool enable)
 
bool isAlphaToCoverage () const
 
void getMaxViewportSize (int &w, int &h) const
 
int getMaxColorSamples () const
 
int getMaxDepthSamples () const
 
void setWindow (RE_Window *, bool attach=true)
 
bool makeCurrent (bool ignore_errors=false)
 
bool makeCurrentQt ()
 
bool isCurrent () const
 
bool contextIsValid () const
 
RE_OGLContext getContext () const
 
bool pushOffscreenBuffer (OGLDrawable type)
 
void popOffscreenBuffer ()
 
void setMainContext (RE_Window *w)
 
const RE_WindowgetCurrentWindow () const
 
RE_WindowgetCurrentWindow ()
 
void lockContextForRender ()
 
void unlockContextAfterRender ()
 
bool tryLockContextForRender ()
 
bool isContextLocked () const
 
void bumpRenderCount ()
 
int64 getRenderCount () const
 
int getGLError ()
 
int getNextGLError ()
 
void clearGLErrors ()
 
const char * getGLErrorString (int error)
 
void printGLError (const char *header, bool assert=false)
 
void printAllGLErrors (const char *header, bool assert=false)
 
void dumpNewState (bool show_all=false)
 
void dumpViewportState (bool show_all=false)
 
void dumpTextureState () const
 
void dumpVertexAttributes () const
 
void dumpFragmentTests (bool show_all=false) const
 
void dumpRasterizeState (bool show_all=false) const
 
void dumpTextureCacheState (int stack_level=-1) const
 
void getLimits (UT_WorkBuffer &os)
 
bool isDebugLabelSupported () const
 
bool isDebugging () const
 
int pushDebug (bool enable)
 
void popDebug (int *nest=NULL)
 
int pushDebugGroup (const char *name, int id=1987)
 
void popDebugGroup (int *nest=NULL)
 
void addComment (const char *name, RE_Severity sev=RE_SEVERITY_MESSAGE, int id=1987)
 
int pushDrawFramebuffer ()
 
int pushDrawFramebuffer (RE_OGLFramebuffer *fb)
 
void setDrawFramebuffer (RE_OGLFramebuffer *fb)
 
RE_OGLFramebuffergetDrawFramebuffer ()
 
void popDrawFramebuffer (int *nest=NULL)
 
int pushReadFramebuffer ()
 
int pushReadFramebuffer (RE_OGLFramebuffer *fb)
 
void setReadFramebuffer (RE_OGLFramebuffer *fb)
 
RE_OGLFramebuffergetReadFramebuffer ()
 
void popReadFramebuffer (int *nest=NULL)
 
void updateFramebuffer ()
 
void updateCurrentFramebuffer (RE_OGLFramebuffer *fb, bool for_draw)
 
void registerFBO (RE_OGLFramebuffer *fb, int fb_id)
 
void unregisterFBO (int id)
 
RE_OGLFramebuffergetFBO (int id) const
 
void useSampleMask (bool use)
 
bool usingSampleMask () const
 
int getMaxIntegerSamples () const
 
int getSampleMask (int mask_number)
 
void setSampleMask (int mask_number, int mask)
 
void clearC (float *color=NULL)
 
void clearZ (float z=1.0)
 
void clearCZ (float z=1.0)
 
void clearS ()
 
void enableColorBufferWriting ()
 
void disableColorBufferWriting ()
 
bool getColorBufferWriting ()
 
void updateColorBufferWriting ()
 
void setColorMask (bool red, bool green, bool blue, bool alpha)
 
void getColorMask (bool &red, bool &green, bool &blue, bool &alpha)
 
bool swapbuffers ()
 
int pushDrawBuffer (RE_RenderBuf buf=RE_BUFFER_UNINIT)
 
void popDrawBuffer (int *nest=0)
 
void setDrawBuffer (RE_RenderBuf buf)
 
RE_RenderBuf getDrawBuffer ()
 
bool getDrawBufferIsBlendable ()
 
int pushReadBuffer (RE_RenderBuf buf=RE_BUFFER_UNINIT)
 
void popReadBuffer (int *nest=0)
 
void setReadBuffer (RE_RenderBuf buf)
 
RE_RenderBuf getReadBuffer ()
 
bool isFrontBufferDirty () const
 
void setFrontBufferDirty (bool d)
 
void flush (int wait=0)
 
bool memoryBarrier (RE_MemoryBarrierBitfield barriers)
 
void viewport2DI (const UT_DimRect &rect)
 
void screenMask2DI (const UT_DimRect &rect)
 
void disableScreenMask ()
 
void intersectMask2DI (const UT_DimRect &rect)
 
UT_DimRect getScreenMask2DI ()
 
UT_DimRect getViewport2DI ()
 
bool getScreenMask ()
 
int getOGLMaxClipPlanes ()
 
void enableClipDistance (int clip_plane, bool enable)
 
bool clipDistanceEnabled (int clip_plane) const
 
void setActiveOcclusionQuery (RE_OcclusionQuery *q)
 
RE_OcclusionQuerygetActiveOcclusionQuery () const
 
int pushBackfaceCulling ()
 
int pushBackfaceCulling (bool backface)
 
void popBackfaceCulling (int *nested=0)
 
bool isBackface () const
 
void setBackface (bool removeBackface)
 
bool getReverseWinding ()
 
void setReverseWinding (bool reverse_winding)
 
RE_FaceMode getCullFace () const
 
void setCullFace (RE_FaceMode m)
 
bool isPointOffset ()
 
bool isLineOffset ()
 
bool isPolygonOffset ()
 
void pointOffset (bool onoff)
 
void lineOffset (bool onoff)
 
void polygonOffset (bool onoff)
 
void setOffsetAmount (float variable, float constant)
 
void getOffsetAmount (float *variable, float *constant) const
 
bool beginTransformFeedback (RE_PrimType mode, bool rasterize_too, int stream_bitfield=0x1)
 
void endTransformFeedback ()
 
int getNumFeedbackPrimitives (int stream=0)
 
bool hasFeedbackBufferOverflow (int stream=0)
 
bool isTransformFeedbackEnabled () const
 
RE_PrimType getFeedbackMode () const
 
bool isRasterizeEnabled () const
 
int pushLineWidth (float w)
 
void popLineWidth (int *nest=NULL)
 
float getLineWidth () const
 
float getMaxSmoothLineWidth ()
 
int pushPointSize (float size, bool program_point_size=false)
 
void popPointSize (int *nest=NULL)
 
void setPointSize (float size)
 
void setProgramPointSize (bool enable)
 
bool getProgramPointSize () const
 
int pushDepthState ()
 
void popDepthState (int *nest=NULL)
 
void enableDepthBufferWriting ()
 
void disableDepthBufferWriting ()
 
bool getDepthBufferWriting ()
 
void updateDepthBufferWriting ()
 
void enableDepthTest ()
 
void disableDepthTest ()
 
bool getDepthTest ()
 
void updateDepthTest ()
 
void setZFunction (RE_ZFunction func)
 
RE_ZFunction getZFunction () const
 
void updateZFunction () const
 
void enableDepthClamp (bool b)
 
bool getDepthClamp ()
 
void updateDepthClamp ()
 
int pushStencilState ()
 
void popStencilState (int *nest=NULL)
 
bool isStencil ()
 
void setStencil (bool enable)
 
void setSClearValue (int clearValue)
 
void setSWriteMask (int writeMask)
 
void setSFunction (RE_SFunction func, int ref, int mask)
 
void setSOperation (RE_SOperation sfail, RE_SOperation dpfail, RE_SOperation dppass)
 
void updateStencilState ()
 
void resetSFunction ()
 
void resetSWriteMask ()
 
void resetSClearValue ()
 
void resetSOperation ()
 
void enableLogicOp ()
 
void disableLogicOp ()
 
void invertPixels ()
 
void xorPixels ()
 
int pushBlendState ()
 
void popBlendState (int *nesting=0)
 
bool isBlending () const
 
void blend (int onoff)
 
void setBlendFunction (RE_BlendSourceFactor sourceFactor, RE_BlendDestFactor destFactor)
 
bool setAlphaBlendFunction (RE_BlendSourceFactor sourceFactor, RE_BlendDestFactor destFactor, bool force=false)
 
void getBlendFunction (RE_BlendSourceFactor *sourceFactor, RE_BlendDestFactor *destFactor)
 
void getAlphaBlendFunction (RE_BlendSourceFactor *sourceFactor, RE_BlendDestFactor *destFactor)
 
void blendAlpha (int onoff=1)
 
void blendAlphaPremult (bool onoff=true)
 
int pushSmoothLines ()
 
void popSmoothLines (int *nesting=0)
 
void forceSmooth ()
 
void smoothBlendLines (RE_SmoothMode mode)
 
void smoothBlendLinesNoFlagChange (bool by_smooth)
 
RE_SmoothMode getSmoothLines ()
 
int getBlendSmoothLevel () const
 
void setMaterial (const RE_MaterialPtr &mat, int layer=0, bool texture=true, RE_ShaderTarget sht=RE_SHADER_TARGET_TRIANGLE, RE_Shader *override_mat_shader=NULL)
 
int pushMaterial (const RE_MaterialPtr &mat, int layer=0, bool texture=true, RE_ShaderTarget sht=RE_SHADER_TARGET_TRIANGLE, RE_Shader *override_mat_shader=NULL)
 
int pushMaterial ()
 
void popMaterial (int *nest=NULL)
 
const RE_MaterialPtrgetDefaultMaterial ()
 
int pushShader ()
 
int pushShader (RE_Shader *s)
 
int pushShader (RE_ShaderHandle &sh)
 
void bindShader (RE_Shader *s)
 
void bindShader (RE_ShaderHandle &sh)
 
RE_ShadergetShader ()
 
void popShader (int *nest=NULL)
 
void updateShader (RE_Shader *s)
 
int pushShaderTransformFeedback (RE_Shader *sh, RE_PrimType type, bool rasterize=true, int stream_bitfield=0x1)
 
int pushShaderTransformFeedback (RE_ShaderHandle &sh, RE_PrimType type, bool rasterize=true, int stream_bitfield=0x1)
 
void popShaderTransformFeedback (int *nest=NULL)
 
void setShaderOnlyMode (bool enable)
 
void requestFixedFunction ()
 
void setPatchOuterLevel (const UT_Vector4F &outer)
 
void setPatchInnerLevel (const UT_Vector2F &inner)
 
void setPatchVertices (int num_verts)
 
bool setShaderSampleRate (fpreal rate)
 
fpreal getShaderSampleRate () const
 
bool isSampleShading () const
 
void pushUniform (RE_UniformBuiltIn bindex, RE_Uniform *var=NULL)
 
void pushUniformData (RE_UniformBuiltIn bindex, const void *data)
 
void pushUniformInt (RE_UniformBuiltIn bindex, int i)
 
void pushUniformColor (RE_UniformBuiltIn bindex, const UT_Color &clr, fpreal32 alpha=1.0f)
 
void pushUniformSampler (RE_UniformBuiltIn bindex, RE_Texture *tex)
 
void pushUniformMatrix (RE_UniformBuiltIn bindex, const UT_Matrix4D &mat)
 
void assignUniformData (RE_UniformBuiltIn bindex, const void *data)
 
void assignUniformInt (RE_UniformBuiltIn bindex, int i)
 
void assignUniformSampler (RE_UniformBuiltIn bindex, RE_Texture *tex)
 
void assignUniformColor (RE_UniformBuiltIn bindex, const UT_Color &clr, fpreal32 alpha=1.0f)
 
void assignUniformMatrix (RE_UniformBuiltIn bindex, const UT_Matrix4D &mat)
 
void popUniform (RE_UniformBuiltIn bindex)
 
void popUniformData (RE_UniformBuiltIn bindex)
 
RE_UniformgetUniform (RE_UniformBuiltIn builtin_var_type) const
 
void printBuiltInUniforms (bool bound_only)
 
void printBuiltInUniform (RE_UniformBuiltIn b)
 
int bindBuiltInUniforms (RE_Shader *s)
 
bool bindBuiltInUniform (RE_Shader *s, RE_UniformBuiltIn uniform)
 
int64 getBuiltInUniformSerial () const
 
void bumpBuiltInUniformSerial ()
 
void pushUniform (RE_Uniform &uniform)
 
void popUniform (RE_Uniform &uniform)
 
void setFragmentDerivativeHint (bool nicest)
 
bool getFragmentDerivativeHint ()
 
int getMaxVertexAttribs () const
 
void setConstAttribF32 (int loc, int vsize, const fpreal32 *data)
 
void setConstAttribF32 (int loc, int vsize, const fpreal64 *data)
 
void setConstAttribF64 (int loc, int vsize, const fpreal64 *data)
 
void setConstAttribI32 (int loc, int vsize, const int32 *data)
 
void setConstAttribU32 (int loc, int vsize, const uint32 *data)
 
bool setCurrentVAO (RE_OGLVertexArrayList *list)
 
RE_OGLVertexArrayListgetCurrentVAO ()
 
RE_OGLVertexArrayListgetDefaultVAO ()
 
void setDefaultVAO (RE_OGLVertexArrayList *vao)
 
void resetCurrentVAO (RE_OGLVertexArrayList *deleted_list)
 
UT_IntArraygetBoundUniformBlocks ()
 
void bindTexture (const RE_OGLTexture *tex, int unit=RE_ACTIVE_UNIT, RE_TextureMode mode=RE_TEXTURE_UNKNOWN)
 
void verifyTextureIsNotBound (RE_OGLTexture *texture)
 
const RE_OGLTexturebindTextureBuffer (int id, int unit)
 
void unbindTexture (const RE_OGLTexture *tex)
 
void setActiveTexture (int textureunit)
 
int getActiveTexture () const
 
int pushTextureState (int textureunit=RE_ACTIVE_UNIT)
 
void popTextureState (int *nest=NULL)
 
RE_TextureDimension getBoundTextureType (int texunit=RE_ACTIVE_UNIT) const
 
const RE_OGLTexturegetBoundTexture (int texunit=RE_ACTIVE_UNIT) const
 
int findFirstFreeTextureUnit (int starting_unit=0) const
 
void updateTextureState () const
 
int getMaxShaderTextureUnits () const
 
int getMaxVertexTextureUnits () const
 
int getMaxGeometryTextureUnits () const
 
int getMaxFragmentTextureUnits () const
 
int getTextureAnisotropyLimit () const
 
int getMaxTextureSize () const
 
int getMaxTexture3DSize () const
 
int getMaxTextureRectangleSize ()
 
int getMaxColorBuffers () const
 
int getMaxDrawBuffers () const
 
void disableAllTextures ()
 
void removeTextureRefs (RE_OGLTexture *tex)
 
int pushReadAlignment (const void *data, int scansize)
 
void popReadAlignment (int *nest=NULL)
 
int pushWriteAlignment (const void *data, int scansize)
 
void popWriteAlignment (int *nest=NULL)
 
void useSeamlessMaps (bool enable)
 
bool usingSeamlessMaps ()
 
RE_OGLTexturegetRandomTexture (unsigned int seed, bool interp, int size=64)
 
RE_OGLTexturegetRandomTexture3D (unsigned int seed, bool interp, int size=32)
 
RE_OGLTexturegetRandomTextureArray (unsigned int seed, bool interp, int num_layers, int size=64)
 
RE_OGLTexturegetRandomSampleMaskTexture (unsigned int seed, int nsamples, int size=64)
 
void convertRasterToTexture (PXL_Raster *raster, int convert16bit=0)
 
void convertLUTToTexture (PXL_Lookup *lookup)
 
bool setupShaderForLUT (RE_Shader *shader, PXL_Lookup *lookup, float gamma, bool add_shader)
 
bool is3DLUTSupported () const
 
void buildRasterTextureGeometry (fpreal32 x0, fpreal32 y0, fpreal32 z, fpreal32 x1, fpreal32 y1, fpreal32 u0, fpreal32 v0, fpreal32 u1, fpreal32 v1, RE_Geometry &geo)
 
void displayRasterTexture (float x, float y, float z, const PXL_Raster *raster, const RE_RasterOpts *opts=0)
 
void displayRasterTexture (float x, float y, float z, float w, float h, const IMG_Raster *raster, const RE_RasterOpts *opts=0)
 
void displayRasterTexture (float x, float y, float z, int w, int h, UT_RGBA *r, int stride, float zoomx=-1.0f, float zoomy=-1.0f, int dither=1, float alpha_mult=1.0f)
 
void saveRaster (int x, int y, int w, int h, IMG_Raster *r, bool use_backbuf=true)
 
TIL_RastersaveRaster (int x, int y, int w, int h, PXL_DataFormat format, bool alphatoo, bool use_backbuf=true)
 
void setViewportFontOffset (int x, int y)
 
int getViewportFontOffsetX () const
 
int getViewportFontOffsetY () const
 
RE_FontBuffersfetchFontBufferFromPool (int size)
 
void returnFontBufferToPool (RE_FontBuffers *buf)
 
bool beginConditionalRender (RE_OcclusionQuery *query_obj, bool render_wait, bool region_support)
 
void endConditionalRender ()
 
void enablePrimitiveRestart (bool enable)
 
void setPrimitiveRestartIndex (unsigned int index)
 
void drawViewportPoint (const fpreal32 p[3], fpreal32 size)
 
void preDrawViewportString (UT_Matrix4D &view, UT_Matrix4D &proj, UT_DimRect &viewport)
 
void drawViewportString (const fpreal32 p[3], const char *str, const UT_Color *clr=NULL, const UT_Matrix4D *view=NULL, const UT_Matrix4D *proj=NULL, const UT_DimRect *viewport=NULL)
 
void postDrawViewportString ()
 
void destroyVertexArrayObject (unsigned int vao)
 
void destroyQuery (unsigned int query)
 
void destroyFramebufferObject (unsigned int fbo)
 
void fetchDriverInfo (UT_WorkBuffer &info, bool full_info)
 
void unbindPipeline ()
 
void invalidateCachedState ()
 
void resync ()
 
- Public Member Functions inherited from RE_RenderFlush
 RE_RenderFlush ()
 
virtual ~RE_RenderFlush ()
 
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 ()
 
virtual void setZStart (fpreal32 zStart)
 
virtual void draw (RE_Render *r)
 
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=NULL)
 
void putString (RE_Font &font, const UT_StringView &sv, UT_Unicode::transform *xform=NULL)
 
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 void setMainRender (RE_Render *main)
 
static RE_RendergetMainRender ()
 
static bool isMainRenderInitialized ()
 
static int getNumRenderContexts ()
 
static RE_RendergetRenderContext (int index)
 
static RE_RenderfindRenderWithID (int id)
 
static RE_RenderfindRenderWithContext (RE_OGLContext context)
 
static bool getAllowAdaptiveSubd ()
 
static void setAllowAdaptiveSubd (bool allow)
 
static void setHighDPIMode (bool hi)
 
static bool isHighDPIMode ()
 
static RE_RendercreateNewOffscreenContext (RE_Window *&win)
 
- Static Public Member Functions inherited from RE_OGLRender
static void initialize ()
 
static bool hasGL11 ()
 
static bool hasGL12 ()
 
static bool hasGL13 ()
 
static bool hasGL14 ()
 
static bool hasGL15 ()
 
static bool hasGL20 ()
 
static bool hasGL21 ()
 
static bool hasGL3 (int minor)
 
static bool hasGL4 (int minor)
 
static int glMajorVersion ()
 
static int glMinorVersion ()
 
static RE_GraphicsDevice getGraphicsDevice ()
 
static bool hasDriverVersion ()
 
static int getDriverMajorVersion ()
 
static int getDriverMinorVersion ()
 
static int getDriverBuildMajorVersion ()
 
static int getDriverBuildMinorVersion ()
 
static void getDriverInfo (UT_WorkBuffer &info)
 
static const UT_StringMap
< UT_DeepString > & 
getDriverInfoDict ()
 
static bool getUsingCoreProfile ()
 
static void setUsingCoreProfile (bool using_core_profile)
 
static void clearGraphicsCache ()
 
static int64 getInitialFreeMemoryKB ()
 
static void exitWithBadDriver ()
 
static int resX ()
 
static int resY ()
 
static void updateScreenSize ()
 
static bool areScreensUniform ()
 
static UT_DimRect getWorkAreaForScreen (UT_DimRect area)
 
static int positionOnScreen (UT_DimRect &area, int screen_hint=-1)
 
static bool positionOkay (const UT_DimRect &area)
 
static void toScreenCoords (int &x, int &y, int screen=-1)
 
static void fromScreenCoords (int &x, int &y, int screen=-1)
 
static int dpi ()
 
static fpreal dpiScale ()
 
static fpreal uiScale ()
 
static float pixelsToInches (int n)
 
static int inchesToPixels (float i)
 
static void scaleDPI (fpreal dpi)
 
static int scaledSize (int size)
 
static fpreal scaledSize (fpreal size)
 
static void addSuspendResumeCB (void(*cb)(void *), void *data)
 
static void removeSuspendResumeCB (void(*cb)(void *), void *data)
 
static RE_VisualgetVisualForMode (RE_DisplayMode newmode)
 
static RE_ServergetServer ()
 
static RE_CursorgetCursor (const char *name)
 
static void resetCurrent ()
 
static RE_WindowgetMainContext ()
 
static RE_OGLRendergetCurrentRender ()
 
static RE_WindowListgetWindowList ()
 
static int getMatteMaskForSampleCount (int samples)
 
static void allowSmoothLines (int yn)
 
static int allowsSmoothLines ()
 
static int getGLBlendSource (RE_BlendSourceFactor sourceFactor)
 
static int getGLBlendDest (RE_BlendDestFactor destFactor)
 
static void destroyShaderObject (unsigned int progid, bool unreg, bool shader)
 
static void destroyTextureObject (unsigned int texid, RE_OGLTexture *tex)
 
static void destroyRenderbufferObject (unsigned int rb)
 
static void destroyBufferObject (unsigned int buftype, unsigned int buf)
 
static void destroySync (void *sync)
 
static void clearCachedUniformBuffer (int id)
 
- Static Public Member Functions inherited from RE_RenderFlush
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 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 fpreal32 getBufferedRenderZBump ()
 

Additional Inherited Members

- Protected Member Functions inherited from RE_OGLRender
 RE_FLAG_STATE (Scissor, GL_SCISSOR_TEST)
 
 RE_FLAG_STATE (LineSmoothing, GL_LINE_SMOOTH)
 
 RE_FLAG_STATE (Stencil, GL_STENCIL_TEST)
 
 RE_FLAG_11_STATE (PointOffset, GL_POLYGON_OFFSET_POINT)
 
 RE_FLAG_11_STATE (LineOffset, GL_POLYGON_OFFSET_LINE)
 
 RE_FLAG_11_STATE (FillOffset, GL_POLYGON_OFFSET_FILL)
 
void updateOffsetAmount ()
 
virtual void initGLState ()
 
virtual void initGLExtensions ()
 
virtual void updateGLState ()
 
virtual void updateStacks ()
 
void switchTexture (int textureunit, const RE_OGLTexture *texture)
 
bool switchContextForRender (bool ignore_errors)
 
void updateBlendSmoothState ()
 
int privPushBlendSmoothState (bool smooth_too)
 
void privPopBlendSmoothState (bool smooth_too, int *idx)
 
void setupDebugging ()
 
void freePendingObjects ()
 
UT_DimRect adjustFramebufferViewport (const UT_DimRect &rect, bool to_fbo)
 
void assignPushedUniforms ()
 
void fetchDriverInfoDict (UT_StringMap< UT_DeepString > &dict)
 
void updateViewport ()
 
void suspendTestPatternRender ()
 
bool suspendTestPatternCheck ()
 
- Protected Member Functions inherited from RE_RenderFlush
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 ()
 
- Static Protected Member Functions inherited from RE_OGLRender
static bool initGLVersionInfo ()
 
static void determineTwinView ()
 
static RE_ZFunction oglToREzfunc (int oglZFunc)
 
static int reToOGLzfunc (RE_ZFunction reZFunc)
 
static RE_SFunction oglToREsfunc (int oglSFunc)
 
static int reToOGLsfunc (RE_SFunction reSFunc)
 
static RE_SOperation oglToREsoperation (int oglSOperation)
 
static int reToOGLsoperation (RE_SOperation reSOperation)
 
static const char * bufferName (GLint e)
 
static const char * faceName (GLint e)
 
static const char * hintName (GLint e)
 
static const char * cullName (GLint e)
 
- Protected Attributes inherited from RE_OGLRender
RE_OGLState myState
 
bool myFirstInitialize
 
RE_OGLExtmyExt
 
RE_WindowcurrentWindow
 
RE_WindowmySavedMainThreadCurrentWindow
 
short currentDisplayMode
 
RE_OGLContext pushedGraphicsContext
 
RE_OGLContext myContext
 
bool myContextInitialized
 
OGLDrawable myDrawable
 
OGLDrawable myPushedDrawable
 
UT_RecursiveSpinLock myOpenGLLock
 
int myOpenGLContextLockCount
 
int myMaxTextureShaderUnits
 
int myMaxTextureVertexUnits
 
int myMaxTextureGeometryUnits
 
int myMaxTextureFragmentUnits
 
int myMaxTextureSize
 
int myMaxTexture3DSize
 
int myMaxTextureRectSize
 
int myMaxTextureAnisotropy
 
int myMaxVertexAttribs
 
int myMaxColorBuffers
 
int myMaxDrawBuffers
 
GLint maxClipPlanes
 
UT_Vector2F myLineWidthRange
 
bool myFrontBufferDirty
 
RE_RenderBuf myDrawBuffer [RE_BUFFER_STACK_SIZE]
 
int myDrawBufferIndex
 
RE_RenderBuf myReadBuffer [RE_BUFFER_STACK_SIZE]
 
int myReadBufferIndex
 
bool myMultisampleEnable
 
bool myMultisampleAlphaToCoverage
 
int currGLError
 
RE_UniformmyBuiltInUniforms [RE_UNIFORM_BUILT_IN__count]
 
RE_UniformStackEntrymyBuiltInStack [RE_UNIFORM_BUILT_IN__count]
 
int myBuiltInStackIndex [RE_UNIFORM_BUILT_IN__count]
 
UT_ValArray< RE_Uniform * > myPushedUniforms
 
int myViewportFontOffsetX
 
int myViewportFontOffsetY
 
RE_OcclusionQuerymyActiveQuery
 
RE_MaterialPtr myMaterialStack [RE_MAX_TEXTURE_STATE_STACK]
 
bool myMaterialTextureStack [RE_MAX_TEXTURE_STATE_STACK]
 
int myMaterialLayerStack [RE_MAX_TEXTURE_STATE_STACK]
 
bool myMaterialLighting
 
int myMatStackIndex
 
bool myTransformFeedbackEnabled
 
bool myRasterizeEnabled
 
int myMaxTransformFeedbackBuffers
 
int myMaxTransformFeedbackComponents
 
RE_PrimType myTransformFeedbackType
 
UT_Array
< RE_PrimitivesGeneratedQuery * > 
myTransformFeedbackPrimitiveQuery
 
UT_Array
< RE_FeedbackPrimitivesWrittenQuery * > 
myTransformFeedbackWrittenQuery
 
int myVertexMaxStreams
 
int myActiveStreams
 
bool myActiveConditionalRender
 
bool mySampleShading
 
fpreal myShaderSampleRate
 
int myShaderOnlyModeCount
 
RE_ShadermyShaderOnlyActiveShader
 
int myFragmentDerivativeHint
 
int myUniqueID
 
int64 myBuiltInUniformSerial
 
int64 myRenderCount
 
UT_IntArray myDebugStack
 
int myDebugGroupStackSize
 
int myMaxDebugGroupStackSize
 
bool myDebuggingSupported
 
bool myDebugLabelSupported
 
UT_IntArray myClipDistance
 
int majorGLSLVersion
 
int minorGLSLVersion
 
UT_IntArray myPendingDeleteQueries
 
UT_IntArray myPendingDeleteVertexArrays
 
UT_IntArray myPendingDeleteFBOs
 
UT_Map< int, RE_OGLFramebuffer * > myFBOTable
 
UT_Array< re_ConstVertexAttribmyConstVertexAttribs
 
RE_OGLVertexArrayListmyCurrentVAO
 
RE_OGLVertexArrayListmyDefaultVAO
 
UT_StopWatchmySuspendCheckTimer
 
RE_OGLFramebuffermySuspendTestFBO
 
RE_OGLFramebuffermySuspendResultFBO
 
RE_OGLTexturemySuspendTestTexture
 
RE_OGLTexturemySuspendResultTexture
 
RE_GeometrymySuspendBox
 
ut_thread_id_t myNativeThread
 
bool myIsAllowingOtherThreads
 
- 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
 
- Static Protected Attributes inherited from RE_OGLRender
static int majorGLVersion
 
static int minorGLVersion
 
static RE_ServertheServer
 
static int theXRes
 
static int theYRes
 
static int theDotsPerInch
 
static fpreal theUIScale
 
static bool theSmoothLinesAllowed
 
static UT_Array< UT_Pair
< RE_Visual *, RE_DisplayMode > > 
theVisuals
 
static RE_WindowListtheWindowList
 
static RE_WindowtheMainContextWindow
 
static RE_GraphicsDevice theDevice
 
static int theDriverMajor
 
static int theDriverMinor
 
static int theDriverBuildMajor
 
static int theDriverBuildMinor
 
static bool theUsingCoreProfile
 
static UT_ThreadSpecificValue
< RE_OGLRender * > 
theCurrentRender
 
static UT_ThreadSpecificValue
< RE_OGLRender * > 
theLastRender
 

Detailed Description

Constructor & Destructor Documentation

RE_Render::RE_Render ( int  do_foreground,
const char *  appname = 0 
)
virtual RE_Render::~RE_Render ( )
virtual

Member Function Documentation

static RE_Render* RE_Render::createNewOffscreenContext ( RE_Window *&  win)
static
RE_Render* RE_Render::createNewRenderContext ( )
static RE_Render* RE_Render::findRenderWithContext ( RE_OGLContext  context)
static
static RE_Render* RE_Render::findRenderWithID ( int  id)
static
static bool RE_Render::getAllowAdaptiveSubd ( )
static
static RE_Render* RE_Render::getMainRender ( )
static
static int RE_Render::getNumRenderContexts ( )
static
static RE_Render* RE_Render::getRenderContext ( int  index)
static
static bool RE_Render::isHighDPIMode ( )
static
static bool RE_Render::isMainRenderInitialized ( )
static
static void RE_Render::setAllowAdaptiveSubd ( bool  allow)
static
static void RE_Render::setHighDPIMode ( bool  hi)
static
static void RE_Render::setMainRender ( RE_Render main)
static

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