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
15934d52
Commit
15934d52
authored
Aug 19, 2013
by
Shannon Woods
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds API-level functionality for indexed query functions
TRAC #23468 Author: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens
parent
1b2fb853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
4 deletions
+95
-4
libGLESv2.cpp
src/libGLESv2/libGLESv2.cpp
+95
-4
No files found.
src/libGLESv2/libGLESv2.cpp
View file @
15934d52
...
@@ -7376,8 +7376,55 @@ void __stdcall glGetIntegeri_v(GLenum target, GLuint index, GLint* data)
...
@@ -7376,8 +7376,55 @@ void __stdcall glGetIntegeri_v(GLenum target, GLuint index, GLint* data)
return
gl
::
error
(
GL_INVALID_OPERATION
);
return
gl
::
error
(
GL_INVALID_OPERATION
);
}
}
// glGetIntegeri_v
switch
(
target
)
UNIMPLEMENTED
();
{
case
GL_TRANSFORM_FEEDBACK_BUFFER_START
:
case
GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
:
case
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
:
if
(
index
>=
context
->
getMaxTransformFeedbackBufferBindings
())
return
gl
::
error
(
GL_INVALID_VALUE
);
break
;
case
GL_UNIFORM_BUFFER_START
:
case
GL_UNIFORM_BUFFER_SIZE
:
case
GL_UNIFORM_BUFFER_BINDING
:
if
(
index
>=
context
->
getMaximumCombinedUniformBufferBindings
())
return
gl
::
error
(
GL_INVALID_VALUE
);
break
;
default
:
return
gl
::
error
(
GL_INVALID_ENUM
);
}
if
(
!
(
context
->
getIndexedIntegerv
(
target
,
index
,
data
)))
{
GLenum
nativeType
;
unsigned
int
numParams
=
0
;
if
(
!
context
->
getIndexedQueryParameterInfo
(
target
,
&
nativeType
,
&
numParams
))
return
gl
::
error
(
GL_INVALID_ENUM
);
if
(
numParams
==
0
)
return
;
// it is known that pname is valid, but there are no parameters to return
if
(
nativeType
==
GL_INT_64_ANGLEX
)
{
GLint64
minIntValue
=
static_cast
<
GLint64
>
(
std
::
numeric_limits
<
int
>::
min
());
GLint64
maxIntValue
=
static_cast
<
GLint64
>
(
std
::
numeric_limits
<
int
>::
max
());
GLint64
*
int64Params
=
new
GLint64
[
numParams
];
context
->
getIndexedInteger64v
(
target
,
index
,
int64Params
);
for
(
unsigned
int
i
=
0
;
i
<
numParams
;
++
i
)
{
GLint64
clampedValue
=
std
::
max
(
std
::
min
(
int64Params
[
i
],
maxIntValue
),
minIntValue
);
data
[
i
]
=
static_cast
<
GLint
>
(
clampedValue
);
}
delete
[]
int64Params
;
}
else
{
UNREACHABLE
();
}
}
}
}
}
}
catch
(
std
::
bad_alloc
&
)
catch
(
std
::
bad_alloc
&
)
...
@@ -9133,8 +9180,52 @@ void __stdcall glGetInteger64i_v(GLenum target, GLuint index, GLint64* data)
...
@@ -9133,8 +9180,52 @@ void __stdcall glGetInteger64i_v(GLenum target, GLuint index, GLint64* data)
return
gl
::
error
(
GL_INVALID_OPERATION
);
return
gl
::
error
(
GL_INVALID_OPERATION
);
}
}
// glGetInteger64i_v
switch
(
target
)
UNIMPLEMENTED
();
{
case
GL_TRANSFORM_FEEDBACK_BUFFER_START
:
case
GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
:
case
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
:
if
(
index
>=
context
->
getMaxTransformFeedbackBufferBindings
())
return
gl
::
error
(
GL_INVALID_VALUE
);
break
;
case
GL_UNIFORM_BUFFER_START
:
case
GL_UNIFORM_BUFFER_SIZE
:
case
GL_UNIFORM_BUFFER_BINDING
:
if
(
index
>=
context
->
getMaximumCombinedUniformBufferBindings
())
return
gl
::
error
(
GL_INVALID_VALUE
);
break
;
default
:
return
gl
::
error
(
GL_INVALID_ENUM
);
}
if
(
!
(
context
->
getIndexedInteger64v
(
target
,
index
,
data
)))
{
GLenum
nativeType
;
unsigned
int
numParams
=
0
;
if
(
!
context
->
getIndexedQueryParameterInfo
(
target
,
&
nativeType
,
&
numParams
))
return
gl
::
error
(
GL_INVALID_ENUM
);
if
(
numParams
==
0
)
return
;
// it is known that pname is valid, but there are no parameters to return
if
(
nativeType
==
GL_INT
)
{
GLint
*
intParams
=
new
GLint
[
numParams
];
context
->
getIndexedIntegerv
(
target
,
index
,
intParams
);
for
(
unsigned
int
i
=
0
;
i
<
numParams
;
++
i
)
{
data
[
i
]
=
static_cast
<
GLint64
>
(
intParams
[
i
]);
}
delete
[]
intParams
;
}
else
{
UNREACHABLE
();
}
}
}
}
}
}
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