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
f1d0c391
Commit
f1d0c391
authored
Jan 15, 2020
by
clayjohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix light related crashes
parent
40f0649e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
rasterizer_scene_gles2.cpp
drivers/gles2/rasterizer_scene_gles2.cpp
+1
-1
rasterizer_scene_gles3.cpp
drivers/gles3/rasterizer_scene_gles3.cpp
+2
-2
No files found.
drivers/gles2/rasterizer_scene_gles2.cpp
View file @
f1d0c391
...
@@ -1169,7 +1169,7 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G
...
@@ -1169,7 +1169,7 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G
LightInstance
*
li
=
light_instance_owner
.
getornull
(
e
->
instance
->
light_instances
[
i
]);
LightInstance
*
li
=
light_instance_owner
.
getornull
(
e
->
instance
->
light_instances
[
i
]);
if
(
li
->
light_index
>=
render_light_instance_count
||
render_light_instances
[
li
->
light_index
]
!=
li
)
{
if
(
!
li
||
li
->
light_index
>=
render_light_instance_count
||
render_light_instances
[
li
->
light_index
]
!=
li
)
{
continue
;
// too many or light_index did not correspond to the light instances to be rendered
continue
;
// too many or light_index did not correspond to the light instances to be rendered
}
}
...
...
drivers/gles3/rasterizer_scene_gles3.cpp
View file @
f1d0c391
...
@@ -1887,8 +1887,8 @@ void RasterizerSceneGLES3::_setup_light(RenderList::Element *e, const Transform
...
@@ -1887,8 +1887,8 @@ void RasterizerSceneGLES3::_setup_light(RenderList::Element *e, const Transform
const
RID
*
lights
=
e
->
instance
->
light_instances
.
ptr
();
const
RID
*
lights
=
e
->
instance
->
light_instances
.
ptr
();
for
(
int
i
=
0
;
i
<
lc
;
i
++
)
{
for
(
int
i
=
0
;
i
<
lc
;
i
++
)
{
LightInstance
*
li
=
light_instance_owner
.
get
ptr
(
lights
[
i
]);
LightInstance
*
li
=
light_instance_owner
.
get
ornull
(
lights
[
i
]);
if
(
li
->
last_pass
!=
render_pass
)
//not visible
if
(
!
li
||
li
->
last_pass
!=
render_pass
)
//not visible
continue
;
continue
;
if
(
li
&&
li
->
light_ptr
->
type
==
VS
::
LIGHT_OMNI
)
{
if
(
li
&&
li
->
light_ptr
->
type
==
VS
::
LIGHT_OMNI
)
{
...
...
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