Some minor fixes

This commit is contained in:
deve 2017-04-21 08:51:54 +02:00
parent 9fc3578b51
commit f4e803220b
2 changed files with 61 additions and 55 deletions

View File

@ -135,7 +135,7 @@ bool ContextManagerEGL::init(const ContextEGLParams& params)
bool ContextManagerEGL::initDisplay() bool ContextManagerEGL::initDisplay()
{ {
NativeDisplayType display = (NativeDisplayType)(m_creation_params.display); EGLNativeDisplayType display = m_creation_params.display;
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_ #ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
display = EGL_DEFAULT_DISPLAY; display = EGL_DEFAULT_DISPLAY;
@ -340,9 +340,9 @@ bool ContextManagerEGL::createContext()
if (m_egl_context == EGL_NO_CONTEXT) if (m_egl_context == EGL_NO_CONTEXT)
{ {
std::vector<EGLint> context_attribs; std::vector<EGLint> context_attribs;
context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION);
context_attribs.push_back(4); context_attribs.push_back(4);
context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION);
context_attribs.push_back(3); context_attribs.push_back(3);
context_attribs.push_back(EGL_NONE); context_attribs.push_back(EGL_NONE);
context_attribs.push_back(0); context_attribs.push_back(0);
@ -356,9 +356,9 @@ bool ContextManagerEGL::createContext()
if (m_egl_context == EGL_NO_CONTEXT) if (m_egl_context == EGL_NO_CONTEXT)
{ {
std::vector<EGLint> context_attribs; std::vector<EGLint> context_attribs;
context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION);
context_attribs.push_back(3); context_attribs.push_back(3);
context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION);
context_attribs.push_back(3); context_attribs.push_back(3);
context_attribs.push_back(EGL_NONE); context_attribs.push_back(EGL_NONE);
context_attribs.push_back(0); context_attribs.push_back(0);
@ -372,9 +372,9 @@ bool ContextManagerEGL::createContext()
if (m_egl_context == EGL_NO_CONTEXT) if (m_egl_context == EGL_NO_CONTEXT)
{ {
std::vector<EGLint> context_attribs; std::vector<EGLint> context_attribs;
context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION);
context_attribs.push_back(3); context_attribs.push_back(3);
context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION);
context_attribs.push_back(1); context_attribs.push_back(1);
context_attribs.push_back(EGL_NONE); context_attribs.push_back(EGL_NONE);
context_attribs.push_back(0); context_attribs.push_back(0);
@ -391,9 +391,9 @@ bool ContextManagerEGL::createContext()
m_is_legacy_device = true; m_is_legacy_device = true;
std::vector<EGLint> context_attribs; std::vector<EGLint> context_attribs;
context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MAJOR_VERSION);
context_attribs.push_back(2); context_attribs.push_back(2);
context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION_KHR); context_attribs.push_back(EGL_CONTEXT_MINOR_VERSION);
context_attribs.push_back(1); context_attribs.push_back(1);
context_attribs.push_back(EGL_NONE); context_attribs.push_back(EGL_NONE);
context_attribs.push_back(0); context_attribs.push_back(0);

View File

@ -14,7 +14,13 @@
#if defined(_IRR_COMPILE_WITH_EGL_) #if defined(_IRR_COMPILE_WITH_EGL_)
#include <EGL/egl.h> #include <EGL/egl.h>
#include <EGL/eglext.h>
#ifndef EGL_CONTEXT_MAJOR_VERSION
#define EGL_CONTEXT_MAJOR_VERSION 0x3098
#endif
#ifndef EGL_CONTEXT_MINOR_VERSION
#define EGL_CONTEXT_MINOR_VERSION 0x30FB
#endif
enum ContextEGLOpenGLAPI enum ContextEGLOpenGLAPI
{ {
@ -45,7 +51,7 @@ struct ContextEGLParams
class ContextManagerEGL class ContextManagerEGL
{ {
private: private:
NativeWindowType m_egl_window; EGLNativeWindowType m_egl_window;
EGLDisplay m_egl_display; EGLDisplay m_egl_display;
EGLSurface m_egl_surface; EGLSurface m_egl_surface;
EGLContext m_egl_context; EGLContext m_egl_context;