From: <fa...@us...> - 2011-03-23 03:38:31
|
Revision: 910 http://freeglut.svn.sourceforge.net/freeglut/?rev=910&view=rev Author: fayjf Date: 2011-03-23 03:38:25 +0000 (Wed, 23 Mar 2011) Log Message: ----------- Making some constants in the 'subwin' demo floating-point to silence compiler warnings per e-mail from Diederick Niehorster dated 3/22/11 at 8:58 AM Modified Paths: -------------- trunk/freeglut/freeglut/progs/demos/subwin/subwin.c Modified: trunk/freeglut/freeglut/progs/demos/subwin/subwin.c =================================================================== --- trunk/freeglut/freeglut/progs/demos/subwin/subwin.c 2011-03-22 11:53:09 UTC (rev 909) +++ trunk/freeglut/freeglut/progs/demos/subwin/subwin.c 2011-03-23 03:38:25 UTC (rev 910) @@ -191,7 +191,7 @@ glutKeyboardFunc(key); glutSpecialFunc(special); glutEntryFunc(entry); - glClearColor(0.7,0.7,0.7,1); + glClearColor(0.7f,0.7f,0.7f,1); winmax = sw1 > winmax ? sw1 : winmax; sw2=glutCreateSubWindow(mainwin,328,240,314,236); @@ -200,7 +200,7 @@ glutKeyboardFunc(key); glutSpecialFunc(special); glutEntryFunc(entry); - glClearColor(0.7,0.7,0.7,1); + glClearColor(0.7f,0.7f,0.7f,1); winmax = sw2 > winmax ? sw2 : winmax; strings = malloc(sizeof(char *)*(winmax+1)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dc...@us...> - 2013-02-26 16:14:47
|
Revision: 1509 http://freeglut.svn.sourceforge.net/freeglut/?rev=1509&view=rev Author: dcnieho Date: 2013-02-26 16:14:41 +0000 (Tue, 26 Feb 2013) Log Message: ----------- subwin demo now has a grandchild (subwin in subwin) for testing Modified Paths: -------------- trunk/freeglut/freeglut/progs/demos/subwin/subwin.c Modified: trunk/freeglut/freeglut/progs/demos/subwin/subwin.c =================================================================== --- trunk/freeglut/freeglut/progs/demos/subwin/subwin.c 2013-02-26 16:13:09 UTC (rev 1508) +++ trunk/freeglut/freeglut/progs/demos/subwin/subwin.c 2013-02-26 16:14:41 UTC (rev 1509) @@ -103,12 +103,18 @@ glDisable(GL_LIGHTING); glColor3d(0.1,0.1,0.4); - if (win == mainwin) { + if (win == mainwin) + { shapesPrintf (2, 3, "Move The mouse into different windows"); shapesPrintf (3, 3, "pressing keys will add to the string"); + shapesPrintf (5, 3, "Window: %d", win); + shapesPrintf (6, 3, "String: %s", strings[win]); } - shapesPrintf (5, 3, "Window: %d", win); - shapesPrintf (6, 3, "String: %s", strings[win]); + else + { + shapesPrintf (1, 3, "Window: %d", win); + shapesPrintf (2, 3, "String: %s", strings[win]); + } glutSwapBuffers(); } @@ -163,7 +169,7 @@ int main(int argc, char *argv[]) { - int winmax,sw1,sw2,i; + int winmax,sw1,sw2,sw2sw,i; glutInitWindowSize(640,480); glutInitWindowPosition(40,40); @@ -201,8 +207,17 @@ glutSpecialFunc(special); glutEntryFunc(entry); glClearColor(0.7f,0.7f,0.7f,1); - winmax = sw2 > winmax ? sw2 : winmax; + winmax = sw2 > winmax ? sw2 : winmax; + sw2sw=glutCreateSubWindow(sw2,10,128,294,98); + glutReshapeFunc(resize); + glutDisplayFunc(display); + glutKeyboardFunc(key); + glutSpecialFunc(special); + glutEntryFunc(entry); + glClearColor(0.4f,0.4f,0.4f,1); + winmax = sw2sw > winmax ? sw2sw : winmax; + strings = malloc(sizeof(char *)*(winmax+1)); for (i=0;i<winmax+1;i++) { strings[i] = malloc(sizeof(char)*MAXSTR+1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |