summaryrefslogtreecommitdiff
path: root/src/render/naclgles.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-13 02:30:25 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-13 02:31:19 +0300
commit0020c3ef152041998e04a3e2d227e719509f2a63 (patch)
tree663a4b657c58c4d8d46695bf7788b0e7cda3279c /src/render/naclgles.cpp
parentbe4ed51b29f77de23f6ffbf61df65554c6a394ad (diff)
downloadmv-0020c3ef152041998e04a3e2d227e719509f2a63.tar.gz
mv-0020c3ef152041998e04a3e2d227e719509f2a63.tar.bz2
mv-0020c3ef152041998e04a3e2d227e719509f2a63.tar.xz
mv-0020c3ef152041998e04a3e2d227e719509f2a63.zip
Allow resize nacl window with OpenGL without recreating context.
Diffstat (limited to 'src/render/naclgles.cpp')
-rw-r--r--src/render/naclgles.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/naclgles.cpp b/src/render/naclgles.cpp
index ef53e6849..6451b6a36 100644
--- a/src/render/naclgles.cpp
+++ b/src/render/naclgles.cpp
@@ -28,6 +28,7 @@
#include <ppapi_simple/ps.h>
+#include <ppapi/c/ppb_graphics_3d.h>
#include <ppapi/c/ppb_opengles2.h>
#include <ppapi/gles2/gl2ext_ppapi.h>
@@ -36,11 +37,14 @@
const struct PPB_OpenGLES2* gles2Interface = nullptr;
PP_Resource gles2Context = nullptr;
+const struct PPB_Graphics3D_1_0 *graphics3dInterface = nullptr;
void NaclGles::initGles()
{
gles2Interface = static_cast<const PPB_OpenGLES2*>(
PSGetInterface(PPB_OPENGLES2_INTERFACE));
+ graphics3dInterface = static_cast<const PPB_Graphics3D_1_0*>(
+ PSGetInterface(PPB_GRAPHICS_3D_INTERFACE_1_0));
gles2Context = glGetCurrentContextPPAPI();
logger->log("InitGles: %p, %d", gles2Interface, gles2Context);