Initial commit.
This commit is contained in:
commit
59c6161fdb
134 changed files with 4751 additions and 0 deletions
32
src/windows/ui_interfaces/x11/GlxInterface.h
Normal file
32
src/windows/ui_interfaces/x11/GlxInterface.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
#include <GL/glx.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <memory>
|
||||
|
||||
class GlxInterface
|
||||
{
|
||||
GLXContext mContext;
|
||||
GLXDrawable mDrawable;
|
||||
GLXWindow mWindow;
|
||||
GLXFBConfig mConfig;
|
||||
|
||||
public:
|
||||
|
||||
GlxInterface();
|
||||
|
||||
void SetupContext(Display* display, int default_screen);
|
||||
|
||||
bool SetupWindow(Display* display, xcb_window_t window);
|
||||
|
||||
void DestroyWindow(Display* display);
|
||||
|
||||
void DestroyContext(Display* display);
|
||||
|
||||
void SwapBuffers(Display* display);
|
||||
|
||||
void Draw();
|
||||
|
||||
static std::shared_ptr<GlxInterface> Create();
|
||||
};
|
||||
|
||||
using GlxInterfacePtr = std::shared_ptr<GlxInterface>;
|
Loading…
Add table
Add a link
Reference in a new issue