Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtrhi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Laszlo Agocs
qtrhi
Commits
e1fc4c1a
Commit
e1fc4c1a
authored
Feb 28, 2019
by
Laszlo Agocs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gl: return real values from texture format supported query
the non-rgba8 formats are a todo for now
parent
fff98e9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
src/rhi/qrhigles2.cpp
src/rhi/qrhigles2.cpp
+20
-1
No files found.
src/rhi/qrhigles2.cpp
View file @
e1fc4c1a
...
...
@@ -505,6 +505,23 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
if
(
isCompressedFormat
(
format
))
return
supportedCompressedFormats
.
contains
(
toGlCompressedTextureFormat
(
format
,
flags
));
switch
(
format
)
{
case
QRhiTexture
::
D16
:
Q_FALLTHROUGH
();
case
QRhiTexture
::
D32
:
return
false
;
case
QRhiTexture
::
BGRA8
:
Q_FALLTHROUGH
();
case
QRhiTexture
::
R8
:
Q_FALLTHROUGH
();
case
QRhiTexture
::
R16
:
return
false
;
// ###
default:
break
;
}
return
true
;
}
...
...
@@ -2103,10 +2120,12 @@ bool QGles2Texture::prepareBuild(QSize *adjustedSize)
const
bool
hasMipMaps
=
m_flags
.
testFlag
(
MipMapped
);
const
bool
isCompressed
=
rhiD
->
isCompressedFormat
(
m_format
);
// ### more formats
target
=
isCube
?
GL_TEXTURE_CUBE_MAP
:
GL_TEXTURE_2D
;
// ### more formats
glintformat
=
GL_RGBA
;
glformat
=
GL_RGBA
;
gltype
=
GL_UNSIGNED_BYTE
;
mipLevelCount
=
hasMipMaps
?
rhiD
->
q
->
mipLevelsForSize
(
size
)
:
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment