NCBI C++ ToolKit
|
Search Toolkit Book for CMtlRender
#include "mtlrender.hpp"
(Private to src/gui/opengl
.)
Public Member Functions | |
CMtlRender () | |
virtual | ~CMtlRender () |
virtual ERenderTarget | GetApi () |
Overridden in subclasses to return the supported rendering target. More... | |
virtual void | UseProgram (GLuint program) |
For shaders. Only works with OpenGL 2.0+. More... | |
virtual void | End () |
Finish rendering (create buffer and send to renderer) More... | |
virtual void | Vertex3f (GLfloat x, GLfloat y, GLfloat z) |
Vertices. More... | |
virtual CRef< CGlState > | GetState () |
Allow caller to access state directly. More... | |
Viewports, matrices and transformations | |
virtual void | Viewport (GLint x, GLint y, GLsizei width, GLsizei height) |
virtual void | MatrixMode (GLenum mode) |
virtual void | PushMatrix () |
virtual void | PopMatrix () |
virtual void | LoadIdentity () |
virtual void | LoadMatrixf (const GLfloat *m) |
virtual void | LoadMatrixd (const GLdouble *m) |
virtual void | MultMatrixf (const GLfloat *m) |
virtual void | MultMatrixd (const GLdouble *m) |
virtual CMatrix4< float > | GetModelViewMatrix () const |
virtual CMatrix4< float > | GetProjectionMatrix () const |
virtual void | GetModelViewMatrix (GLdouble *m) const |
virtual void | GetProjectionMatrix (GLdouble *m) const |
virtual void | Rotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z) |
virtual void | Rotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z) |
virtual void | Scaled (GLdouble x, GLdouble y, GLdouble z) |
virtual void | Scalef (GLfloat x, GLfloat y, GLfloat z) |
virtual void | Translated (GLdouble x, GLdouble y, GLdouble z) |
virtual void | Translatef (GLfloat x, GLfloat y, GLfloat z) |
virtual void | Ortho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal) |
virtual void | Perspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) |
IGlState interface implementation | |
virtual void | PushAttrib (GLbitfield mask) |
These commands just forward their parameters to the render managers CGlState object m_State. More... | |
virtual void | PopAttrib () |
virtual void | Enable (GLenum glstate) |
virtual void | Disable (GLenum glstate) |
glDisable() More... | |
virtual void | Hint (GLenum target, GLenum mode) |
virtual void | LineWidth (GLfloat w) |
Set line width for drawing: glLineWidth() More... | |
virtual void | PointSize (GLfloat s) |
Set point size for drawing: glPointSize() More... | |
virtual void | ShadeModel (GLenum mode) |
Set shade model for default lighting: glShadeModel(GL_FLAT or GL_SMOOTH) More... | |
virtual void | Scissor (GLint x, GLint y, GLsizei width, GLsizei height) |
Set clipping window: glScissor(x,y,width,height) More... | |
virtual void | ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) |
Color{3,4}{f,d}{v} commands are defined above.... More... | |
virtual void | PolygonMode (GLenum face, GLenum mode) |
Set the polygon rasterization mode. More... | |
virtual void | LineStipple (GLint factor, GLushort pattern) |
Set line stipple pattern: glLineStipple(). Deprecated in gl 3.2+. More... | |
virtual void | PolygonStipple (GLubyte *mask) |
Set polygon stipple pattern: glPolygonStipple(). Deprecated in gl 3.2+. More... | |
virtual void | BlendFunc (GLenum sfactor, GLenum dfactor) |
Options to be used when GL_BLEND is enabled. More... | |
virtual void | TexEnvi (GLenum target, GLenum pname, GLint param) |
virtual void | BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) |
virtual void | BlendColor (const CRgbaColor &c) |
virtual void | ScaleInvarient (bool b, CVect2< TModelUnit > scale=CVect2< TModelUnit >(TModelUnit(1), TModelUnit(1))) |
virtual void | ScaleFactor (const CVect2< TModelUnit > &scale) |
virtual void | LineJoinStyle (IGlState::ELineJoinStyle s) |
PDF-specific rendering state. More... | |
virtual void | LineCapStyle (IGlState::ELineCapStyle c) |
Set line cap ending style (pdf only) More... | |
virtual void | PdfShadeStyle (IGlState::EPdfShadeStyle s) |
Set (override defualt) shading style for polygons. More... | |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
![]() | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
![]() | |
CRenderCommon () | |
virtual | ~CRenderCommon () |
virtual void | SetIsGreyscale (bool) |
virtual bool | IsSimplified () const |
virtual bool | IsPrinterFriendly () const |
virtual void | Clear () |
Clear/delete any graphics/OpenGL memory. More... | |
virtual void | Begin (GLenum mode) |
Start rendering. More... | |
virtual void | ResetState () |
virtual void | BeginClippingRect (GLint x, GLint y, GLsizei width, GLsizei height) |
virtual void | EndClippingRect () |
virtual void | Render (CGlPane &pane, CGlModel2D *model) |
virtual void | Rectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) |
Rect() functions also do Begin() and End() (as in OpenGL) More... | |
virtual void | ColorC (const CRgbaColor &color) |
Colors (also defined in IGlState since they can be set either before or inside of Begin()/End(). More... | |
virtual void | TexCoord2f (GLfloat s, GLfloat t) |
Texture coords. More... | |
virtual void | BeginText (const CGlTextureFont *font, const CRgbaColor &color) |
Text is drawn is pixel coordinates. More... | |
virtual void | BeginText (const CGlTextureFont *font) |
Same as above, but get color from m_RenderNode.m_State. More... | |
virtual void | EndText () |
Pops matrices and attributes after writing text. More... | |
void | SetTextColor (const CRgbaColor &color) |
Update text color and alpha. More... | |
CRgbaColor | GetTextColor () const |
virtual void | WriteText (TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0) |
Write text at specified model coords. More... | |
virtual void | WriteText (TModelUnit x, TModelUnit y, TModelUnit width, TModelUnit height, const char *text, CGlTextureFont::TAlign align=CGlTextureFont::eAlign_Center, CGlTextureFont::ETruncate trunc=CGlTextureFont::eTruncate_Ellipsis, TModelUnit rotate_degrees=0.0f) |
Write text at specified model coords inside box defined by (x,y,width,height) with specified alignment, truncation and rotation. More... | |
virtual TModelUnit | GetMetric (const CGlTextureFont *font, IGlFont::EMetric metric, const char *text=NULL, int len=-1) const |
Calls the standard font metric functions except for pdf in which case it first replaces any bitmap fonts with texture fnots. More... | |
virtual TModelUnit | TextWidth (const CGlTextureFont *font, const char *text) const |
virtual TModelUnit | TextHeight (const CGlTextureFont *font) const |
virtual TModelUnit | GetFontDescender (const CGlTextureFont *font) const |
virtual TModelUnit | GetAdvance (const CGlTextureFont *font, char c) const |
virtual TModelUnit | GetMaxWidth (const CGlTextureFont *font, int max_num) const |
virtual void | GetViewport (GLint *params) |
![]() | |
virtual | ~IRender () |
void | Color3f (GLfloat r, GLfloat g, GLfloat b) |
void | Color3fv (const GLfloat *v) |
void | Color4f (GLfloat r, GLfloat g, GLfloat b, GLfloat a) |
void | Color4fv (const GLfloat *v) |
void | Color3d (GLdouble r, GLdouble g, GLdouble b) |
void | Color3dv (const GLdouble *v) |
void | Color4d (GLdouble r, GLdouble g, GLdouble b, GLdouble a) |
void | Color4dv (const GLdouble *v) |
void | Vertex2f (GLfloat x, GLfloat y) |
void | Vertex2fv (const GLfloat *v) |
void | Vertex3fv (const GLfloat *v) |
void | Vertex2d (GLdouble x, GLdouble y) |
void | Vertex2dv (const GLdouble *v) |
void | Vertex3d (GLdouble x, GLdouble y, GLdouble z) |
void | Vertex3dv (const GLdouble *v) |
void | Rectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) |
void | RectC (const TVPRect &rc) |
void | RectC (const TModelRect &rc) |
void | TexCoord2fv (const GLfloat *v) |
void | TexCoord2d (GLdouble s, GLdouble t) |
void | TexCoord2dv (const GLdouble *v) |
Private Member Functions | |
void | x_LoadMatrix (const simd::double4x4 &m) |
void | x_ApplyTransf (const simd::double4x4 &t) |
void | x_GetScreenMatrices (simd::float4x4 &projection, simd::float4x4 &modelView) |
void | x_RenderBuffers () |
void | x_RenderStippledPolygon () |
Private Attributes | |
CRgbaColor | m_TextColor |
color and alpha for text only (other GL options do not apply to text) More... | |
list< simd::double4x4 > | m_ProjectionMatrix |
list< simd::double4x4 > | m_ModelViewMatrix |
GLubyte | m_PolygonStipple [128] |
bool | m_PolygonStippleEnabled = false |
int | m_ScissorRectX = 0 |
int | m_ScissorRectY = 0 |
int | m_ScissorRectW = 1000 |
int | m_ScissorRectH = 1000 |
Additional Inherited Members | |
![]() | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
![]() | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
![]() | |
static void | EnableDebugDump (bool on) |
![]() | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
![]() | |
virtual void | x_RenderBuffer (CGlVboNode *node) |
void | x_SyncAttribs (vector< CRgbaColor > &colors) |
void | x_SyncAttribs (vector< CVect3< float > > &vecs) |
void | x_SyncAttribs (vector< CVect2< float > > &vecs) |
![]() | |
vector< CVect3< float > > | m_VertexBuffer |
vector< CRgbaColor > | m_ColorBuffer |
vector< CVect2< float > > | m_TexCoord2DBuffer1 |
CGlVboNode | m_RenderNode |
vertex buffer node for rendering all Begin()/End() renders More... | |
CRef< CGlState > | m_State |
state used by all nodes More... | |
GLenum | m_MatrixMode |
current modelview matrix and matrix mode More... | |
GLint | m_Viewport [4] |
current projection set by Viewport() More... | |
GLenum | m_CurrentMode |
rendering mode from Begin() More... | |
const CGlTextureFont * | m_CurrentFont |
text parameters More... | |
CRgbaColor | m_TextColor |
color and alpha for text only (other GL options do not apply to text) More... | |
Definition at line 50 of file mtlrender.hpp.