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
1b2fb853
Commit
1b2fb853
authored
Aug 19, 2013
by
Shannon Woods
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implements indexed query functionality
TRAC #23468 Author: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens
parent
5fe0caa1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
0 deletions
+91
-0
Context.cpp
src/libGLESv2/Context.cpp
+87
-0
Context.h
src/libGLESv2/Context.h
+4
-0
No files found.
src/libGLESv2/Context.cpp
View file @
1b2fb853
...
...
@@ -1934,6 +1934,64 @@ bool Context::getInteger64v(GLenum pname, GLint64 *params)
return
true
;
}
bool
Context
::
getIndexedIntegerv
(
GLenum
target
,
GLuint
index
,
GLint
*
data
)
{
switch
(
target
)
{
case
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
:
if
(
index
<
IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_BUFFERS
)
{
*
data
=
mState
.
transformFeedbackBuffers
[
index
].
id
();
}
break
;
case
GL_UNIFORM_BUFFER_BINDING
:
if
(
index
<
IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS
)
{
*
data
=
mState
.
uniformBuffers
[
index
].
id
();
}
break
;
default
:
return
false
;
}
return
true
;
}
bool
Context
::
getIndexedInteger64v
(
GLenum
target
,
GLuint
index
,
GLint64
*
data
)
{
switch
(
target
)
{
case
GL_TRANSFORM_FEEDBACK_BUFFER_START
:
if
(
index
<
IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_BUFFERS
)
{
*
data
=
mState
.
transformFeedbackBuffers
[
index
].
getOffset
();
}
break
;
case
GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
:
if
(
index
<
IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_BUFFERS
)
{
*
data
=
mState
.
transformFeedbackBuffers
[
index
].
getSize
();
}
break
;
case
GL_UNIFORM_BUFFER_START
:
if
(
index
<
IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS
)
{
*
data
=
mState
.
uniformBuffers
[
index
].
getOffset
();
}
break
;
case
GL_UNIFORM_BUFFER_SIZE
:
if
(
index
<
IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS
)
{
*
data
=
mState
.
uniformBuffers
[
index
].
getSize
();
}
break
;
default
:
return
false
;
}
return
true
;
}
bool
Context
::
getQueryParameterInfo
(
GLenum
pname
,
GLenum
*
type
,
unsigned
int
*
numParams
)
{
if
(
pname
>=
GL_DRAW_BUFFER0_EXT
&&
pname
<=
GL_DRAW_BUFFER15_EXT
)
...
...
@@ -2167,6 +2225,35 @@ bool Context::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *nu
return
false
;
}
bool
Context
::
getIndexedQueryParameterInfo
(
GLenum
target
,
GLenum
*
type
,
unsigned
int
*
numParams
)
{
if
(
mClientVersion
<
3
)
{
return
false
;
}
switch
(
target
)
{
case
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
:
case
GL_UNIFORM_BUFFER_BINDING
:
{
*
type
=
GL_INT
;
*
numParams
=
1
;
}
return
true
;
case
GL_TRANSFORM_FEEDBACK_BUFFER_START
:
case
GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
:
case
GL_UNIFORM_BUFFER_START
:
case
GL_UNIFORM_BUFFER_SIZE
:
{
*
type
=
GL_INT_64_ANGLEX
;
*
numParams
=
1
;
}
}
return
false
;
}
// Applies the render target surface, depth stencil surface, viewport rectangle and
// scissor rectangle to the renderer
bool
Context
::
applyRenderTarget
(
GLenum
drawMode
,
bool
ignoreViewport
)
...
...
src/libGLESv2/Context.h
View file @
1b2fb853
...
...
@@ -357,7 +357,11 @@ class Context
bool
getIntegerv
(
GLenum
pname
,
GLint
*
params
);
bool
getInteger64v
(
GLenum
pname
,
GLint64
*
params
);
bool
getIndexedIntegerv
(
GLenum
target
,
GLuint
index
,
GLint
*
data
);
bool
getIndexedInteger64v
(
GLenum
target
,
GLuint
index
,
GLint64
*
data
);
bool
getQueryParameterInfo
(
GLenum
pname
,
GLenum
*
type
,
unsigned
int
*
numParams
);
bool
getIndexedQueryParameterInfo
(
GLenum
target
,
GLenum
*
type
,
unsigned
int
*
numParams
);
void
readPixels
(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLenum
type
,
GLsizei
*
bufSize
,
void
*
pixels
);
void
clear
(
GLbitfield
mask
);
...
...
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