2015-09-03 00:30:28 +01:00
|
|
|
/* -*- 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/.
|
|
|
|
*/
|
|
|
|
|
2016-11-25 20:25:27 +00:00
|
|
|
// Fully wrapped methods that have no exotic GL header deps.
|
2015-09-03 00:30:28 +01:00
|
|
|
|
|
|
|
#ifndef INCLUDED_VCL_OPENGL_OPENGLWRAPPER_HXX
|
|
|
|
#define INCLUDED_VCL_OPENGL_OPENGLWRAPPER_HXX
|
|
|
|
|
|
|
|
#include <vcl/dllapi.h>
|
|
|
|
|
2015-09-04 16:51:26 +03:00
|
|
|
// All member functions static and VCL_DLLPUBLIC. Basically a glorified namespace.
|
|
|
|
struct VCL_DLLPUBLIC OpenGLWrapper
|
2015-09-03 00:30:28 +01:00
|
|
|
{
|
2015-10-12 15:25:41 +02:00
|
|
|
OpenGLWrapper() = delete; // Should not be instantiated
|
2015-09-04 16:51:26 +03:00
|
|
|
|
2015-09-03 00:30:28 +01:00
|
|
|
/**
|
|
|
|
* Returns true if VCL has OpenGL rendering enabled
|
|
|
|
*/
|
2016-12-08 09:47:05 +02:00
|
|
|
#ifdef LIBO_HEADLESS
|
|
|
|
static bool isVCLOpenGLEnabled()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#else
|
2015-09-03 00:30:28 +01:00
|
|
|
static bool isVCLOpenGLEnabled();
|
2016-01-26 15:15:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the number of times OpenGL buffers have been swapped.
|
|
|
|
*/
|
|
|
|
static sal_Int64 getBufferSwapCounter();
|
2016-12-08 09:47:05 +02:00
|
|
|
#endif
|
2015-09-03 00:30:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDED_VCL_OPENGL_OPENGLWRAPPER_HXX
|