132001f49Smrg/*
232001f49Smrg * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
332001f49Smrg *
432001f49Smrg * Permission is hereby granted, free of charge, to any person obtaining a
532001f49Smrg * copy of this software and associated documentation files (the "Software"),
632001f49Smrg * to deal in the Software without restriction, including without limitation
732001f49Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
832001f49Smrg * and/or sell copies of the Software, and to permit persons to whom the
932001f49Smrg * Software is furnished to do so, subject to the following conditions:
1032001f49Smrg *
1132001f49Smrg * The above copyright notice and this permission notice shall be included
1232001f49Smrg * in all copies or substantial portions of the Software.
1332001f49Smrg *
1432001f49Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1532001f49Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1632001f49Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1732001f49Smrg * VMWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
1832001f49Smrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1932001f49Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2032001f49Smrg */
2132001f49Smrg
2232001f49Smrg
2332001f49Smrg#ifndef GLMAIN_H
2432001f49Smrg#define GLMAIN_H
2532001f49Smrg
2632001f49Smrg
2732001f49Smrg#define GL_GLEXT_PROTOTYPES
2832001f49Smrg#include <GL/glew.h>
2932001f49Smrg#include <stdlib.h>
3032001f49Smrg#include <math.h>
3132001f49Smrg
3232001f49Smrg
3332001f49Smrg/** Test programs can use these vars/functions */
3432001f49Smrg
3532001f49Smrgextern int WinWidth, WinHeight;
3632001f49Smrg
3732001f49Smrgextern double
3832001f49SmrgPerfGetTime(void);
3932001f49Smrg
4032001f49Smrgextern void
4132001f49SmrgPerfSwapBuffers(void);
4232001f49Smrg
4332001f49Smrgextern GLuint
4432001f49SmrgPerfCheckerTexture(GLsizei width, GLsizei height);
4532001f49Smrg
4632001f49Smrgextern GLuint
4732001f49SmrgPerfShaderProgram(const char *vertShader, const char *fragShader);
4832001f49Smrg
4932001f49Smrgextern int
5032001f49SmrgPerfReshapeWindow( unsigned w, unsigned h );
5132001f49Smrg
5232001f49Smrgextern GLboolean
5332001f49SmrgPerfExtensionSupported(const char *ext);
5432001f49Smrg
5532001f49Smrg
5632001f49Smrg/** Test programs must implement these functions **/
5732001f49Smrg
5832001f49Smrgextern void
5932001f49SmrgPerfInit(void);
6032001f49Smrg
6132001f49Smrgextern void
6232001f49SmrgPerfNextRound(void);
6332001f49Smrg
6432001f49Smrgextern void
6532001f49SmrgPerfDraw(void);
6632001f49Smrg
6732001f49Smrg
6832001f49Smrg#endif /* GLMAIN_H */
69