opengl: Drop unnecessary 16 bit texture support checks
16 bit textures are supported universally in OpenGL.
This commit is contained in:
parent
f3406a033c
commit
315fff68e9
1 changed files with 2 additions and 4 deletions
|
@ -161,8 +161,7 @@ void GLTexture::update(const QImage &image, const QRegion ®ion, const QPoint
|
||||||
if (!context->isOpenGLES()) {
|
if (!context->isOpenGLES()) {
|
||||||
const QImage::Format index = image.format();
|
const QImage::Format index = image.format();
|
||||||
|
|
||||||
if (index < sizeof(formatTable) / sizeof(formatTable[0]) && formatTable[index].internalFormat
|
if (index < sizeof(formatTable) / sizeof(formatTable[0]) && formatTable[index].internalFormat) {
|
||||||
&& !(formatTable[index].type == GL_UNSIGNED_SHORT && !context->supports16BitTextures())) {
|
|
||||||
glFormat = formatTable[index].format;
|
glFormat = formatTable[index].format;
|
||||||
type = formatTable[index].type;
|
type = formatTable[index].type;
|
||||||
uploadFormat = index;
|
uploadFormat = index;
|
||||||
|
@ -555,8 +554,7 @@ std::unique_ptr<GLTexture> GLTexture::upload(const QImage &image)
|
||||||
QImage::Format uploadFormat;
|
QImage::Format uploadFormat;
|
||||||
if (!context->isOpenGLES()) {
|
if (!context->isOpenGLES()) {
|
||||||
const QImage::Format index = image.format();
|
const QImage::Format index = image.format();
|
||||||
if (index < sizeof(formatTable) / sizeof(formatTable[0]) && formatTable[index].internalFormat
|
if (index < sizeof(formatTable) / sizeof(formatTable[0]) && formatTable[index].internalFormat) {
|
||||||
&& !(formatTable[index].type == GL_UNSIGNED_SHORT && !context->supports16BitTextures())) {
|
|
||||||
internalFormat = formatTable[index].internalFormat;
|
internalFormat = formatTable[index].internalFormat;
|
||||||
format = formatTable[index].format;
|
format = formatTable[index].format;
|
||||||
type = formatTable[index].type;
|
type = formatTable[index].type;
|
||||||
|
|
Loading…
Reference in a new issue