mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fixed OSX build.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
struct SwapChainGL;
|
||||
|
||||
struct GlContext
|
||||
{
|
||||
GlContext()
|
||||
@@ -20,7 +22,12 @@ namespace bgfx
|
||||
void create(uint32_t _width, uint32_t _height);
|
||||
void destroy();
|
||||
void resize(uint32_t _width, uint32_t _height, bool _vsync);
|
||||
void swap();
|
||||
|
||||
SwapChainGL* createSwapChain(void* _nwh);
|
||||
void destorySwapChain(SwapChainGL* _swapChain);
|
||||
void swap(SwapChainGL* _swapChain = NULL);
|
||||
void makeCurrent(SwapChainGL* _swapChain = NULL);
|
||||
|
||||
void import();
|
||||
|
||||
bool isValid() const
|
||||
|
||||
@@ -88,13 +88,29 @@ namespace bgfx
|
||||
[glContext setValues:&interval forParameter:NSOpenGLCPSwapInterval];
|
||||
}
|
||||
|
||||
void GlContext::swap()
|
||||
SwapChainGL* GlContext::createSwapChain(void* /*_nwh*/)
|
||||
{
|
||||
BX_CHECK(false, "Shouldn't be called!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void GlContext::destorySwapChain(SwapChainGL* /*_swapChain*/)
|
||||
{
|
||||
BX_CHECK(false, "Shouldn't be called!");
|
||||
}
|
||||
|
||||
void GlContext::swap(SwapChainGL* _swapChain)
|
||||
{
|
||||
BX_CHECK(NULL == _swapChain, "Shouldn't be called!"); BX_UNUSED(_swapChain);
|
||||
NSOpenGLContext* glContext = (NSOpenGLContext*)m_context;
|
||||
[glContext makeCurrentContext];
|
||||
[glContext flushBuffer];
|
||||
}
|
||||
|
||||
void GlContext::makeCurrent(SwapChainGL* /*_swapChain*/)
|
||||
{
|
||||
}
|
||||
|
||||
void GlContext::import()
|
||||
{
|
||||
BX_TRACE("Import:");
|
||||
|
||||
Reference in New Issue
Block a user