1 #ifndef GUI_OPENGL___IRENDER__HPP
2 #define GUI_OPENGL___IRENDER__HPP
73 virtual void Enable(GLenum glstate) = 0;
77 virtual void Hint(GLenum target, GLenum
mode) = 0;
90 GLsizei width, GLsizei height) = 0;
109 GLboolean alpha) = 0;
130 virtual void BlendFunc(GLenum sfactor, GLenum dfactor) = 0;
132 virtual void TexEnvi(GLenum target, GLenum pname, GLint param) = 0;
180 virtual void Vertex3f(GLfloat x, GLfloat y, GLfloat z) = 0;
187 void Vertex3d(GLdouble x, GLdouble y, GLdouble z) {
Vertex3f(
float(x),
float(y),
float(z)); }
191 virtual void Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) = 0;
193 void Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
195 Rectf(
float(x1),
float(y1),
float(x2),
float(y2));
252 int len = -1)
const = 0;
261 virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) = 0;
276 virtual void Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) = 0;
277 virtual void Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) = 0;
278 virtual void Scalef(GLfloat x, GLfloat y, GLfloat z) = 0;
279 virtual void Translated(GLdouble x, GLdouble y, GLdouble z) = 0;
280 virtual void Translatef(GLfloat x, GLfloat y, GLfloat z) = 0;
282 virtual void Ortho(GLdouble left, GLdouble right,
283 GLdouble bottom, GLdouble top,
284 GLdouble nearVal, GLdouble farVal) = 0;
CGlModel2D Base class for a model set up for rendering purposes.
class CRgbaColor provides a simple abstraction for managing colors.
virtual void Translated(GLdouble x, GLdouble y, GLdouble z)=0
virtual bool IsSimplified() const =0
virtual void Clear()=0
Clear/delete any graphics/OpenGL memory.
virtual void LoadMatrixd(const GLdouble *m)=0
virtual void GetModelViewMatrix(GLdouble *m) const =0
void Color4fv(const GLfloat *v)
virtual void Scalef(GLfloat x, GLfloat y, GLfloat z)=0
virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)=0
virtual void TexCoord2f(GLfloat s, GLfloat t)=0
Colors (also defined in IGlState since they can be set either before or inside of Begin()/End().
ELineJoinStyle
Enumerators for non-enumerated state values (e.g. pdf-only state values)
virtual void Translatef(GLfloat x, GLfloat y, GLfloat z)=0
virtual CMatrix4< float > GetProjectionMatrix() const =0
virtual void Enable(GLenum glstate)=0
virtual void LineStipple(GLint factor, GLushort pattern)=0
Set line stipple pattern: glLineStipple(). Deprecated in gl 3.2+.
virtual void UseProgram(GLuint program)=0
For shaders. Only works with OpenGL 2.0+.
void TexCoord2fv(const GLfloat *v)
virtual void Begin(GLenum mode)=0
Start rendering.
virtual void Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)=0
void Color3dv(const GLdouble *v)
void Color4dv(const GLdouble *v)
virtual void BlendFunc(GLenum sfactor, GLenum dfactor)=0
Options to be used when GL_BLEND is enabled.
virtual void BeginClippingRect(GLint x, GLint y, GLsizei width, GLsizei height)=0
void Color3f(GLfloat r, GLfloat g, GLfloat b)
virtual void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)=0
Set the color mask (glColorMask)
virtual CMatrix4< float > GetModelViewMatrix() const =0
void RectC(const TModelRect &rc)
virtual void MatrixMode(GLenum mode)=0
virtual void PointSize(GLfloat size)=0
Set point size for drawing: glPointSize()
void Color3d(GLdouble r, GLdouble g, GLdouble b)
virtual void LineJoinStyle(IGlState::ELineJoinStyle s)=0
PDF-specific rendering state.
void Color3fv(const GLfloat *v)
IRender & GetGl()
convenience function for getting current render manager
virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height)=0
Set clipping window: glScissor(x,y,width,height)
void RectC(const TVPRect &rc)
void Vertex2d(GLdouble x, GLdouble y)
void TexCoord2dv(const GLdouble *v)
virtual void ResetState()=0
virtual void Render(CGlPane &pane, CGlModel2D *model)=0
virtual TModelUnit TextHeight(const CGlTextureFont *font) const =0
virtual void BeginText(const CGlTextureFont *font, const CRgbaColor &color)=0
Text is drawn is pixel coordinates.
virtual void PdfShadeStyle(IGlState::EPdfShadeStyle s)=0
Set (override defualt) shading style for polygons.
virtual void SetIsGreyscale(bool b)=0
virtual TModelUnit TextWidth(const CGlTextureFont *font, const char *text) const =0
virtual void PopAttrib()=0
virtual void BeginText(const CGlTextureFont *font)=0
Same as above, but get color from m_RenderNode.m_State.
virtual void PushAttrib(GLbitfield mask)=0
void Color4d(GLdouble r, GLdouble g, GLdouble b, GLdouble a)
virtual void LoadIdentity()=0
virtual void EndText()=0
Pops matrices and attributes after writing text.
virtual TModelUnit GetMaxWidth(const CGlTextureFont *font, int max_num) const =0
virtual void PopMatrix()=0
virtual void ShadeModel(GLenum mode)=0
Set shade model for default lighting: glShadeModel(GL_FLAT or GL_SMOOTH)
ERenderTarget
Different api levels based on information from OpenGL driver.
virtual void Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)=0
virtual void EndClippingRect()=0
virtual bool IsPrinterFriendly() const =0
virtual void TexEnvi(GLenum target, GLenum pname, GLint param)=0
virtual void GetProjectionMatrix(GLdouble *m) const =0
virtual void End()=0
Finish rendering (create buffer and send to renderer)
virtual ERenderTarget GetApi()=0
virtual void PolygonMode(GLenum face, GLenum mode)=0
Set the polygon rasterization mode.
void Vertex2fv(const GLfloat *v)
void TexCoord2d(GLdouble s, GLdouble t)
virtual void PolygonStipple(GLubyte *mask)=0
Set polygon stipple pattern: glPolygonStipple(). Deprecated in gl 3.2+.
void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
virtual void WriteText(TModelUnit x, TModelUnit y, const char *text, TModelUnit rotate_degrees=0.0)=0
Write text at specified model coords.
virtual void LoadMatrixf(const GLfloat *m)=0
void Vertex3dv(const GLdouble *v)
void Vertex3fv(const GLfloat *v)
virtual void LineCapStyle(IGlState::ELineCapStyle c)=0
Set line cap ending style (pdf only)
void Vertex2dv(const GLdouble *v)
void Vertex3d(GLdouble x, GLdouble y, GLdouble z)
void Vertex2f(GLfloat x, GLfloat y)
virtual void Disable(GLenum glstate)=0
glDisable()
virtual void Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal)=0
virtual void Hint(GLenum target, GLenum mode)=0
virtual TModelUnit GetMetric(const CGlTextureFont *font, IGlFont::EMetric metric, const char *text=NULL, int len=-1) const =0
Calls the standard font metric functions except for pdf in which case it first replaces any bitmap fo...
virtual void LineWidth(GLfloat w)=0
Set line width for drawing: glLineWidth()
virtual void Vertex3f(GLfloat x, GLfloat y, GLfloat z)=0
Explicit support not currently available for: GLbyte, GlShort and GLint calls, e.g.
virtual CRef< CGlState > GetState()=0
virtual void Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)=0
Rect() functions also do Begin() and End() (as in OpenGL)
virtual void ColorC(const CRgbaColor &c)=0
Set current color (glColor{3,4}{f,d}{v,})
void Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
virtual void PushMatrix()=0
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)=0
Write text at specified model coords inside box defined by (x,y,width,height) with specified alignmen...
virtual void GetViewport(GLint *params)=0
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIOPENGL_EXPORT
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Standard mechanism to include OpenGL headers for all platforms.
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)