From ba1c5353e6f6414f51dab82d1dd83a61da0062dc Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 7 Sep 2014 17:52:02 -0700 Subject: [PATCH] Fixed iOS build. --- src/glcontext_eagl.h | 1 - src/glcontext_eagl.mm | 18 +++++++++++++++++- src/renderer_gl.cpp | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/glcontext_eagl.h b/src/glcontext_eagl.h index 341e8dd0..32490116 100644 --- a/src/glcontext_eagl.h +++ b/src/glcontext_eagl.h @@ -22,7 +22,6 @@ 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); diff --git a/src/glcontext_eagl.mm b/src/glcontext_eagl.mm index 3d6fedde..38804757 100644 --- a/src/glcontext_eagl.mm +++ b/src/glcontext_eagl.mm @@ -91,13 +91,29 @@ namespace bgfx BX_TRACE("resize context"); } - 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); GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_colorRbo) ); EAGLContext* context = (EAGLContext*)m_context; [context presentRenderbuffer:GL_RENDERBUFFER]; } + void GlContext::makeCurrent(SwapChainGL* /*_swapChain*/) + { + } + void GlContext::import() { } diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 6c570b13..9d34afa9 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -1797,7 +1797,7 @@ namespace bgfx #if BX_PLATFORM_IOS // iOS: need to figure out how to deal with FBO created by context. - m_backBufferFbo = m_msaaBackBufferFbo = m_glctx.getFbo() + m_backBufferFbo = m_msaaBackBufferFbo = m_glctx.getFbo(); #endif // BX_PLATFORM_IOS } else