mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 07:36:26 +00:00
lots of initial GLES3 renderer implementation
This commit is contained in:
@@ -11,8 +11,59 @@ namespace boo
|
||||
extern PFNGLXGETVIDEOSYNCSGIPROC FglXGetVideoSyncSGI;
|
||||
extern PFNGLXWAITVIDEOSYNCSGIPROC FglXWaitVideoSyncSGI;
|
||||
|
||||
IGraphicsContext* _GraphicsContextWaylandNew(IGraphicsContext::EGraphicsAPI api,
|
||||
IWindow* parentWindow);
|
||||
struct GraphicsContextWayland : IGraphicsContext
|
||||
{
|
||||
|
||||
EGraphicsAPI m_api;
|
||||
EPixelFormat m_pf;
|
||||
IWindow* m_parentWindow;
|
||||
|
||||
public:
|
||||
IWindowCallback* m_callback;
|
||||
|
||||
GraphicsContextWayland(EGraphicsAPI api, IWindow* parentWindow)
|
||||
: m_api(api),
|
||||
m_pf(PF_RGBA8),
|
||||
m_parentWindow(parentWindow)
|
||||
{}
|
||||
|
||||
~GraphicsContextWayland()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void _setCallback(IWindowCallback* cb)
|
||||
{
|
||||
m_callback = cb;
|
||||
}
|
||||
|
||||
EGraphicsAPI getAPI() const
|
||||
{
|
||||
return m_api;
|
||||
}
|
||||
|
||||
EPixelFormat getPixelFormat() const
|
||||
{
|
||||
return m_pf;
|
||||
}
|
||||
|
||||
void setPixelFormat(EPixelFormat pf)
|
||||
{
|
||||
if (pf > PF_RGBAF32_Z24)
|
||||
return;
|
||||
m_pf = pf;
|
||||
}
|
||||
|
||||
void initializeContext()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void makeCurrent()
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct WindowWayland : IWindow
|
||||
{
|
||||
@@ -81,10 +132,11 @@ struct WindowWayland : IWindow
|
||||
|
||||
}
|
||||
|
||||
void waitForRetrace()
|
||||
size_t waitForRetrace(size_t count)
|
||||
{
|
||||
unsigned int sync;
|
||||
FglXWaitVideoSyncSGI(1, 0, &sync);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uintptr_t getPlatformHandle() const
|
||||
|
||||
Reference in New Issue
Block a user