00001 00002 // File: TestWinGlut.h 00003 // Author: Changchang Wu 00004 // Description : interface for the TestWinGlut class. 00005 // GLUT-based SiftGPU viewer 00006 // 00007 // 00008 // Copyright (c) 2007 University of North Carolina at Chapel Hill 00009 // All Rights Reserved 00010 // 00011 // Permission to use, copy, modify and distribute this software and its 00012 // documentation for educational, research and non-profit purposes, without 00013 // fee, and without a written agreement is hereby granted, provided that the 00014 // above copyright notice and the following paragraph appear in all copies. 00015 // 00016 // The University of North Carolina at Chapel Hill make no representations 00017 // about the suitability of this software for any purpose. It is provided 00018 // 'as is' without express or implied warranty. 00019 // 00020 // Please send BUG REPORTS to ccwu@cs.unc.edu 00021 // 00023 00024 #if !defined(TEST_WIN_GLUT_H) 00025 #define TEST_WIN_GLUT_H 00026 00027 #if _WIN32 && _MSC_VER > 1000 00028 #pragma once 00029 #endif // _MSC_VER > 1000 00030 00031 class BasicTestWin; 00032 00033 class TestWinGlut : public BasicTestWin 00034 { 00035 enum 00036 { 00037 MAX_TEST_WIN_GLUT = 100 00038 }; 00039 static void button(int button, int state,int x, int y); 00040 static void display(); 00041 static void keyboard(unsigned char key, int x, int y); 00042 static void idle(); 00043 void CreateGLUT(); 00044 static void reshape(int w, int h); 00045 00046 //may also use std::vector 00047 static TestWinGlut * _win[MAX_TEST_WIN_GLUT]; 00048 00049 public: 00050 void SetDisplaySize(int w, int h); 00051 void UpdateDisplay(); 00052 void SetWindowTitle(char *title); 00053 static void motion(int x, int y); 00054 static void Run(); 00055 TestWinGlut(int argc, char**argv); 00056 virtual ~TestWinGlut(); 00057 00058 00059 }; 00060 00061 #endif // !defined(TEST_WIN_GLUT_H) 00062