blob: 5f9a6ab0c15b9569f44db0037252515b910393da (
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
40
41
42
43
44
45
46
47
48
|
#pragma once
#include "../core/jni_helper.hpp"
#include "androidoglcontext.hpp"
#include "../../../drape/oglcontextfactory.hpp"
namespace android
{
class AndroidOGLContextFactory : public dp::OGLContextFactory
{
public:
AndroidOGLContextFactory(JNIEnv * env, jobject jsurface);
~AndroidOGLContextFactory();
bool IsValid() const;
virtual dp::OGLContext * getDrawContext();
virtual dp::OGLContext * getResourcesUploadContext();
int GetWidth() const;
int GetHeight() const;
void UpdateSurfaceSize();
private:
bool QuerySurfaceSize();
private:
bool createWindowSurface();
bool createPixelbufferSurface();
AndroidOGLContext * m_drawContext;
AndroidOGLContext * m_uploadContext;
EGLSurface m_windowSurface;
EGLSurface m_pixelbufferSurface;
EGLConfig m_config;
ANativeWindow * m_nativeWindow;
EGLDisplay m_display;
int m_surfaceWidth;
int m_surfaceHeight;
bool m_valid;
};
} // namespace android
|