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
f3cb236f
Commit
f3cb236f
authored
Dec 20, 2018
by
Juan Linietsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove usage of VAO, which does not work in GLES2
parent
25b98e48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
rasterizer_canvas_gles2.cpp
drivers/gles2/rasterizer_canvas_gles2.cpp
+7
-2
rasterizer_storage_gles2.cpp
drivers/gles2/rasterizer_storage_gles2.cpp
+0
-9
rasterizer_storage_gles2.h
drivers/gles2/rasterizer_storage_gles2.h
+0
-1
No files found.
drivers/gles2/rasterizer_canvas_gles2.cpp
View file @
f3cb236f
...
...
@@ -1368,14 +1368,19 @@ void RasterizerCanvasGLES2::canvas_light_shadow_buffer_update(RID p_buffer, cons
}
}
glBindVertexArray
(
cc
->
array_id
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
cc
->
vertex_id
);
glEnableVertexAttribArray
(
VS
::
ARRAY_VERTEX
);
glVertexAttribPointer
(
VS
::
ARRAY_VERTEX
,
3
,
GL_FLOAT
,
false
,
0
,
0
);
glBindBuffer
(
GL_ELEMENT_ARRAY_BUFFER
,
cc
->
index_id
);
glDrawElements
(
GL_TRIANGLES
,
cc
->
len
*
3
,
GL_UNSIGNED_SHORT
,
0
);
instance
=
instance
->
next
;
}
}
glBindVertexArray
(
0
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
glBindBuffer
(
GL_ELEMENT_ARRAY_BUFFER
,
0
);
}
void
RasterizerCanvasGLES2
::
reset_canvas
()
{
...
...
drivers/gles2/rasterizer_storage_gles2.cpp
View file @
f3cb236f
...
...
@@ -4247,7 +4247,6 @@ RID RasterizerStorageGLES2::canvas_light_occluder_create() {
co
->
index_id
=
0
;
co
->
vertex_id
=
0
;
co
->
len
=
0
;
glGenVertexArrays
(
1
,
&
co
->
array_id
);
return
canvas_occluder_owner
.
make_rid
(
co
);
}
...
...
@@ -4342,12 +4341,6 @@ void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder,
glBindBuffer
(
GL_ELEMENT_ARRAY_BUFFER
,
0
);
//unbind
co
->
len
=
lc
;
glBindVertexArray
(
co
->
array_id
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
co
->
vertex_id
);
glEnableVertexAttribArray
(
VS
::
ARRAY_VERTEX
);
glVertexAttribPointer
(
VS
::
ARRAY_VERTEX
,
3
,
GL_FLOAT
,
false
,
0
,
0
);
glBindBuffer
(
GL_ELEMENT_ARRAY_BUFFER
,
co
->
index_id
);
glBindVertexArray
(
0
);
}
}
...
...
@@ -4570,8 +4563,6 @@ bool RasterizerStorageGLES2::free(RID p_rid) {
if
(
co
->
vertex_id
)
glDeleteBuffers
(
1
,
&
co
->
vertex_id
);
glDeleteVertexArrays
(
1
,
&
co
->
array_id
);
canvas_occluder_owner
.
free
(
p_rid
);
memdelete
(
co
);
...
...
drivers/gles2/rasterizer_storage_gles2.h
View file @
f3cb236f
...
...
@@ -1179,7 +1179,6 @@ public:
struct
CanvasOccluder
:
public
RID_Data
{
GLuint
array_id
;
// 0 means, unconfigured
GLuint
vertex_id
;
// 0 means, unconfigured
GLuint
index_id
;
// 0 means, unconfigured
PoolVector
<
Vector2
>
lines
;
...
...
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