summaryrefslogtreecommitdiffstats
path: root/progs/redbook/texsub.c
diff options
context:
space:
mode:
authorTed Jump <[email protected]>1999-09-17 02:40:51 +0000
committerTed Jump <[email protected]>1999-09-17 02:40:51 +0000
commit83c02efa520eb2f8b3f5430be47bcd9c9749b30f (patch)
tree7e64e011d244460c4c7f3c6e177727249070c81e /progs/redbook/texsub.c
parent74783e9936c59b8098f769061c6b216cad73edcf (diff)
Added ESC key handling
Diffstat (limited to 'progs/redbook/texsub.c')
-rw-r--r--progs/redbook/texsub.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/progs/redbook/texsub.c b/progs/redbook/texsub.c
index 5dc36ec4e7c..4e829675aba 100644
--- a/progs/redbook/texsub.c
+++ b/progs/redbook/texsub.c
@@ -1,13 +1,13 @@
/*
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
+ * ALL RIGHTS RESERVED
+ * Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
+ * and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
- * written prior permission.
+ * written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -21,8 +21,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
+ *
+ * US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -40,7 +40,7 @@
* two rectangles. This program clamps the texture, if
* the texture coordinates fall outside 0.0 and 1.0.
* If the s key is pressed, a texture subimage is used to
- * alter the original texture. If the r key is pressed,
+ * alter the original texture. If the r key is pressed,
* the original texture is restored.
*/
#include <GL/glut.h>
@@ -61,10 +61,10 @@ static GLuint texName;
void makeCheckImages(void)
{
int i, j, c;
-
+
for (i = 0; i < checkImageHeight; i++) {
for (j = 0; j < checkImageWidth; j++) {
- c = ((((i&0x8)==0)^((j&0x8))==0))*255;
+ c = ((((i&0x8)==0)^((j&0x8)==0)))*255;
checkImage[i][j][0] = (GLubyte) c;
checkImage[i][j][1] = (GLubyte) c;
checkImage[i][j][2] = (GLubyte) c;
@@ -73,7 +73,7 @@ void makeCheckImages(void)
}
for (i = 0; i < subImageHeight; i++) {
for (j = 0; j < subImageWidth; j++) {
- c = ((((i&0x4)==0)^((j&0x4))==0))*255;
+ c = ((((i&0x4)==0)^((j&0x4)==0)))*255;
subImage[i][j][0] = (GLubyte) c;
subImage[i][j][1] = (GLubyte) 0;
subImage[i][j][2] = (GLubyte) 0;
@@ -83,7 +83,7 @@ void makeCheckImages(void)
}
void init(void)
-{
+{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
@@ -98,7 +98,7 @@ void init(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, checkImageHeight,
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, checkImageHeight,
0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage);
}
@@ -174,7 +174,7 @@ int main(int argc, char** argv)
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutMainLoop();
- return 0;
+ return 0;
}
#else
int main(int argc, char** argv)