Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
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
Chen Yisong
angle
Commits
d1028548
Commit
d1028548
authored
Jul 02, 2013
by
Jamie Madill
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable the new Vertex Array Object entry points.
TRAC #23392 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Authored-by: Jamie Madill
parent
a7d05865
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
8 deletions
+42
-8
Context.cpp
src/libGLESv2/Context.cpp
+3
-0
libGLESv2.cpp
src/libGLESv2/libGLESv2.cpp
+39
-8
No files found.
src/libGLESv2/Context.cpp
View file @
d1028548
...
@@ -776,6 +776,9 @@ GLuint Context::createVertexArray()
...
@@ -776,6 +776,9 @@ GLuint Context::createVertexArray()
{
{
GLuint
handle
=
mVertexArrayHandleAllocator
.
allocate
();
GLuint
handle
=
mVertexArrayHandleAllocator
.
allocate
();
// Although the spec states VAO state is not initialized until the object is bound,
// we create it immediately. The resulting behaviour is transparent to the application,
// since it's not currently possible to access the state until the object is bound.
mVertexArrayMap
[
handle
]
=
new
VertexArray
(
mRenderer
,
handle
);
mVertexArrayMap
[
handle
]
=
new
VertexArray
(
mRenderer
,
handle
);
return
handle
;
return
handle
;
...
...
src/libGLESv2/libGLESv2.cpp
View file @
d1028548
...
@@ -9186,8 +9186,16 @@ void __stdcall glBindVertexArray(GLuint array)
...
@@ -9186,8 +9186,16 @@ void __stdcall glBindVertexArray(GLuint array)
return
gl
::
error
(
GL_INVALID_OPERATION
);
return
gl
::
error
(
GL_INVALID_OPERATION
);
}
}
// glBindVertexArray
gl
::
VertexArray
*
vao
=
context
->
getVertexArray
(
array
);
UNIMPLEMENTED
();
if
(
!
vao
)
{
// The default VAO should always exist
ASSERT
(
array
!=
0
);
return
gl
::
error
(
GL_INVALID_OPERATION
);
}
context
->
bindVertexArray
(
array
);
}
}
}
}
catch
(
std
::
bad_alloc
&
)
catch
(
std
::
bad_alloc
&
)
...
@@ -9211,8 +9219,18 @@ void __stdcall glDeleteVertexArrays(GLsizei n, const GLuint* arrays)
...
@@ -9211,8 +9219,18 @@ void __stdcall glDeleteVertexArrays(GLsizei n, const GLuint* arrays)
return
gl
::
error
(
GL_INVALID_OPERATION
);
return
gl
::
error
(
GL_INVALID_OPERATION
);
}
}
// glDeleteVertexArrays
if
(
n
<
0
)
UNIMPLEMENTED
();
{
return
gl
::
error
(
GL_INVALID_VALUE
);
}
for
(
int
arrayIndex
=
0
;
arrayIndex
<
n
;
arrayIndex
++
)
{
if
(
arrays
[
arrayIndex
]
!=
0
)
{
context
->
deleteVertexArray
(
arrays
[
arrayIndex
]);
}
}
}
}
}
}
catch
(
std
::
bad_alloc
&
)
catch
(
std
::
bad_alloc
&
)
...
@@ -9236,8 +9254,15 @@ void __stdcall glGenVertexArrays(GLsizei n, GLuint* arrays)
...
@@ -9236,8 +9254,15 @@ void __stdcall glGenVertexArrays(GLsizei n, GLuint* arrays)
return
gl
::
error
(
GL_INVALID_OPERATION
);
return
gl
::
error
(
GL_INVALID_OPERATION
);
}
}
// glGenVertexArrays
if
(
n
<
0
)
UNIMPLEMENTED
();
{
return
gl
::
error
(
GL_INVALID_VALUE
);
}
for
(
int
arrayIndex
=
0
;
arrayIndex
<
n
;
arrayIndex
++
)
{
arrays
[
arrayIndex
]
=
context
->
createVertexArray
();
}
}
}
}
}
catch
(
std
::
bad_alloc
&
)
catch
(
std
::
bad_alloc
&
)
...
@@ -9261,8 +9286,14 @@ GLboolean __stdcall glIsVertexArray(GLuint array)
...
@@ -9261,8 +9286,14 @@ GLboolean __stdcall glIsVertexArray(GLuint array)
return
gl
::
error
(
GL_INVALID_OPERATION
,
GL_FALSE
);
return
gl
::
error
(
GL_INVALID_OPERATION
,
GL_FALSE
);
}
}
// glIsVertexArray
if
(
array
==
0
)
UNIMPLEMENTED
();
{
return
GL_FALSE
;
}
gl
::
VertexArray
*
vao
=
context
->
getVertexArray
(
array
);
return
(
vao
!=
NULL
?
GL_TRUE
:
GL_FALSE
);
}
}
}
}
catch
(
std
::
bad_alloc
&
)
catch
(
std
::
bad_alloc
&
)
...
...
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