#ifndef QOPENGLBUFFERMENU_H
#define QOPENGLBUFFERMENU_H

#include "qopenglbufferbase.h"

namespace SOPENGL
{
    class QOpenGLBufferMenu : public QOpenGLBufferBase
    {
        Q_OBJECT
    public:
        explicit QOpenGLBufferMenu(QOpenGLContext* pContext, QSurfaceFormat surfaceformat, QObject *parent = 0);
        virtual ~QOpenGLBufferMenu();

        virtual void initializeGL();
        virtual void Paint();
        virtual void PaintBuffer();

        void CheckRegion(int nX, int nY);
        void CheckRegionSmall(int nX, int nY);

        void SetCapture(bool bCapture);

    signals:
        void SendRecord(bool bRecord);
        void SendSaveBitmap();
        void SendViewThumbnail(bool bView);

    public slots:

    protected:
        bool m_bRecording;
        bool m_bCapturing;
        bool m_bThumbnailView;

        QOpenGLTextureButton* m_pButtonRecord;
        QOpenGLTextureButton* m_pButtonCapture;
        QOpenGLTextureButton* m_pButtonThumbnailView;

        QOpenGLBuffer m_VBORecord;
        QOpenGLBuffer m_VBOCapture;
        QOpenGLBuffer m_VBOThumbnailView;


        QRect m_rectRecord;
        QRect m_rectRecordSmall;
        QRect m_rectThumbnailView;
        QRect m_rectThumbnailViewSmall;

        QRect m_rectCapture;
        QRect m_rectCaptureSmall;
    };
}


#endif // QOPENGLBUFFERMENU_H
