Welcome to mirror list, hosted at ThFree Co, Russian Federation.

RenderContext.mm « Classes « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 11a5b91cda1bfb3c9ff7dfe455e1dc8c22e630c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "RenderContext.hpp"

namespace iphone
{
	RenderContext::RenderContext()
	{
    m_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
	}

	RenderContext::RenderContext(RenderContext * renderContext)
	{
		m_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:renderContext->m_context.sharegroup];
	}

	RenderContext::~RenderContext()
	{

	}

	void RenderContext::makeCurrent()
	{
    [EAGLContext setCurrentContext:m_context];
	}
 
  graphics::RenderContext * RenderContext::createShared()
	{
    graphics::RenderContext * res = new RenderContext(this);
    res->setResourceManager(resourceManager());
    return res;
	}

	EAGLContext * RenderContext::getEAGLContext()
	{
		return m_context;
	}
}