Commit e144c21b authored by Eric Anholt's avatar Eric Anholt

Rename the piglit-framework symbols that were both underscored and camelcased.

parent c9eafa83
......@@ -35,12 +35,12 @@
#include "piglit-util.h"
#include "piglit-framework.h"
int piglit_WindowMode = GLUT_RGBA;
int piglit_Width = 16;
int piglit_Height = 16;
int piglit_window_mode = GLUT_RGBA;
int piglit_width = 16;
int piglit_height = 16;
int piglit_Display()
int piglit_display()
{
return PIGLIT_SUCCESS;
}
......@@ -51,7 +51,7 @@ static const char program_text[] =
"MOV result.position, vertex.position;\n"
"END";
void piglit_Init(int argc, char ** argv)
void piglit_init(int argc, char ** argv)
{
GLuint program_object;
GLint result;
......
......@@ -37,9 +37,9 @@
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_Height = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1);
......@@ -114,7 +114,7 @@ static GLint vert_prog;
int
piglit_Display(void)
piglit_display(void)
{
static const GLfloat color[4] = { 0.0, 1.0, 0.0, 0.0 };
int result = PIGLIT_SUCCESS;
......@@ -148,14 +148,14 @@ piglit_Display(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
(void) argc;
(void) argv;
piglit_require_vertex_program();
piglit_require_fragment_program();
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
progs[0] = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB,
cos_shader_source);
......
......@@ -37,9 +37,9 @@
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_Height = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1);
......@@ -136,7 +136,7 @@ static GLint vert_prog;
int
piglit_Display(void)
piglit_display(void)
{
static const GLfloat color[4] = { 0.0, 1.0, 0.0, 0.0 };
int result = PIGLIT_SUCCESS;
......@@ -170,7 +170,7 @@ piglit_Display(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
(void) argc;
(void) argv;
......@@ -178,7 +178,7 @@ piglit_Init(int argc, char **argv)
piglit_require_vertex_program();
piglit_require_fragment_program();
piglit_require_extension("GL_NV_fragment_program_option");
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
progs[0] = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB,
cos_shader_source);
......
......@@ -42,9 +42,9 @@
#define BOX_SIZE 16
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_Height = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_height = (((BOX_SIZE+1)*TEST_COLS)+1);
#define INVERT_MASK(x) (~(x) & 0x0f)
......@@ -183,7 +183,7 @@ generate_shader(unsigned cc, unsigned good_mask)
int
piglit_Display(void)
piglit_display(void)
{
static const GLfloat good_color[4] = { 0.9, 0.5, 0.7, 1.0 };
static const GLfloat junk_color[4] = { 0.2, 0.2, 0.2, 1.0 };
......@@ -218,7 +218,7 @@ piglit_Display(void)
if (!piglit_probe_pixel_rgb(x + (BOX_SIZE / 2),
y + (BOX_SIZE / 2),
good_color)) {
if (!piglit_Automatic)
if (!piglit_automatic)
printf("CC %s with mask %s failed.\n",
cc_strings[cc],
mask_strings[mask]);
......@@ -234,7 +234,7 @@ piglit_Display(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
unsigned cc;
unsigned mask;
......@@ -245,7 +245,7 @@ piglit_Init(int argc, char **argv)
piglit_require_fragment_program();
piglit_require_extension("GL_NV_fragment_program_option");
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
reference_prog = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB,
reference_shader_source);
......
......@@ -41,9 +41,9 @@
#define snprintf sprintf_s
#endif
int piglit_WindowMode = GLUT_RGBA;
int piglit_Width = TEXTURE_SIZE;
int piglit_Height = TEXTURE_SIZE;
int piglit_window_mode = GLUT_RGBA;
int piglit_width = TEXTURE_SIZE;
int piglit_height = TEXTURE_SIZE;
unsigned int max_samples;
unsigned char * texture_data;
......@@ -202,13 +202,13 @@ static int test(unsigned int dim, unsigned int samples)
return PIGLIT_SUCCESS;
}
int piglit_Display()
int piglit_display()
{
int result;
unsigned int dim;
unsigned int samples;
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
glClear(GL_COLOR_BUFFER_BIT);
for(dim = 1; dim <= 3; ++dim) {
......@@ -234,7 +234,7 @@ int piglit_Display()
}
void piglit_Init(int argc, char ** argv)
void piglit_init(int argc, char ** argv)
{
GLint max_native_tex_instructions;
GLint max_native_tex_indirections;
......
......@@ -44,9 +44,9 @@
#define TEST_ROWS ((400 - 1) / (BOX_SIZE + 1))
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE + 1) * TEST_COLS)+1);
int piglit_Height = (((BOX_SIZE + 1) * TEST_ROWS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE + 1) * TEST_COLS)+1);
int piglit_height = (((BOX_SIZE + 1) * TEST_ROWS)+1);
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
......@@ -121,7 +121,7 @@ static GLfloat position[4 * TEST_ROWS * TEST_COLS];
static const float green[4] = { 0.0, 1.0, 0.0, 0.0 };
int
piglit_Display(void)
piglit_display(void)
{
int result = PIGLIT_SUCCESS;
unsigned r;
......@@ -180,7 +180,7 @@ random_float(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
unsigned r;
unsigned c;
......@@ -193,7 +193,7 @@ piglit_Init(int argc, char **argv)
piglit_require_vertex_program();
piglit_require_fragment_program();
piglit_require_extension("GL_NV_fragment_program_option");
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
vert_prog = piglit_compile_program(GL_VERTEX_PROGRAM_ARB,
vert_shader_source);
......
......@@ -41,9 +41,9 @@
#define BOX_SIZE 16
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_Height = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1);
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
......@@ -78,7 +78,7 @@ static GLint progs[2];
int
piglit_Display(void)
piglit_display(void)
{
const GLfloat comparitor[4] = { 0.5, 0.5, 0.5, 0.5 };
unsigned i;
......@@ -118,7 +118,7 @@ piglit_Display(void)
if (!piglit_probe_pixel_rgb(x + (BOX_SIZE / 2),
y + (BOX_SIZE / 2),
color)) {
if (!piglit_Automatic)
if (!piglit_automatic)
printf("shader %u failed on index %u\n",
j, i);
......@@ -133,13 +133,13 @@ piglit_Display(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
(void) argc;
(void) argv;
piglit_require_fragment_program();
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
reference_prog = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB,
reference_shader_source);
......
......@@ -72,9 +72,9 @@ struct {
#define BOX_SIZE 8
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_Height = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1);
......@@ -154,7 +154,7 @@ tr_func(float a, float b)
int
piglit_Display(void)
piglit_display(void)
{
const GLfloat comparitor[4] = { 0.5, 0.5, 0.5, 0.5 };
static const float values[3] = { 0.0, 0.5, 1.0 };
......@@ -213,7 +213,7 @@ piglit_Display(void)
if (!piglit_probe_pixel_rgb(x + (BOX_SIZE / 2),
y + (BOX_SIZE / 2),
color)) {
if (!piglit_Automatic)
if (!piglit_automatic)
printf("%s failed on ref = "
"{ %.01f %.01f %.01f %.01f }\n",
tests[idx].opcode,
......@@ -231,7 +231,7 @@ piglit_Display(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
unsigned i;
......@@ -240,7 +240,7 @@ piglit_Init(int argc, char **argv)
piglit_require_fragment_program();
piglit_require_extension("GL_NV_fragment_program_option");
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
reference_prog = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB,
reference_shader_source);
......
......@@ -46,9 +46,9 @@ typedef __int32 int32_t;
#define BOX_SIZE 16
int piglit_WindowMode = GLUT_DOUBLE;
int piglit_Width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_Height = (((BOX_SIZE+1)*TEST_ROWS)+1);
int piglit_window_mode = GLUT_DOUBLE;
int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1);
int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1);
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
#define MAX2(a, b) ((a) > (b) ? (a) : (b))
......@@ -256,7 +256,7 @@ pack(float *packed, const float *color, GLenum type)
int
piglit_Display(void)
piglit_display(void)
{
unsigned i;
unsigned j;
......@@ -288,7 +288,7 @@ piglit_Display(void)
if (!piglit_probe_pixel_rgb(x + (BOX_SIZE / 2),
y + (BOX_SIZE / 2),
colors[i])) {
if (!piglit_Automatic)
if (!piglit_automatic)
printf("%s failed on color { %f %f %f %f }\n",
opcodes[j],
colors[i][0], colors[i][1],
......@@ -331,7 +331,7 @@ void shuffle(float *values, unsigned count)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
unsigned i;
float v[TEST_COLS * 3 ];
......@@ -341,7 +341,7 @@ piglit_Init(int argc, char **argv)
piglit_require_fragment_program();
piglit_require_extension("GL_NV_fragment_program_option");
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
reference_prog = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB,
reference_shader_source);
......
......@@ -33,9 +33,9 @@
#include "piglit-util.h"
#include "piglit-framework.h"
int piglit_WindowMode = GLUT_RGB;
int piglit_Width = 100;
int piglit_Height = 100;
int piglit_window_mode = GLUT_RGB;
int piglit_width = 100;
int piglit_height = 100;
static const GLchar *vertShaderText =
"attribute vec4 attrib;\n"
......@@ -46,7 +46,7 @@ static const GLchar *vertShaderText =
int
piglit_Display(void)
piglit_display(void)
{
GLboolean pass = GL_TRUE;
GLint vs;
......@@ -72,7 +72,7 @@ piglit_Display(void)
glLinkProgram(prog);
attrib_loc = glGetAttribLocation(prog, "attrib");
if (!piglit_Automatic)
if (!piglit_automatic)
printf("attrib_loc = %d\n", attrib_loc);
glNewList(1, GL_COMPILE);
......@@ -83,7 +83,7 @@ piglit_Display(void)
glBindAttribLocation(prog, 2, "attrib");
attrib_loc_in_dlist = glGetAttribLocation(prog, "attrib");
if (!piglit_Automatic)
if (!piglit_automatic)
printf("attrib_loc_in_dlist = %d\n", attrib_loc_in_dlist);
glEndList();
......@@ -93,7 +93,7 @@ piglit_Display(void)
void
piglit_Init(int argc, char **argv)
piglit_init(int argc, char **argv)
{
if (!GLEW_VERSION_2_0) {
printf("Requires OpenGL 2.0\n");
......@@ -101,5 +101,5 @@ piglit_Init(int argc, char **argv)
exit(1);
}
piglit_ortho_projection(piglit_Width, piglit_Height, GL_FALSE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
}
......@@ -40,14 +40,14 @@
#include "piglit-util.h"
#include "piglit-framework.h"
int piglit_Automatic = 0;
int piglit_automatic = 0;
static void
display(void)
{
const int result = piglit_Display();
const int result = piglit_display();
if (piglit_Automatic)
if (piglit_automatic)
piglit_report_result(result);
}
......@@ -56,17 +56,17 @@ int main(int argc, char *argv[])
{
glutInit(&argc, argv);
if (argc >= 2 && !strcmp(argv[1], "-auto"))
piglit_Automatic = 1;
piglit_automatic = 1;
glutInitWindowPosition(0, 0);
glutInitWindowSize(piglit_Width, piglit_Height);
glutInitDisplayMode(piglit_WindowMode);
glutInitWindowSize(piglit_width, piglit_height);
glutInitDisplayMode(piglit_window_mode);
glutCreateWindow(argv[0]);
glutDisplayFunc(display);
glutKeyboardFunc(piglit_escape_exit_key);
glewInit();
piglit_Init(argc, argv);
piglit_init(argc, argv);
glutMainLoop();
return 0;
......
......@@ -21,11 +21,11 @@
* IN THE SOFTWARE.
*/
extern int piglit_Automatic;
extern int piglit_automatic;
extern int piglit_WindowMode;
extern int piglit_Width;
extern int piglit_Height;
extern int piglit_window_mode;
extern int piglit_width;
extern int piglit_height;
extern int piglit_Display(void);
extern void piglit_Init(int argc, char **argv);
extern int piglit_display(void);
extern void piglit_init(int argc, char **argv);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment