Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laszlo Agocs
qtrhi
Commits
4c2cc893
Commit
4c2cc893
authored
Mar 01, 2019
by
Laszlo Agocs
Browse files
gl: Fix wrong extension check for R8
parent
a1ad846c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/rhi/qrhigles2.cpp
View file @
4c2cc893
...
...
@@ -326,8 +326,8 @@ bool QRhiGles2::create(QRhi::Flags flags)
caps
.
bgraExternalFormat
=
f
->
hasOpenGLExtension
(
QOpenGLExtensions
::
BGRATextureFormat
);
caps
.
bgraInternalFormat
=
caps
.
bgraExternalFormat
&&
actualFormat
.
renderableType
()
==
QSurfaceFormat
::
OpenGLES
;
caps
.
sized
8Format
s
=
f
->
hasOpenGL
Extension
(
QOpenGLExtensions
::
Sized8
Formats
);
caps
.
sized
16Format
s
=
f
->
hasOpenGLExtension
(
QOpenGLExtensions
::
Sized16Formats
);
caps
.
r
8Format
=
f
->
hasOpenGL
Feature
(
QOpenGLFunctions
::
TextureRG
Formats
);
caps
.
r
16Format
=
f
->
hasOpenGLExtension
(
QOpenGLExtensions
::
Sized16Formats
);
nativeHandlesStruct
.
context
=
ctx
;
...
...
@@ -537,10 +537,10 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
return
caps
.
bgraExternalFormat
;
case
QRhiTexture
::
R8
:
return
caps
.
sized
8Format
s
;
return
caps
.
r
8Format
;
case
QRhiTexture
::
R16
:
return
caps
.
sized
16Format
s
;
return
caps
.
r
16Format
;
default:
break
;
...
...
src/rhi/qrhigles2_p.h
View file @
4c2cc893
...
...
@@ -567,8 +567,8 @@ public:
fixedIndexPrimitiveRestart
(
false
),
bgraExternalFormat
(
false
),
bgraInternalFormat
(
false
),
sized
8Format
s
(
false
),
sized
16Format
s
(
false
)
r
8Format
(
false
),
r
16Format
(
false
)
{
}
int
maxTextureSize
;
// Multisample fb and blit are supported (GLES 3.0 or OpenGL 3.x). Not
...
...
@@ -579,8 +579,8 @@ public:
uint
fixedIndexPrimitiveRestart
:
1
;
uint
bgraExternalFormat
:
1
;
uint
bgraInternalFormat
:
1
;
uint
sized
8Format
s
:
1
;
uint
sized
16Format
s
:
1
;
uint
r
8Format
:
1
;
uint
r
16Format
:
1
;
}
caps
;
bool
inFrame
=
false
;
bool
inPass
=
false
;
...
...
Write
Preview
Supports
Markdown
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