1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00
-=-=-=

-Added missing quaternion constructor
-code completion fixes
-winrt fixes
This commit is contained in:
Juan Linietsky
2014-12-20 15:30:06 -03:00
parent 7dbc19f32d
commit a36a774897
23 changed files with 398 additions and 235 deletions

View File

@@ -1,5 +1,7 @@
#include "gl_context_egl.h"
#include "EGL/eglext.h"
using namespace Platform;
void ContextEGL::release_current() {
@@ -22,6 +24,14 @@ int ContextEGL::get_window_height() {
return height;
};
void ContextEGL::reset() {
cleanup();
window = CoreWindow::GetForCurrentThread();
initialize();
};
void ContextEGL::swap_buffers() {
if (eglSwapBuffers(mEglDisplay, mEglSurface) != EGL_TRUE)
@@ -63,7 +73,23 @@ Error ContextEGL::initialize() {
try {
display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
const EGLint displayAttributes[] =
{
EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9,
EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3,
EGL_NONE,
};
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));
if (!eglGetPlatformDisplayEXT)
{
throw Exception::CreateException(E_FAIL, L"Failed to get function eglGetPlatformDisplayEXT");
}
display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, displayAttributes);
if (display == EGL_NO_DISPLAY)
{
throw Exception::CreateException(E_FAIL, L"Failed to get default EGL display");