2 * Copyright (c) 2012 Marek Olšák <maraeo@gmail.com>
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS AND/OR THEIR SUPPLIERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 #include "piglit-util-gl.h"
27 PIGLIT_GL_TEST_CONFIG_BEGIN
29 config
.supports_gl_compat_version
= 10;
31 config
.window_visual
= PIGLIT_GL_VISUAL_RGBA
| PIGLIT_GL_VISUAL_DOUBLE
;
33 PIGLIT_GL_TEST_CONFIG_END
35 static const char *vstext
=
38 " gl_Position = ftransform(); \n"
39 " gl_FrontColor = vec4(1.0); \n"
40 " gl_PointSize = 0.001; \n"
44 static GLuint vs
, prog
;
50 float black
[] = {0, 0, 0};
52 glClear(GL_COLOR_BUFFER_BIT
);
54 glEnable(GL_VERTEX_PROGRAM_POINT_SIZE
);
62 pass
= !piglit_probe_rect_rgb_silent(49, 19, 3, 3, black
);
64 puts("Fail: nothing rendered.");
66 piglit_present_results();
68 return pass
? PIGLIT_PASS
: PIGLIT_FAIL
;
72 piglit_init(int argc
, char **argv
)
74 piglit_require_gl_version(20);
75 vs
= piglit_compile_shader_text(GL_VERTEX_SHADER
, vstext
);
77 prog
= piglit_link_simple_program(vs
, 0);
79 piglit_ortho_projection(piglit_width
, piglit_height
, GL_FALSE
);