summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexture.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-28 17:03:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-04 15:59:05 +0100
commit4b2f35d04ca3c2e037b4d0edd8b2350051cc572c (patch)
treeb6cf33e9cba3e55b11be748fa37fd44b09021b54 /src/gui/opengl/qopengltexture.cpp
parentfe2ce05d23a52d27e50270d22eb9fff9ab091dd4 (diff)
Dynamic GL: remove exporting symbols
Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/opengl/qopengltexture.cpp')
-rw-r--r--src/gui/opengl/qopengltexture.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 8bdbdba6f76..901c564a8bf 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -2430,7 +2430,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
bool supported = false;
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!ctx->isES()) {
switch (feature) {
case ImmutableMultisampleStorage:
case TextureBuffer:
@@ -2487,7 +2487,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
}
}
- if (QOpenGLFunctions::isES())
+ if (ctx->isES())
#endif
{
switch (feature) {
@@ -2522,7 +2522,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
void QOpenGLTexture::setMipBaseLevel(int baseLevel)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->textureId);
@@ -2559,7 +2559,7 @@ int QOpenGLTexture::mipBaseLevel() const
void QOpenGLTexture::setMipMaxLevel(int maxLevel)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->textureId);
@@ -2596,7 +2596,7 @@ int QOpenGLTexture::mipMaxLevel() const
void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->textureId);
@@ -2706,7 +2706,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel)
void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value)
{
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2733,7 +2733,7 @@ void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
SwizzleValue b, SwizzleValue a)
{
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2782,7 +2782,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
{
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -2972,7 +2972,7 @@ QOpenGLTexture::WrapMode QOpenGLTexture::wrapMode(QOpenGLTexture::CoordinateDire
void QOpenGLTexture::setBorderColor(QColor color)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3000,7 +3000,7 @@ void QOpenGLTexture::setBorderColor(QColor color)
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3031,7 +3031,7 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3064,7 +3064,7 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3170,7 +3170,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const
void QOpenGLTexture::setMinimumLevelOfDetail(float value)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3207,7 +3207,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const
void QOpenGLTexture::setMaximumLevelOfDetail(float value)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3243,7 +3243,7 @@ float QOpenGLTexture::maximumLevelOfDetail() const
void QOpenGLTexture::setLevelOfDetailRange(float min, float max)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);
@@ -3282,7 +3282,7 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
void QOpenGLTexture::setLevelofDetailBias(float bias)
{
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_D(QOpenGLTexture);
d->create();
Q_ASSERT(d->texFuncs);