2010-11-12 05:30:38 +00:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2010 Fredrik Höglund <fredrik@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
#ifndef KWIN_GLPLATFORM_H
|
|
|
|
#define KWIN_GLPLATFORM_H
|
|
|
|
|
2013-12-03 09:43:57 +00:00
|
|
|
#include <kwinglutils_export.h>
|
2016-08-05 06:46:38 +00:00
|
|
|
#include <kwinglobals.h>
|
2010-11-12 05:30:38 +00:00
|
|
|
|
2013-03-07 12:47:07 +00:00
|
|
|
#include <QByteArray>
|
2010-11-12 05:30:38 +00:00
|
|
|
#include <QSet>
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
2014-04-17 06:04:53 +00:00
|
|
|
// forward declare method
|
|
|
|
void cleanupGL();
|
2010-11-12 05:30:38 +00:00
|
|
|
|
|
|
|
inline qint64 kVersionNumber(qint64 major, qint64 minor, qint64 patch = 0)
|
|
|
|
{
|
|
|
|
return ((major & 0xffff) << 32) | ((minor & 0xffff) << 16) | (patch & 0xffff);
|
|
|
|
}
|
|
|
|
|
|
|
|
enum GLFeature {
|
|
|
|
/**
|
|
|
|
* Set when a texture bound to a pixmap uses the same storage as the pixmap,
|
|
|
|
* and thus doesn't need to be rebound when the contents of the pixmap
|
|
|
|
* has changed.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
LooseBinding,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set if the driver supports the following extensions:
|
|
|
|
* - GL_ARB_shader_objects
|
|
|
|
* - GL_ARB_fragment_shader
|
|
|
|
* - GL_ARB_vertex_shader
|
|
|
|
* - GL_ARB_shading_language_100
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
GLSL,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If set, assume the following:
|
|
|
|
* - No flow control or branches
|
|
|
|
* - No loops, unless the loops have a fixed iteration count and can be unrolled
|
|
|
|
* - No functions, unless they can be inlined
|
|
|
|
* - No indirect indexing of arrays
|
|
|
|
* - No support for gl_ClipVertex or gl_FrontFacing
|
|
|
|
* - No texture fetches in vertex shaders
|
|
|
|
* - Max 32 texture fetches in fragment shaders
|
|
|
|
* - Max 4 texture indirections
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
LimitedGLSL,
|
2010-11-18 21:47:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set when the driver supports GL_ARB_texture_non_power_of_two.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-18 21:47:29 +00:00
|
|
|
TextureNPOT,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If set, the driver supports GL_ARB_texture_non_power_of_two with the
|
|
|
|
* GL_ARB_texture_rectangle limitations.
|
|
|
|
*
|
|
|
|
* This means no support for mipmap filters, and that only the following
|
2011-01-30 14:34:42 +00:00
|
|
|
* wrap modes are supported:
|
2010-11-18 21:47:29 +00:00
|
|
|
* - GL_CLAMP
|
|
|
|
* - GL_CLAMP_TO_EDGE
|
|
|
|
* - GL_CLAMP_TO_BORDER
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-18 21:47:29 +00:00
|
|
|
LimitedNPOT
|
2010-11-12 05:30:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum Driver {
|
|
|
|
Driver_R100, // Technically "Radeon"
|
|
|
|
Driver_R200,
|
|
|
|
Driver_R300C,
|
|
|
|
Driver_R300G,
|
|
|
|
Driver_R600C,
|
|
|
|
Driver_R600G,
|
|
|
|
Driver_Nouveau,
|
|
|
|
Driver_Intel,
|
|
|
|
Driver_NVidia,
|
|
|
|
Driver_Catalyst,
|
|
|
|
Driver_Swrast,
|
|
|
|
Driver_Softpipe,
|
|
|
|
Driver_Llvmpipe,
|
2012-10-13 08:33:38 +00:00
|
|
|
Driver_VirtualBox,
|
2012-10-13 14:40:17 +00:00
|
|
|
Driver_VMware,
|
2016-08-12 07:57:41 +00:00
|
|
|
Driver_Qualcomm,
|
2018-12-20 14:29:42 +00:00
|
|
|
Driver_RadeonSI,
|
2010-12-12 18:22:09 +00:00
|
|
|
Driver_Unknown
|
2010-11-12 05:30:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum ChipClass {
|
|
|
|
// Radeon
|
|
|
|
R100 = 0, // GL1.3 DX7 2000
|
|
|
|
R200, // GL1.4 DX8.1 SM 1.4 2001
|
|
|
|
R300, // GL2.0 DX9 SM 2.0 2002
|
|
|
|
R400, // GL2.0 DX9b SM 2.0b 2004
|
|
|
|
R500, // GL2.0 DX9c SM 3.0 2005
|
|
|
|
R600, // GL3.3 DX10 SM 4.0 2006
|
|
|
|
R700, // GL3.3 DX10.1 SM 4.1 2008
|
|
|
|
Evergreen, // GL4.0 CL1.0 DX11 SM 5.0 2009
|
|
|
|
NorthernIslands, // GL4.0 CL1.1 DX11 SM 5.0 2010
|
2018-12-20 14:29:42 +00:00
|
|
|
SouthernIslands, // GL4.5 CL1.2 DX11.1 SM 5.1 2012
|
|
|
|
SeaIslands, // GL4.5 CL2.0 DX12 SM 6.0 2013
|
|
|
|
VolcanicIslands, // GL4.5 CL2.0 DX12 SM 6.0 2015
|
|
|
|
ArcticIslands, // GL4.5 CL2.0 DX12 SM 6.0 2016
|
|
|
|
Vega, // GL4.6 CL2.0 DX12 SM 6.0 2017
|
2010-11-12 05:30:38 +00:00
|
|
|
UnknownRadeon = 999,
|
|
|
|
|
|
|
|
// NVIDIA
|
|
|
|
NV10 = 1000, // GL1.2 DX7 1999
|
|
|
|
NV20, // GL1.3 DX8 SM 1.1 2001
|
|
|
|
NV30, // GL1.5 DX9a SM 2.0 2003
|
|
|
|
NV40, // GL2.1 DX9c SM 3.0 2004
|
|
|
|
G80, // GL3.3 DX10 SM 4.0 2006
|
|
|
|
GF100, // GL4.1 CL1.1 DX11 SM 5.0 2010
|
|
|
|
UnknownNVidia = 1999,
|
|
|
|
|
|
|
|
// Intel
|
|
|
|
I8XX = 2000, // GL1.3 DX7 2001
|
|
|
|
I915, // GL1.4/1.5 DX9/DX9c SM 2.0 2004
|
|
|
|
I965, // GL2.0/2.1 DX9/DX10 SM 3.0/4.0 2006
|
|
|
|
SandyBridge, // GL3.1 CL1.1 DX10.1 SM 4.0 2010
|
2012-10-13 06:35:30 +00:00
|
|
|
IvyBridge, // GL4.0 CL1.1 DX11 SM 5.0 2012
|
|
|
|
Haswell, // GL4.0 CL1.2 DX11.1 SM 5.0 2013
|
2010-11-12 05:30:38 +00:00
|
|
|
UnknownIntel = 2999,
|
|
|
|
|
2016-08-12 07:57:41 +00:00
|
|
|
// Qualcomm Adreno
|
|
|
|
// from https://en.wikipedia.org/wiki/Adreno
|
|
|
|
Adreno1XX = 3000, // GLES1.1
|
|
|
|
Adreno2XX, // GLES2.0 DX9c
|
|
|
|
Adreno3XX, // GLES3.0 CL1.1 DX11.1
|
|
|
|
Adreno4XX, // GLES3.1 CL1.2 DX11.2
|
|
|
|
Adreno5XX, // GLES3.1 CL2.0 DX11.2
|
|
|
|
UnknownAdreno = 3999,
|
|
|
|
|
2010-11-12 05:30:38 +00:00
|
|
|
UnknownChipClass = 99999
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-12-03 09:43:57 +00:00
|
|
|
class KWINGLUTILS_EXPORT GLPlatform
|
2010-11-12 05:30:38 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
~GLPlatform();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Runs the detection code using the current OpenGL context.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2012-09-29 11:19:35 +00:00
|
|
|
void detect(OpenGLPlatformInterface platformInterface);
|
2010-11-12 05:30:38 +00:00
|
|
|
|
2010-11-28 17:07:23 +00:00
|
|
|
/**
|
|
|
|
* Prints the results of the detection code.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-28 17:07:23 +00:00
|
|
|
void printResults() const;
|
|
|
|
|
2010-11-12 05:30:38 +00:00
|
|
|
/**
|
|
|
|
* Returns a pointer to the GLPlatform instance.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
static GLPlatform *instance();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the driver support the given feature, and false otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
bool supports(GLFeature feature) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the OpenGL version.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 glVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the GLSL version if the driver supports GLSL, and 0 otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 glslVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Mesa version if the driver is a Mesa driver, and 0 otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 mesaVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Gallium version if the driver is a Gallium driver, and 0 otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 galliumVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the X server version.
|
|
|
|
*
|
|
|
|
* Note that the version number changed from 7.2 to 1.3 in the first release
|
|
|
|
* following the doupling of the X server from the katamari.
|
|
|
|
*
|
|
|
|
* For non X.org servers, this method returns 0.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 serverVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Linux kernel version.
|
|
|
|
*
|
|
|
|
* If the kernel is not a Linux kernel, this method returns 0.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 kernelVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the driver version.
|
|
|
|
*
|
|
|
|
* For Mesa drivers, this is the same as the Mesa version number.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 driverVersion() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the driver.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
Driver driver() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the chip class.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
ChipClass chipClass() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the driver is a Mesa driver, and false otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
bool isMesaDriver() const;
|
|
|
|
|
2011-01-11 22:32:51 +00:00
|
|
|
/**
|
|
|
|
* Returns true if the driver is a Gallium driver, and false otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2011-01-11 22:32:51 +00:00
|
|
|
bool isGalliumDriver() const;
|
|
|
|
|
2010-11-12 05:30:38 +00:00
|
|
|
/**
|
|
|
|
* Returns true if the GPU is a Radeon GPU, and false otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
bool isRadeon() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the GPU is an NVIDIA GPU, and false otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
bool isNvidia() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the GPU is an Intel GPU, and false otherwise.
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2010-11-12 05:30:38 +00:00
|
|
|
bool isIntel() const;
|
|
|
|
|
2012-10-13 08:33:38 +00:00
|
|
|
/**
|
|
|
|
* @returns @c true if the "GPU" is a VirtualBox GPU, and @c false otherwise.
|
|
|
|
* @since 4.10
|
|
|
|
**/
|
|
|
|
bool isVirtualBox() const;
|
|
|
|
|
2012-10-13 14:40:17 +00:00
|
|
|
/**
|
|
|
|
* @returns @c true if the "GPU" is a VMWare GPU, and @c false otherwise.
|
|
|
|
* @since 4.10
|
|
|
|
**/
|
|
|
|
bool isVMware() const;
|
|
|
|
|
2011-05-06 16:13:54 +00:00
|
|
|
/**
|
|
|
|
* @returns @c true if OpenGL is emulated in software.
|
|
|
|
* @since 4.7
|
|
|
|
**/
|
|
|
|
bool isSoftwareEmulation() const;
|
|
|
|
|
2012-10-13 08:33:38 +00:00
|
|
|
/**
|
|
|
|
* @returns @c true if the driver is known to be from a virtual machine.
|
|
|
|
* @since 4.10
|
|
|
|
**/
|
|
|
|
bool isVirtualMachine() const;
|
|
|
|
|
2016-08-12 07:57:41 +00:00
|
|
|
/**
|
|
|
|
* @returns @c true if the GPU is a Qualcomm Adreno GPU, and false otherwise
|
|
|
|
* @since 5.8
|
|
|
|
**/
|
|
|
|
bool isAdreno() const;
|
|
|
|
|
2012-03-04 14:10:45 +00:00
|
|
|
/**
|
|
|
|
* @returns the GL_VERSION string as provided by the driver.
|
|
|
|
* @since 4.9
|
|
|
|
**/
|
|
|
|
const QByteArray &glVersionString() const;
|
|
|
|
/**
|
|
|
|
* @returns the GL_RENDERER string as provided by the driver.
|
|
|
|
* @since 4.9
|
|
|
|
**/
|
|
|
|
const QByteArray &glRendererString() const;
|
|
|
|
/**
|
|
|
|
* @returns the GL_VENDOR string as provided by the driver.
|
|
|
|
* @since 4.9
|
|
|
|
**/
|
|
|
|
const QByteArray &glVendorString() const;
|
|
|
|
/**
|
|
|
|
* @returns the GL_SHADING_LANGUAGE_VERSION string as provided by the driver.
|
|
|
|
* If the driver does not support the OpenGL Shading Language a null bytearray is returned.
|
|
|
|
* @since 4.9
|
|
|
|
**/
|
|
|
|
const QByteArray &glShadingLanguageVersionString() const;
|
|
|
|
/**
|
|
|
|
* @returns Whether the driver supports loose texture binding.
|
|
|
|
* @since 4.9
|
|
|
|
**/
|
|
|
|
bool isLooseBinding() const;
|
2012-11-13 20:41:02 +00:00
|
|
|
/**
|
|
|
|
* @returns Whether OpenGL ES is used
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2012-11-13 20:41:02 +00:00
|
|
|
bool isGLES() const;
|
2012-03-04 14:10:45 +00:00
|
|
|
|
2012-10-05 16:00:49 +00:00
|
|
|
/**
|
|
|
|
* @returns The CompositingType recommended by the driver.
|
|
|
|
* @since 4.10
|
|
|
|
**/
|
|
|
|
CompositingType recommendedCompositor() const;
|
|
|
|
|
2013-06-28 18:04:33 +00:00
|
|
|
/**
|
|
|
|
* Returns true if glMapBufferRange() is likely to perform worse than glBufferSubData()
|
|
|
|
* when updating an unused range of a buffer object, and false otherwise.
|
|
|
|
*
|
|
|
|
* @since 4.11
|
2019-02-02 18:17:44 +00:00
|
|
|
**/
|
2013-06-28 18:04:33 +00:00
|
|
|
bool preferBufferSubData() const;
|
|
|
|
|
2014-04-22 07:27:05 +00:00
|
|
|
/**
|
|
|
|
* @returns The OpenGLPlatformInterface currently used
|
|
|
|
* @since 5.0
|
|
|
|
**/
|
|
|
|
OpenGLPlatformInterface platformInterface() const;
|
|
|
|
|
2012-03-04 14:10:45 +00:00
|
|
|
/**
|
2015-11-05 14:14:06 +00:00
|
|
|
* @returns a human readable form of the @p version as a QString.
|
2012-03-04 14:10:45 +00:00
|
|
|
* @since 4.9
|
|
|
|
* @see glVersion
|
|
|
|
* @see glslVersion
|
|
|
|
* @see driverVersion
|
|
|
|
* @see mesaVersion
|
|
|
|
* @see galliumVersion
|
|
|
|
* @see kernelVersion
|
|
|
|
* @see serverVersion
|
|
|
|
**/
|
|
|
|
static QString versionToString(qint64 version);
|
|
|
|
/**
|
2015-11-05 14:14:06 +00:00
|
|
|
* @returns a human readable form of the @p version as a QByteArray.
|
|
|
|
* @since 5.5
|
|
|
|
* @see glVersion
|
|
|
|
* @see glslVersion
|
|
|
|
* @see driverVersion
|
|
|
|
* @see mesaVersion
|
|
|
|
* @see galliumVersion
|
|
|
|
* @see kernelVersion
|
|
|
|
* @see serverVersion
|
|
|
|
**/
|
|
|
|
static QByteArray versionToString8(qint64 version);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns a human readable form for the @p driver as a QString.
|
2012-03-04 14:10:45 +00:00
|
|
|
* @since 4.9
|
|
|
|
* @see driver
|
|
|
|
**/
|
|
|
|
static QString driverToString(Driver driver);
|
|
|
|
/**
|
2015-11-05 14:14:06 +00:00
|
|
|
* @returns a human readable form for the @p driver as a QByteArray.
|
|
|
|
* @since 5.5
|
|
|
|
* @see driver
|
|
|
|
**/
|
|
|
|
static QByteArray driverToString8(Driver driver);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns a human readable form for the @p chipClass as a QString.
|
2012-03-04 14:10:45 +00:00
|
|
|
* @since 4.9
|
|
|
|
* @see chipClass
|
|
|
|
**/
|
|
|
|
static QString chipClassToString(ChipClass chipClass);
|
2015-11-05 14:14:06 +00:00
|
|
|
/**
|
|
|
|
* @returns a human readable form for the @p chipClass as a QByteArray.
|
|
|
|
* @since 5.5
|
|
|
|
* @see chipClass
|
|
|
|
**/
|
|
|
|
static QByteArray chipClassToString8(ChipClass chipClass);
|
2012-03-04 14:10:45 +00:00
|
|
|
|
2010-11-12 05:30:38 +00:00
|
|
|
private:
|
|
|
|
GLPlatform();
|
2014-04-10 13:32:48 +00:00
|
|
|
friend void KWin::cleanupGL();
|
|
|
|
static void cleanup();
|
2010-11-12 05:30:38 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QByteArray m_renderer;
|
|
|
|
QByteArray m_vendor;
|
|
|
|
QByteArray m_version;
|
|
|
|
QByteArray m_glsl_version;
|
|
|
|
QByteArray m_chipset;
|
|
|
|
QSet<QByteArray> m_extensions;
|
|
|
|
Driver m_driver;
|
|
|
|
ChipClass m_chipClass;
|
2012-10-05 16:00:49 +00:00
|
|
|
CompositingType m_recommendedCompositor;
|
2010-11-12 05:30:38 +00:00
|
|
|
qint64 m_glVersion;
|
|
|
|
qint64 m_glslVersion;
|
|
|
|
qint64 m_mesaVersion;
|
|
|
|
qint64 m_driverVersion;
|
|
|
|
qint64 m_galliumVersion;
|
|
|
|
qint64 m_serverVersion;
|
|
|
|
qint64 m_kernelVersion;
|
2011-01-30 14:34:42 +00:00
|
|
|
bool m_looseBinding: 1;
|
|
|
|
bool m_supportsGLSL: 1;
|
|
|
|
bool m_limitedGLSL: 1;
|
|
|
|
bool m_textureNPOT: 1;
|
|
|
|
bool m_limitedNPOT: 1;
|
2012-10-13 08:33:38 +00:00
|
|
|
bool m_virtualMachine: 1;
|
2013-06-28 18:04:33 +00:00
|
|
|
bool m_preferBufferSubData: 1;
|
2014-04-22 07:27:05 +00:00
|
|
|
OpenGLPlatformInterface m_platformInterface;
|
2015-11-02 09:43:48 +00:00
|
|
|
bool m_gles: 1;
|
2010-11-12 05:30:38 +00:00
|
|
|
static GLPlatform *s_platform;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline GLPlatform *GLPlatform::instance()
|
|
|
|
{
|
|
|
|
if (!s_platform)
|
|
|
|
s_platform = new GLPlatform;
|
|
|
|
|
|
|
|
return s_platform;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace KWin
|
|
|
|
|
|
|
|
#endif // KWIN_GLPLATFORM_H
|
|
|
|
|