[iOS] Adjusted the code and build files to use Automatic Reference Counting
This commit is contained in:
parent
d50f94ca97
commit
e20ff86330
3 changed files with 14 additions and 5 deletions
|
@ -30,7 +30,9 @@
|
|||
#include <SFML/Window/iOS/SFView.hpp>
|
||||
#include <SFML/System/Err.hpp>
|
||||
#include <OpenGLES/EAGL.h>
|
||||
#include <OpenGLES/EAGLDrawable.h>
|
||||
#include <OpenGLES/ES1/glext.h>
|
||||
#include <QuartzCore/CAEAGLLayer.h>
|
||||
|
||||
|
||||
namespace sf
|
||||
|
@ -98,9 +100,6 @@ EaglContext::~EaglContext()
|
|||
|
||||
// Restore the previous context
|
||||
[EAGLContext setCurrentContext:previousContext];
|
||||
|
||||
// Release the context
|
||||
[m_context release];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +124,7 @@ void EaglContext::recreateRenderBuffers(SFView* glView)
|
|||
glGenRenderbuffersOES(1, &m_colorbuffer);
|
||||
glBindRenderbufferOES(GL_RENDERBUFFER_OES, m_colorbuffer);
|
||||
if (glView)
|
||||
[m_context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:glView.layer];
|
||||
[m_context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)glView.layer];
|
||||
glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, m_colorbuffer);
|
||||
|
||||
// Create a depth buffer if requested
|
||||
|
|
|
@ -98,7 +98,7 @@ void WindowImplUIKit::processEvents()
|
|||
////////////////////////////////////////////////////////////
|
||||
WindowHandle WindowImplUIKit::getSystemHandle() const
|
||||
{
|
||||
return m_window;
|
||||
return (__bridge WindowHandle)m_window;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue