mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
Fixed OSX build.
This commit is contained in:
parent
2c03cf4927
commit
96e07d3929
2 changed files with 25 additions and 2 deletions
|
@ -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:");
|
||||
|
|
Loading…
Reference in a new issue