diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-28 15:42:32 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-28 17:26:35 +0200 |
commit | 0a1746e942224851b584f5902d7b1e0ca496fdab (patch) | |
tree | e97c7ff5bfad9ef414926361536ced7c20e98a86 /avmedia/source/opengl/oglwindow.cxx | |
parent | 4ee7708bc261d49f4a08d617fedf337f86de1000 (diff) |
avmedia: make OpenGL window render model when play button is pushed.
Redraw player window (call update) when Paint() is called on its
parent.
Use a temp variable to save playing state.
Change-Id: I3d9b716c7f77587d98e4c06dca6d43a7dc8e32dd
Diffstat (limited to 'avmedia/source/opengl/oglwindow.cxx')
-rw-r--r-- | avmedia/source/opengl/oglwindow.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx index 04c00e0bfaad..b67456250e46 100644 --- a/avmedia/source/opengl/oglwindow.cxx +++ b/avmedia/source/opengl/oglwindow.cxx @@ -28,6 +28,10 @@ OGLWindow::~OGLWindow() void SAL_CALL OGLWindow::update() throw (css::uno::RuntimeException, std::exception) { + m_pContext->makeCurrent(); + gltf_renderer_set_content(m_pHandle); + gltf_renderer(m_pHandle); + m_pContext->swapBuffers(); } sal_Bool SAL_CALL OGLWindow::setZoomLevel( css::media::ZoomLevel eZoomLevel ) throw (css::uno::RuntimeException, std::exception) @@ -100,10 +104,7 @@ void SAL_CALL OGLWindow::setPosSize( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidt m_pHandle->viewport.height = nHeight; if( m_bVisible ) { - m_pContext->makeCurrent(); - gltf_renderer_set_content(m_pHandle); - gltf_renderer(m_pHandle); - m_pContext->swapBuffers(); + update(); } } } |