Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
d747e301
Unverified
Commit
d747e301
authored
Jan 23, 2019
by
Rémi Verschelde
Committed by
GitHub
Jan 23, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25242 from BastiaanOlij/fix_ios_issues
Fix errors on iOS
parents
a0581cca
cab45f2f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
rasterizer_scene_gles3.cpp
drivers/gles3/rasterizer_scene_gles3.cpp
+2
-2
rasterizer_storage_gles3.cpp
drivers/gles3/rasterizer_storage_gles3.cpp
+10
-0
No files found.
drivers/gles3/rasterizer_scene_gles3.cpp
View file @
d747e301
...
@@ -3114,7 +3114,7 @@ void RasterizerSceneGLES3::_copy_screen(bool p_invalidate_color, bool p_invalida
...
@@ -3114,7 +3114,7 @@ void RasterizerSceneGLES3::_copy_screen(bool p_invalidate_color, bool p_invalida
GLenum
attachments
[
2
]
=
{
GLenum
attachments
[
2
]
=
{
GL_COLOR_ATTACHMENT0
,
GL_COLOR_ATTACHMENT0
,
GL_DEPTH_
STENCIL_
ATTACHMENT
GL_DEPTH_ATTACHMENT
};
};
glInvalidateFramebuffer
(
GL_FRAMEBUFFER
,
p_invalidate_depth
?
2
:
1
,
attachments
);
glInvalidateFramebuffer
(
GL_FRAMEBUFFER
,
p_invalidate_depth
?
2
:
1
,
attachments
);
...
@@ -4164,7 +4164,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
...
@@ -4164,7 +4164,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glBindFramebuffer
(
GL_READ_FRAMEBUFFER
,
storage
->
frame
.
current_rt
->
buffers
.
fbo
);
glBindFramebuffer
(
GL_READ_FRAMEBUFFER
,
storage
->
frame
.
current_rt
->
buffers
.
fbo
);
glReadBuffer
(
GL_COLOR_ATTACHMENT0
);
glReadBuffer
(
GL_COLOR_ATTACHMENT0
);
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
storage
->
frame
.
current_rt
->
fbo
);
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
storage
->
frame
.
current_rt
->
fbo
);
glBlitFramebuffer
(
0
,
0
,
storage
->
frame
.
current_rt
->
width
,
storage
->
frame
.
current_rt
->
height
,
0
,
0
,
storage
->
frame
.
current_rt
->
width
,
storage
->
frame
.
current_rt
->
height
,
GL_
DEPTH
_BUFFER_BIT
,
GL_NEAREST
);
glBlitFramebuffer
(
0
,
0
,
storage
->
frame
.
current_rt
->
width
,
storage
->
frame
.
current_rt
->
height
,
0
,
0
,
storage
->
frame
.
current_rt
->
width
,
storage
->
frame
.
current_rt
->
height
,
GL_
COLOR
_BUFFER_BIT
,
GL_NEAREST
);
glBindFramebuffer
(
GL_READ_FRAMEBUFFER
,
0
);
glBindFramebuffer
(
GL_READ_FRAMEBUFFER
,
0
);
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
0
);
glBindFramebuffer
(
GL_DRAW_FRAMEBUFFER
,
0
);
//bind depth for read
//bind depth for read
...
...
drivers/gles3/rasterizer_storage_gles3.cpp
View file @
d747e301
...
@@ -6931,7 +6931,12 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
...
@@ -6931,7 +6931,12 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glGenTextures
(
1
,
&
rt
->
exposure
.
color
);
glGenTextures
(
1
,
&
rt
->
exposure
.
color
);
glBindTexture
(
GL_TEXTURE_2D
,
rt
->
exposure
.
color
);
glBindTexture
(
GL_TEXTURE_2D
,
rt
->
exposure
.
color
);
#ifdef IPHONE_ENABLED
///@TODO ugly hack to get around iOS not supporting 32bit single channel floating point textures...
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_R16F
,
1
,
1
,
0
,
GL_RED
,
GL_FLOAT
,
NULL
);
#else
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_R32F
,
1
,
1
,
0
,
GL_RED
,
GL_FLOAT
,
NULL
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_R32F
,
1
,
1
,
0
,
GL_RED
,
GL_FLOAT
,
NULL
);
#endif
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
rt
->
exposure
.
color
,
0
);
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
rt
->
exposure
.
color
,
0
);
status
=
glCheckFramebufferStatus
(
GL_FRAMEBUFFER
);
status
=
glCheckFramebufferStatus
(
GL_FRAMEBUFFER
);
...
@@ -7163,7 +7168,12 @@ RID RasterizerStorageGLES3::canvas_light_shadow_buffer_create(int p_width) {
...
@@ -7163,7 +7168,12 @@ RID RasterizerStorageGLES3::canvas_light_shadow_buffer_create(int p_width) {
if
(
config
.
use_rgba_2d_shadows
)
{
if
(
config
.
use_rgba_2d_shadows
)
{
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA8
,
cls
->
size
,
cls
->
height
,
0
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
NULL
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA8
,
cls
->
size
,
cls
->
height
,
0
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
NULL
);
}
else
{
}
else
{
#ifdef IPHONE_ENABLED
///@TODO ugly hack to get around iOS not supporting 32bit single channel floating point textures...
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_R16F
,
cls
->
size
,
cls
->
height
,
0
,
GL_RED
,
GL_FLOAT
,
NULL
);
#else
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_R32F
,
cls
->
size
,
cls
->
height
,
0
,
GL_RED
,
GL_FLOAT
,
NULL
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_R32F
,
cls
->
size
,
cls
->
height
,
0
,
GL_RED
,
GL_FLOAT
,
NULL
);
#endif
}
}
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
...
...
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