From fe2ee9ecf5709d49279265f0e5d3b2d0a5688265 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Dec 2015 19:23:41 +0100 Subject: OPENGL: Refactor screen refresh handling. Subclasses of OpenGLGraphicsManager are now supposed to supply a refreshScreen function which handles actual screen updating (for example, buffer swapping). --- backends/platform/tizen/graphics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backends/platform/tizen/graphics.cpp') diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp index 9b23e3fe78..759c4e519d 100644 --- a/backends/platform/tizen/graphics.cpp +++ b/backends/platform/tizen/graphics.cpp @@ -127,7 +127,6 @@ void TizenGraphicsManager::setReady() { void TizenGraphicsManager::updateScreen() { if (!_initState) { OpenGLGraphicsManager::updateScreen(); - eglSwapBuffers(_eglDisplay, _eglSurface); } } @@ -203,3 +202,7 @@ bool TizenGraphicsManager::loadVideoMode(uint requestedWidth, uint requestedHeig // using a fixed output size we do nothing like that here. return true; } + +void TizenGraphicsManager::refreshScreen() { + eglSwapBuffers(_eglDisplay, _eglSurface); +} -- cgit v1.2.3 From 8f3783da0994703e9fe6fcfc666d194c9eb00865 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Dec 2015 23:51:21 +0100 Subject: OPENGL: Add functionality to query OpenGL functions on runtime. This can and will be used for future extension usage support. Tizen changes have been untested. --- backends/platform/tizen/graphics.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backends/platform/tizen/graphics.cpp') diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp index 759c4e519d..971be460d8 100644 --- a/backends/platform/tizen/graphics.cpp +++ b/backends/platform/tizen/graphics.cpp @@ -206,3 +206,7 @@ bool TizenGraphicsManager::loadVideoMode(uint requestedWidth, uint requestedHeig void TizenGraphicsManager::refreshScreen() { eglSwapBuffers(_eglDisplay, _eglSurface); } + +void *TizenGraphicsManager::getProcAddress(const char *name) const { + return eglGetProcAddress(name); +} -- cgit v1.2.3 From d6d3e17d53754acedce0b1706e73f929d29b5eb8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 12 Dec 2015 22:08:33 +0100 Subject: OPENGL: Allow runtime specification of OpenGL mode. Formerly, we required that the OpenGL mode was fixed at compile time. Now we allow the code to work with whatever it is given at runtime. It is still possible to force a context type on compile time. --- backends/platform/tizen/graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/tizen/graphics.cpp') diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp index 971be460d8..caa18c556f 100644 --- a/backends/platform/tizen/graphics.cpp +++ b/backends/platform/tizen/graphics.cpp @@ -59,7 +59,7 @@ result TizenGraphicsManager::Construct() { // We default to RGB565 and RGBA5551 which is closest to the actual output // mode we setup. - notifyContextCreate(Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0)); + notifyContextCreate(Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0), OpenGL::kContextGLES); // Tell our size. int x, y, width, height; -- cgit v1.2.3 From af727afe0ceb66eaf51985ceceb2ac842b3358ee Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 18 Dec 2015 21:14:48 +0100 Subject: OPENGL: Simplify context type setting. --- backends/platform/tizen/graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends/platform/tizen/graphics.cpp') diff --git a/backends/platform/tizen/graphics.cpp b/backends/platform/tizen/graphics.cpp index caa18c556f..61dbfc38fb 100644 --- a/backends/platform/tizen/graphics.cpp +++ b/backends/platform/tizen/graphics.cpp @@ -56,10 +56,11 @@ result TizenGraphicsManager::Construct() { loadEgl(); // Notify the OpenGL code about our context. + setContextType(OpenGL::kContextGLES); // We default to RGB565 and RGBA5551 which is closest to the actual output // mode we setup. - notifyContextCreate(Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0), OpenGL::kContextGLES); + notifyContextCreate(Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0)); // Tell our size. int x, y, width, height; -- cgit v1.2.3