/* Simple demo of computing textures as arrays of values and texture-mapping them onto a 2D quad. This shows that texture parameters (modes) can be associated with a texture id, because the checkerboard flag uses repeat and linear, while the flag uses clamp and nearest. Scott D. Anderson Fall 2000 original Fall 2003 adapted to use TW */ #include #include bool USflag = false; // which flag to show void toggleFlag(unsigned char key, int x, int y) { USflag = !USflag; glutPostRedisplay(); } /* ================================================================ Checkerboard Texture variables */ const int CheckFlagWidth = 8; const int CheckFlagHeight = 8; GLubyte CheckFlagArray[CheckFlagHeight][CheckFlagWidth]; void init_check_flag() { for(int i=0; i