mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 04:24:29 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
42
iphone/Maps/Classes/iosOGLContext.h
Normal file
42
iphone/Maps/Classes/iosOGLContext.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "drape/drape_global.hpp"
|
||||
#include "drape/oglcontext.hpp"
|
||||
#include "drape/gl_includes.hpp"
|
||||
|
||||
#import <QuartzCore/CAEAGLLayer.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
class iosOGLContext : public dp::OGLContext
|
||||
{
|
||||
public:
|
||||
iosOGLContext(CAEAGLLayer * layer, dp::ApiVersion apiVersion,
|
||||
iosOGLContext * contextToShareWith, bool needBuffers = false);
|
||||
~iosOGLContext();
|
||||
|
||||
void MakeCurrent() override;
|
||||
void Present() override;
|
||||
void SetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override;
|
||||
void Resize(int w, int h) override;
|
||||
void SetPresentAvailable(bool available) override;
|
||||
|
||||
private:
|
||||
dp::ApiVersion m_apiVersion;
|
||||
CAEAGLLayer * m_layer;
|
||||
EAGLContext * m_nativeContext;
|
||||
|
||||
void InitBuffers();
|
||||
void DestroyBuffers();
|
||||
|
||||
//{@ Buffers
|
||||
bool m_needBuffers;
|
||||
bool m_hasBuffers;
|
||||
|
||||
GLuint m_renderBufferId;
|
||||
GLuint m_depthBufferId;
|
||||
GLuint m_frameBufferId;
|
||||
//@} buffers
|
||||
|
||||
std::atomic<bool> m_presentAvailable;
|
||||
};
|
||||
Reference in New Issue
Block a user