30 lines
573 B
C++
30 lines
573 B
C++
#pragma once
|
|
#include <GL/glx.h>
|
|
#include <xcb/xcb.h>
|
|
#include <memory>
|
|
|
|
class XcbGlInterface;
|
|
|
|
class XcbGlWindowInterface
|
|
{
|
|
public:
|
|
XcbGlWindowInterface(XcbGlInterface* glInterface);
|
|
|
|
~XcbGlWindowInterface();
|
|
|
|
bool initialize(xcb_window_t window);
|
|
|
|
void afterPaint();
|
|
|
|
void resizeViewPort(unsigned width, unsigned height);
|
|
|
|
private:
|
|
void destroyWindow();
|
|
void swapBuffers();
|
|
|
|
XcbGlInterface* mGlInterface{nullptr};
|
|
GLXDrawable mDrawable;
|
|
GLXWindow mWindow;
|
|
};
|
|
|
|
using XcbGlWindowInterfacePtr = std::unique_ptr<XcbGlWindowInterface>;
|