Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Mesa
piglit
Commits
18c673cb
Commit
18c673cb
authored
Oct 19, 2011
by
Paul Berry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a "frustum" command to shader_runner.
Reviewed-by:
Eric Anholt
<
eric@anholt.net
>
parent
f1769a4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
tests/shaders/shader_runner.c
tests/shaders/shader_runner.c
+4
-0
tests/util/piglit-util-gl.c
tests/util/piglit-util-gl.c
+19
-0
tests/util/piglit-util.h
tests/util/piglit-util.h
+2
-0
No files found.
tests/shaders/shader_runner.c
View file @
18c673cb
...
...
@@ -1009,6 +1009,10 @@ piglit_display(void)
do_enable_disable
(
line
+
7
,
false
);
}
else
if
(
string_match
(
"enable"
,
line
))
{
do_enable_disable
(
line
+
6
,
true
);
}
else
if
(
string_match
(
"frustum"
,
line
))
{
get_floats
(
line
+
7
,
c
,
6
);
piglit_frustum_projection
(
false
,
c
[
0
],
c
[
1
],
c
[
2
],
c
[
3
],
c
[
4
],
c
[
5
]);
}
else
if
(
sscanf
(
line
,
"ortho %f %f %f %f"
,
c
+
0
,
c
+
1
,
c
+
2
,
c
+
3
)
==
4
)
{
piglit_gen_ortho_projection
(
c
[
0
],
c
[
1
],
c
[
2
],
c
[
3
],
...
...
tests/util/piglit-util-gl.c
View file @
18c673cb
...
...
@@ -763,6 +763,25 @@ piglit_ortho_projection(int w, int h, GLboolean push)
piglit_gen_ortho_projection
(
0
,
w
,
0
,
h
,
-
1
,
1
,
push
);
}
/**
* Convenience function to configure frustum projection.
*/
void
piglit_frustum_projection
(
GLboolean
push
,
double
l
,
double
r
,
double
b
,
double
t
,
double
n
,
double
f
)
{
glMatrixMode
(
GL_PROJECTION
);
glLoadIdentity
();
if
(
push
)
glPushMatrix
();
glFrustum
(
l
,
r
,
b
,
t
,
n
,
f
);
glMatrixMode
(
GL_MODELVIEW
);
if
(
push
)
glPushMatrix
();
glLoadIdentity
();
}
/**
...
...
tests/util/piglit-util.h
View file @
18c673cb
...
...
@@ -182,6 +182,8 @@ void piglit_gen_ortho_projection(double left, double right, double bottom,
double
top
,
double
near_val
,
double
far_val
,
GLboolean
push
);
void
piglit_ortho_projection
(
int
w
,
int
h
,
GLboolean
push
);
void
piglit_frustum_projection
(
GLboolean
push
,
double
l
,
double
r
,
double
b
,
double
t
,
double
n
,
double
f
);
GLuint
piglit_checkerboard_texture
(
GLuint
tex
,
unsigned
level
,
unsigned
width
,
unsigned
height
,
...
...
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