linux::opengl::CRenderer


All platform-dependent classes have been moved to Platform Package in release 10.0.0.

This class is available on Linux platform only

Corresponding class for Windows platform is here.

Corresponding class for Android platform is here.

This renderer works absolutely in the same way as Windows OpenGL renderer. You may find additional information on its documentation page.

You can find more information in comments below. Overrided methods can be found in corresponding base interface.

class CRenderer :public virtual IRenderer
    {
    public:
        IWindow * getWindow() override;
        ITexture *getRenderTarget() override;
        Rect getViewport() override;
        Color getClearColor() override;
        TECHNOLOGY_TYPE getTechnology() const override; // Return ttOpenGL 
        Point getMinVersion() const override; // Return { 4, 3 } 
        Point getVersion() override;
        IShaderProgram *getShaderProgram() override;
        INativeGraphics *getNativeGraphics() override; // Return instance of IOpenGL interface 
        bool isWindowSupported(IWindow *window) override;
    
        bool setWindow(IWindow *value) override;
        bool setRenderTarget(ITexture *value) override;
        void setClearColor(const Color &value) override;
        bool setShaderProgram(IShaderProgram *value) override;
    
        IPlatformFont *FontCreate(const String &fontname, const int height, const FONT_WEIGHT weight, const bool italic, const bool underline, const bool strikeout, const bool monospace) override;
        ITexture *TextureCreate(const int width, const int height, const AnsiString &format) override;
        ITexture *TextureCreate(const Bitmap &data) override;
        IShaderProgram *ShaderProgramCreate(const AnsiString &vertex, const AnsiString &fragment, const bool utils) override;
        IShaderProgram *ShaderProgramCreate(const AnsiString &fragment) override;
    
        void Release() override;
        bool DrawBegin(Rect &viewport) override;
        bool DrawEnd() override;
        bool Present() override;
        IRenderer *CreateInstance() override;
    
        // !!! IMPORTANT !!! 
        // All the methods below should NOT be called outside logical DrawBegin-DrawEnd block 
        // Also you should use correct arguments, there is no check inside due to performance optimization 
    
        bool PushMask(ITexture *mask, const Matrix &matrix) override;
        void PopMask() override;
    
        void RestoreState() override;
    
        bool BeginSplineLimitation(const CUBIC_BEZIER_SPLINE &spline1, const CUBIC_BEZIER_SPLINE &spline2, const bool apply_to_y_direction) override;
        bool EndSplineLimitation() override;
    
        void Clear() override;
        void Clear(const Color &color) override;
    
        void Line(const PointF &p1, const PointF &p2, const Color &color, const BLOCK *block) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const Matrix &m, const BLOCK *block) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const BLOCK *block) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const Matrix &m, const BLOCK *block) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const BLOCK *block, const unsigned int bitmask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const BLOCK *block, const unsigned int bitmask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const Matrix &m, const BLOCK *block, const unsigned int bitmask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const BLOCK *block, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const BLOCK *block, const unsigned int bitmask, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const BLOCK *block, const unsigned int bitmask, ITexture *mask) override;
        void Line(const PointF &p1, const PointF &p2, const Color &c1, const Color &c2, const Matrix &m, const BLOCK *block, const unsigned int bitmask, ITexture *mask) override;
    
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const BLOCK *block) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const Matrix &m, const BLOCK *block) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const BLOCK *block, const unsigned int bitmask) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const Matrix &m, const BLOCK *block, const unsigned int bitmask) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const BLOCK *block, ITexture *mask) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const BLOCK *block, const unsigned int bitmask, ITexture *mask) override;
        void Lines(const std::vector<PointF> &points, const Color &color, const bool loop, const Matrix &m, const BLOCK *block, const unsigned int bitmask, ITexture *mask) override;
    
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const BLOCK *block) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const Matrix &m, const BLOCK *block) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const BLOCK *block) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const Matrix &m, const BLOCK *block) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x, 
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const Matrix &m, const BLOCK *block, 
            const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const BLOCK *block, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x, 
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
        void Triangle(const PointF &p1, const PointF &p2, const PointF &p3, const Color &c1, const Color &c2, const Color &c3, const Matrix &m, const BLOCK *block, 
            const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
    
        void Rectangle(const RectF &rect, const Color &color, const BLOCK *block) override;
        void Rectangle(const RectF &rect, const Color &color, const Matrix &m, const BLOCK *block) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const BLOCK *block) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const Matrix &m, const BLOCK *block) override;
        void Rectangle(const RectF &rect, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form) override;
        void Rectangle(const RectF &rect, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const BLOCK *block, const unsigned int bitmask_x, 
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Rectangle(const RectF &rect, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &color, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const BLOCK *block, ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
            ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
            ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const BLOCK *block, const unsigned int bitmask_x, 
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
        void Rectangle(const RectF &rect, const Color &c1, const Color &c2, const Color &c3, const Color &c4, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
    
        void Gradient(const RectF &rect, nitisa::Gradient &g, const BLOCK *block) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const Matrix &m, const BLOCK *block) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const BLOCK *block, ITexture *mask) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form, 
            ITexture *mask) override;
        void Gradient(const RectF &rect, nitisa::Gradient &g, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
            ITexture *mask) override;
    
        void Image(ITexture *image, const PointF &p, const float transparency, const BLOCK *block) override;
        void Image(ITexture *image, const Matrix &m, const float transparency, const BLOCK *block) override;
        void Image(ITexture *image, const RectF &part, const PointF &p, const float transparency, const BLOCK *block) override;
        void Image(ITexture *image, const RectF &part, const Matrix &m, const float transparency, const BLOCK *block) override;
        void Image(ITexture *image, const PointF &p, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Image(ITexture *image, const Matrix &m, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Image(ITexture *image, const RectF &part, const PointF &p, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form) override;
        void Image(ITexture *image, const RectF &part, const Matrix &m, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form) override;
        void Image(ITexture *image, const PointF &p, const float transparency, const BLOCK *block, ITexture *mask) override;
        void Image(ITexture *image, const Matrix &m, const float transparency, const BLOCK *block, ITexture *mask) override;
        void Image(ITexture *image, const RectF &part, const PointF &p, const float transparency, const BLOCK *block, ITexture *mask) override;
        void Image(ITexture *image, const RectF &part, const Matrix &m, const float transparency, const BLOCK *block, ITexture *mask) override;
        void Image(ITexture *image, const PointF &p, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
            ITexture *mask) override;
        void Image(ITexture *image, const Matrix &m, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
            ITexture *mask) override;
        void Image(ITexture *image, const RectF &part, const PointF &p, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
        void Image(ITexture *image, const RectF &part, const Matrix &m, const float transparency, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
    
        void Block(const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors) override;
        void Block(const RectF &rect, const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors) override;
        void Block(const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form) override;
        void Block(const RectF &rect, const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form) override;
        void Block(const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors, ITexture *mask) override;
        void Block(const RectF &rect, const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors, ITexture *mask) override;
        void Block(const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
        void Block(const RectF &rect, const RectF &block, const RectF &border, const RectF &radius, const BlockColors &colors, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
    
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const PointF &p, const BLOCK *block) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const Matrix &m, const BLOCK *block) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const PointF &p, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const PointF &p, const BLOCK *block, ITexture *mask) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const Matrix &m, const BLOCK *block, ITexture *mask) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const PointF &p, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
        void Text(const String &text, IPlatformFont *font, const float distance, const Color &color, const Matrix &m, const BLOCK *block, const unsigned int bitmask_x,
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
    
        void Blur(ITexture *image, const int radius, const BLUR_TYPE type) override;
        void Blur(ITexture *target, ITexture *source, const int radius, const BLUR_TYPE type) override;
        void Blur(ITexture *image, const int radius, const BLUR_TYPE type, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form) override;
        void Blur(ITexture *target, ITexture *source, const int radius, const BLUR_TYPE type, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Blur(ITexture *image, const int radius, const BLUR_TYPE type, ITexture *mask) override;
        void Blur(ITexture *target, ITexture *source, const int radius, const BLUR_TYPE type, ITexture *mask) override;
        void Blur(ITexture *image, const int radius, const BLUR_TYPE type, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
        void Blur(ITexture *target, ITexture *source, const int radius, const BLUR_TYPE type, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
                ITexture *mask) override;
    
        void Polygon(const std::vector<PointF> &points, const Color &color, const BLOCK *block) override;
        void Polygon(const std::vector<PointF> &points, const Matrix &m, const Color &color, const BLOCK *block) override;
        void Polygon(const std::vector<PointF> &points, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Polygon(const std::vector<PointF> &points, const Matrix &m, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, 
            const bool bitmask_form) override;
        void Polygon(const std::vector<PointF> &points, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Polygon(const std::vector<PointF> &points, const Matrix &m, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Polygon(const std::vector<PointF> &points, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y, const bool bitmask_form,
            ITexture *mask) override;
        void Polygon(const std::vector<PointF> &points, const Matrix &m, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
    
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Color &color, const BLOCK *block) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Matrix &m, const Color &color, const BLOCK *block) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Matrix &m, const Color &color, const BLOCK *block, const unsigned int bitmask_x, 
            const unsigned int bitmask_y, const bool bitmask_form) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Matrix &m, const Color &color, const BLOCK *block, ITexture *mask) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Color &color, const BLOCK *block, const unsigned int bitmask_x, const unsigned int bitmask_y,
            const bool bitmask_form, ITexture *mask) override;
        void Polygons(const std::vector<std::vector<PointF>> &polygons, const Matrix &m, const Color &color, const BLOCK *block, const unsigned int bitmask_x, 
            const unsigned int bitmask_y, const bool bitmask_form, ITexture *mask) override;
    
        CRenderer(const bool double_buffered, const int multisample); // Multisample will be selected a best one if invalid is specified 
        virtual ~CRenderer();
    };
Namespace: nitisa::standard::linux::opengl
Include: Standard/Platform/Linux/OpenGL/Renderer.h