return 0;
if (m_dirtyProgram) {
- const bool isES = QOpenGLContext::currentContext()->isES();
+ const bool isES = QOpenGLContext::currentContext()->isOpenGLES();
QQuickShaderEffectMaterial *material = static_cast<QQuickShaderEffectMaterial *>(rootNode->material());
Q_ASSERT(material);
QQuickShaderEffectNode* QQuickCustomParticle::buildCustomNodes()
{
- if (QOpenGLContext::currentContext()->isES() && m_count * 4 > 0xffff) {
+ if (QOpenGLContext::currentContext()->isOpenGLES() && m_count * 4 > 0xffff) {
printf("CustomParticle: Too many particles... \n");
return 0;
}
TabledMaterial()
{
QSGShaderSourceBuilder builder;
- const bool isES = QOpenGLContext::currentContext()->isES();
+ const bool isES = QOpenGLContext::currentContext()->isOpenGLES();
builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert"));
builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES));
DeformableMaterial()
{
QSGShaderSourceBuilder builder;
- const bool isES = QOpenGLContext::currentContext()->isES();
+ const bool isES = QOpenGLContext::currentContext()->isOpenGLES();
builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert"));
builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES));
SpriteMaterial()
{
QSGShaderSourceBuilder builder;
- const bool isES = QOpenGLContext::currentContext()->isES();
+ const bool isES = QOpenGLContext::currentContext()->isOpenGLES();
builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert"));
builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES));
ColoredMaterial()
{
QSGShaderSourceBuilder builder;
- const bool isES = QOpenGLContext::currentContext()->isES();
+ const bool isES = QOpenGLContext::currentContext()->isOpenGLES();
builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert"));
builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES));
SimpleMaterial()
{
QSGShaderSourceBuilder builder;
- const bool isES = QOpenGLContext::currentContext()->isES();
+ const bool isES = QOpenGLContext::currentContext()->isOpenGLES();
builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert"));
builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES));
void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node)
{
- if (QOpenGLContext::currentContext()->isES() && m_count * 4 > 0xffff) {
+ if (QOpenGLContext::currentContext()->isOpenGLES() && m_count * 4 > 0xffff) {
printf("ImageParticle: Too many particles - maximum 16,000 per ImageParticle.\n");//ES 2 vertex count limit is ushort
return;
}
texture->setSize(referencedItem->boundingRect().size().toSize());
texture->setRecursive(true);
#ifndef QT_OPENGL_ES
- if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL)
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL)
texture->setFormat(GL_RGBA8);
else
texture->setFormat(GL_RGBA);
if (g->drawingMode() == GL_LINE_STRIP || g->drawingMode() == GL_LINE_LOOP || g->drawingMode() == GL_LINES)
glLineWidth(g->lineWidth());
#if !defined(QT_OPENGL_ES_2)
- else if (!QOpenGLContext::currentContext()->isES() && g->drawingMode() == GL_POINTS)
+ else if (!QOpenGLContext::currentContext()->isOpenGLES() && g->drawingMode() == GL_POINTS)
glPointSize(g->lineWidth());
#endif
if (!d->distanceFieldAntialiasingDecided) {
d->distanceFieldAntialiasingDecided = true;
#ifndef Q_OS_WIN
- if (renderContext->openglContext()->isES())
+ if (renderContext->openglContext()->isOpenGLES())
d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
#endif
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLContext::currentContext()->isES())
+ if (!QOpenGLContext::currentContext()->isOpenGLES())
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
#if !defined(QT_OPENGL_ES_2)
- if (!ctx->isES())
+ if (!ctx->isOpenGLES())
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
#endif
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, oldWidth, oldHeight, 0,
QOpenGLContext *ctx = QOpenGLContext::currentContext();
#ifndef QT_OPENGL_ES_2
- if (ctx->isES())
+ if (ctx->isOpenGLES())
#endif
{
bool npotSupported = ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextureRepeat);
if (QOpenGLContextPrivate::globalShareContext())
gl->setShareContext(QOpenGLContextPrivate::globalShareContext());
if (!gl->create()) {
- const bool isEs = gl->isES();
+ const bool isEs = gl->isOpenGLES();
delete gl;
gl = 0;
handleContextCreationFailure(window, isEs);
w->thread->gl->setShareContext(QOpenGLContextPrivate::globalShareContext());
w->thread->gl->setFormat(w->window->requestedFormat());
if (!w->thread->gl->create()) {
- const bool isEs = w->thread->gl->isES();
+ const bool isEs = w->thread->gl->isOpenGLES();
delete w->thread->gl;
w->thread->gl = 0;
handleContextCreationFailure(w->window, isEs);
m_gl->setShareContext(QOpenGLContextPrivate::globalShareContext());
bool created = m_gl->create();
if (!created) {
- const bool isEs = m_gl->isES();
+ const bool isEs = m_gl->isOpenGLES();
delete m_gl;
m_gl = 0;
handleContextCreationFailure(window, isEs);
m_externalFormat = GL_BGRA;
#ifndef QT_OPENGL_ES
- if (QOpenGLContext::currentContext()->isES()) {
+ if (QOpenGLContext::currentContext()->isOpenGLES()) {
#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLContext::currentContext()->isES())
+ if (!QOpenGLContext::currentContext()->isOpenGLES())
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
#endif
glTexImage2D(GL_TEXTURE_2D, 0, m_internalFormat, m_size.width(), m_size.height(), 0, m_externalFormat, GL_UNSIGNED_BYTE, 0);
m_functions.glGenRenderbuffers(1, &m_depthBuffer);
m_functions.glBindRenderbuffer(GL_RENDERBUFFER, m_depthBuffer);
GLenum internalFormat = GL_DEPTH_COMPONENT;
- if (context->isES())
+ if (context->isOpenGLES())
internalFormat = m_functions.hasOpenGLExtension(QOpenGLExtensions::Depth24)
? GL_DEPTH_COMPONENT24_OES : GL_DEPTH_COMPONENT16;
if (format.samples && m_functions.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
#ifdef QT_OPENGL_ES
const GLenum internalFormat = GL_STENCIL_INDEX8;
#else
- const GLenum internalFormat = context->isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
+ const GLenum internalFormat = context->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
#endif
if (format.samples && m_functions.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
m_functions.glRenderbufferStorageMultisample(GL_RENDERBUFFER, format.samples,
#ifdef QT_OPENGL_ES
internalFormat = GL_BGRA;
#else
- if (context->isES())
+ if (context->isOpenGLES())
internalFormat = GL_BGRA;
#endif // QT_OPENGL_ES
} else if (!wrongfullyReportsBgra8888Support
if (QOpenGLContextPrivate::globalShareContext())
context->setShareContext(QOpenGLContextPrivate::globalShareContext());
if (!context->create()) {
- const bool isEs = context->isES();
+ const bool isEs = context->isOpenGLES();
delete context;
context = 0;
handleContextCreationFailure(offscreenWindow->requestedFormat(), isEs);
void tst_qquickitem::mouseGrab()
{
#ifdef Q_OS_WIN
- if (QOpenGLContext::openGLModuleType() == QOpenGLContext::GLES2)
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
QSKIP("Fails in the CI for ANGLE builds on Windows, QTBUG-32664");
#endif
QQuickWindow window;