diff options
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r-- | vcl/inc/opengl/framebuffer.hxx | 45 | ||||
-rw-r--r-- | vcl/inc/opengl/salbmp.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/opengl/texture.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/opengl/x11/gdiimpl.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/opengl/x11/salvd.hxx | 55 |
5 files changed, 105 insertions, 1 deletions
diff --git a/vcl/inc/opengl/framebuffer.hxx b/vcl/inc/opengl/framebuffer.hxx new file mode 100644 index 000000000000..4ccc1c5728ea --- /dev/null +++ b/vcl/inc/opengl/framebuffer.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_VCL_INC_OPENGL_FRAMEBUFFER_H +#define INCLUDED_VCL_INC_OPENGL_FRAMEBUFFER_H + +#include <GL/glew.h> +#include <vcl/dllapi.h> + +#include <opengl/texture.hxx> + +class VCL_PLUGIN_PUBLIC OpenGLFramebuffer +{ +private: + GLuint mnId; + OpenGLTexture maAttachedTexture; + +public: + OpenGLFramebuffer(); + virtual ~OpenGLFramebuffer(); + + GLuint Id() const { return mnId; }; + + void Bind(); + void Unbind(); + + bool IsFree() const; + bool IsAttached( const OpenGLTexture& rTexture ) const; + void AttachTexture( const OpenGLTexture& rTexture ); + void DetachTexture(); + +public: + OpenGLFramebuffer* mpPrevFramebuffer; + OpenGLFramebuffer* mpNextFramebuffer; +}; + +#endif // INCLUDED_VCL_INC_OPENGL_FRAMEBUFFER_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx index 449c1b68adf3..6a812d007af0 100644 --- a/vcl/inc/opengl/salbmp.hxx +++ b/vcl/inc/opengl/salbmp.hxx @@ -39,6 +39,7 @@ class BitmapPalette; class VCL_PLUGIN_PUBLIC OpenGLSalBitmap : public SalBitmap { private: + OpenGLContext* mpContext; OpenGLTexture maTexture; bool mbDirtyTexture; BitmapPalette maPalette; diff --git a/vcl/inc/opengl/texture.hxx b/vcl/inc/opengl/texture.hxx index eb003cfe5b96..ad4738a6948d 100644 --- a/vcl/inc/opengl/texture.hxx +++ b/vcl/inc/opengl/texture.hxx @@ -22,6 +22,9 @@ #include <GL/glew.h> #include <vcl/dllapi.h> +#include <vcl/salgtype.hxx> + +#include <tools/gen.hxx> class ImplOpenGLTexture { diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx index f5e5bfb4f2f4..53ebe5b30722 100644 --- a/vcl/inc/opengl/x11/gdiimpl.hxx +++ b/vcl/inc/opengl/x11/gdiimpl.hxx @@ -31,8 +31,8 @@ protected: bool IsOffscreen() const SAL_OVERRIDE; virtual OpenGLContext* CreateWinContext() SAL_OVERRIDE; - virtual bool CompareWinContext( OpenGLContext* pContext ) SAL_OVERRIDE; virtual OpenGLContext* CreatePixmapContext() SAL_OVERRIDE; + virtual bool UseContext( OpenGLContext* pContext ) SAL_OVERRIDE; public: // implementation of X11GraphicsImpl diff --git a/vcl/inc/opengl/x11/salvd.hxx b/vcl/inc/opengl/x11/salvd.hxx new file mode 100644 index 000000000000..0d7143b2b01f --- /dev/null +++ b/vcl/inc/opengl/x11/salvd.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_VCL_INC_OPENGL_X11_SALVD_H +#define INCLUDED_VCL_INC_OPENGL_X11_SALVD_H + +#include <prex.h> +#include <postx.h> + +#include <unx/saltype.h> +#include <salvd.hxx> + +class SalDisplay; +class X11OpenGLSalGraphics; + +class X11OpenGLSalVirtualDevice : public SalVirtualDevice +{ + SalDisplay *mpDisplay; + X11SalGraphics *mpGraphics; + bool mbGraphics; // is Graphics used + SalX11Screen mnXScreen; + int mnWidth; + int mnHeight; + sal_uInt16 mnDepth; + +public: + X11OpenGLSalVirtualDevice( SalGraphics *pGraphics, + long nDX, long nDY, + sal_uInt16 nBitCount, + const SystemGraphicsData *pData ); + virtual ~X11OpenGLSalVirtualDevice(); + + SalDisplay * GetDisplay() const { return mpDisplay; } + sal_uInt16 GetDepth() const { return mnDepth; } + int GetWidth() const { return mnWidth; } + int GetHeight() const { return mnHeight; } + SalX11Screen GetXScreenNumber() const { return mnXScreen; } + + virtual SalGraphics* AcquireGraphics() SAL_OVERRIDE; + virtual void ReleaseGraphics( SalGraphics* pGraphics ) SAL_OVERRIDE; + + // Set new size, without saving the old contents + virtual bool SetSize( long nNewDX, long nNewDY ) SAL_OVERRIDE; + virtual void GetSize( long& rWidth, long& rHeight ) SAL_OVERRIDE; +}; + +#endif // INCLUDED_VCL_INC_OPENGL_X11_SALVD_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |