X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=apps%2Fgl%2Ftri.c;fp=apps%2Fgl%2Ftri.c;h=faa794b7f7bfed43cdbbd54c5ead1abe505ebf53;hp=baff0246c2254e07ae90898ef54a5c488b9c46a9;hb=dc6ab389f14bf38b2e6df500aacd52a5ab999cc5;hpb=a79d84589687bf0d651067a8e75370dd6a8ec7b7 diff --git a/apps/gl/tri.c b/apps/gl/tri.c index baff024..faa794b 100644 --- a/apps/gl/tri.c +++ b/apps/gl/tri.c @@ -41,6 +41,7 @@ static GLboolean doubleBuffer = GL_TRUE; static int win; + static void parseArgs(int argc, char** argv) { int i; @@ -58,32 +59,36 @@ static void parseArgs(int argc, char** argv) } } -static void Init(void) -{ - glClearColor(0.3, 0.1, 0.3, 1.0); -} -static void Reshape(int width, int height) +static void +Init(void) { + glClearColor(0.3f, 0.1f, 0.3f, 1.0f); +} - glViewport(0, 0, (GLint)width, (GLint)height); +static void +Reshape(int width, int height) +{ + glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); glMatrixMode(GL_MODELVIEW); } -static void Draw(void) + +static void +Draw(void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_TRIANGLES); - glColor3f(.8,0,0); + glColor3f(.8, 0, 0); glVertex3f(-0.9, -0.9, -30.0); - glColor3f(0,.9,0); + glColor3f(0, .9, 0); glVertex3f( 0.9, -0.9, -30.0); - glColor3f(0,0,.7); + glColor3f(0, 0, .7); glVertex3f( 0.0, 0.9, -30.0); glEnd(); @@ -98,7 +103,9 @@ static void Draw(void) exit(0); } -int main(int argc, char **argv) + +int +main(int argc, char **argv) { GLenum type;