From 793dce4091f5a4a609a6ed4b1b3afe229cad5ddb Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sun, 4 Sep 2011 20:30:48 +0000 Subject: [PATCH] Adding the "patch_demo" patch per e-mail from Diederick Niehorster vintage 6/9/11 at 11:57 PM. Please check that I got them right; they are quite confusing. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@931 7f0cb862-5218-0410-a997-914c9d46530a --- VisualStudio/2008/Resizer/Resizer.vcproj | 354 +++++++++++++++++++++ VisualStudio/2008/freeglut.sln | 13 + VisualStudio/2010/Resizer/Resizer.vcxproj | 174 ++++++++++ VisualStudio/2010/Resizer/Resizer.vcxproj.filters | 22 ++ VisualStudio/2010/freeglut.sln | 10 + progs/demos/One/one.c | 4 +- progs/demos/Resizer/Resizer.cpp | 140 ++++++++ progs/demos/Resizer/Resizer.dsp | 102 ++++++ progs/demos/demos.dsw | 12 + progs/demos/subwin/subwin.c | 8 +- 10 files changed, 834 insertions(+), 5 deletions(-) create mode 100644 VisualStudio/2008/Resizer/Resizer.vcproj create mode 100644 VisualStudio/2010/Resizer/Resizer.vcxproj create mode 100644 VisualStudio/2010/Resizer/Resizer.vcxproj.filters create mode 100644 progs/demos/Resizer/Resizer.cpp create mode 100644 progs/demos/Resizer/Resizer.dsp diff --git a/VisualStudio/2008/Resizer/Resizer.vcproj b/VisualStudio/2008/Resizer/Resizer.vcproj new file mode 100644 index 0000000..ca6535f --- /dev/null +++ b/VisualStudio/2008/Resizer/Resizer.vcproj @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/VisualStudio/2008/freeglut.sln b/VisualStudio/2008/freeglut.sln index cc24c1a..8b405ab 100644 --- a/VisualStudio/2008/freeglut.sln +++ b/VisualStudio/2008/freeglut.sln @@ -43,6 +43,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "subwin", "subwin\subwin.vcp {1AE4E979-0D35-4747-BF8E-DD60358F49DB} = {1AE4E979-0D35-4747-BF8E-DD60358F49DB} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Resizer", "Resizer\Resizer.vcproj", "{8034DA32-26FB-46FC-A47B-2E3EAD39B34E}" + ProjectSection(ProjectDependencies) = postProject + {1AE4E979-0D35-4747-BF8E-DD60358F49DB} = {1AE4E979-0D35-4747-BF8E-DD60358F49DB} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_Static|Win32 = Debug_Static|Win32 @@ -123,6 +128,14 @@ Global {CD3C35E0-FED3-4425-8CF9-A772667D464B}.Release_Static|Win32.Build.0 = Release_Static|Win32 {CD3C35E0-FED3-4425-8CF9-A772667D464B}.Release|Win32.ActiveCfg = Release|Win32 {CD3C35E0-FED3-4425-8CF9-A772667D464B}.Release|Win32.Build.0 = Release|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug_Static|Win32.ActiveCfg = Debug_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug_Static|Win32.Build.0 = Debug_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug|Win32.Build.0 = Debug|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release_Static|Win32.ActiveCfg = Release_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release_Static|Win32.Build.0 = Release_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release|Win32.ActiveCfg = Release|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/VisualStudio/2010/Resizer/Resizer.vcxproj b/VisualStudio/2010/Resizer/Resizer.vcxproj new file mode 100644 index 0000000..ab3fbd0 --- /dev/null +++ b/VisualStudio/2010/Resizer/Resizer.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug_Static + Win32 + + + Debug + Win32 + + + Release_Static + Win32 + + + Release + Win32 + + + + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E} + Resizer + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)build\$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)build\$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)build\$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)build\$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + CompileAsC + 4996;%(DisableSpecificWarnings) + + + ..\..\..\lib\Debug;%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;FREEGLUT_STATIC;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + CompileAsC + 4996;%(DisableSpecificWarnings) + + + ..\..\..\lib\Debug;%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + + + MaxSpeed + true + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + ..\..\..\lib\Release;%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;FREEGLUT_STATIC;%(PreprocessorDefinitions) + MultiThreaded + true + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + ..\..\..\lib\Release;%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + + + + + + + \ No newline at end of file diff --git a/VisualStudio/2010/Resizer/Resizer.vcxproj.filters b/VisualStudio/2010/Resizer/Resizer.vcxproj.filters new file mode 100644 index 0000000..4f3e4fe --- /dev/null +++ b/VisualStudio/2010/Resizer/Resizer.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/VisualStudio/2010/freeglut.sln b/VisualStudio/2010/freeglut.sln index ce70cab..9ee452a 100644 --- a/VisualStudio/2010/freeglut.sln +++ b/VisualStudio/2010/freeglut.sln @@ -19,6 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smooth_opengl3", "smooth_op EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "subwin", "subwin\subwin.vcxproj", "{CD3C35E0-FED3-4425-8CF9-A772667D464B}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Resizer", "Resizer\Resizer.vcxproj", "{8034DA32-26FB-46FC-A47B-2E3EAD39B34E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_Static|Win32 = Debug_Static|Win32 @@ -99,6 +101,14 @@ Global {CD3C35E0-FED3-4425-8CF9-A772667D464B}.Release_Static|Win32.Build.0 = Release_Static|Win32 {CD3C35E0-FED3-4425-8CF9-A772667D464B}.Release|Win32.ActiveCfg = Release|Win32 {CD3C35E0-FED3-4425-8CF9-A772667D464B}.Release|Win32.Build.0 = Release|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug_Static|Win32.ActiveCfg = Debug_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug_Static|Win32.Build.0 = Debug_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug|Win32.ActiveCfg = Debug|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Debug|Win32.Build.0 = Debug|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release_Static|Win32.ActiveCfg = Release_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release_Static|Win32.Build.0 = Release_Static|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release|Win32.ActiveCfg = Release|Win32 + {8034DA32-26FB-46FC-A47B-2E3EAD39B34E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/progs/demos/One/one.c b/progs/demos/One/one.c index dd98f99..1d1a2e4 100644 --- a/progs/demos/One/one.c +++ b/progs/demos/One/one.c @@ -258,6 +258,8 @@ int main( int argc, char** argv ) glutInit( &argc, argv ); + glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_GLUTMAINLOOP_RETURNS); + subMenuA = glutCreateMenu( SampleMenu ); glutAddMenuEntry( "Sub menu A1 (01)", 1 ); glutAddMenuEntry( "Sub menu A2 (02)", 2 ); @@ -316,7 +318,7 @@ int main( int argc, char** argv ) glutIdleFunc( SampleIdle ); glutAttachMenu( GLUT_LEFT_BUTTON ); - printf( "current window is %ix%i at (%i,%i)", + printf( "current window is %ix%i at (%i,%i)\n", glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT ), glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ) ); diff --git a/progs/demos/Resizer/Resizer.cpp b/progs/demos/Resizer/Resizer.cpp new file mode 100644 index 0000000..8252d7d --- /dev/null +++ b/progs/demos/Resizer/Resizer.cpp @@ -0,0 +1,140 @@ +#include + +#include + +int nWindow; +int nLoopMain = 0; + +int nPosX, nPosY; +int nWidth, nHeight; + +void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY ); +void Redisplay(); + + + + + +void DrawQuad() +{ + glBegin(GL_QUADS); + glVertex2d(nWidth*.25, nHeight*.75); + glVertex2d(nWidth*.75, nHeight*.75); + glVertex2d(nWidth*.75, nHeight*.25); + glVertex2d(nWidth*.25, nHeight*.25); + glEnd(); +} + +void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) +{ + if (cChar == 27) + glutLeaveMainLoop(); + + else if (cChar=='f') + { + printf("main window toggle fullscreen\n"); + + glutFullScreenToggle(); + } + else if (cChar=='r') + { + printf("main window resize\n"); + + if (nWidth<400) + glutReshapeWindow(600,300); + else + glutReshapeWindow(300,300); + } + else if (cChar=='m') + { + printf("main window position\n"); + + /* The window position you request is the outer top-left of the window, + * the client area is at a different position if the window has borders + * and/or a title bar. + */ + if (nPosX<400) + glutPositionWindow(600,300); + else + glutPositionWindow(300,300); + } +} + +void Idle(void) +{ + glutPostRedisplay(); +} + +void Reshape(int x, int y) +{ + nWidth = glutGet(GLUT_WINDOW_WIDTH); + nHeight = glutGet(GLUT_WINDOW_HEIGHT); + + glViewport(0,0,nWidth,nHeight); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0,nWidth,0,nHeight); +} + +void Redisplay(void) +{ + if (nLoopMain++%6==0) + { + int border, caption; + + nPosX = glutGet(GLUT_WINDOW_X); + nPosY = glutGet(GLUT_WINDOW_Y); + nWidth = glutGet(GLUT_WINDOW_WIDTH); + nHeight = glutGet(GLUT_WINDOW_HEIGHT); + border = glutGet(GLUT_WINDOW_BORDER_WIDTH); + caption = glutGet(GLUT_WINDOW_HEADER_HEIGHT); + /* returned position is top-left of client area, to get top-left of + * of window you'll need to add the size of the border and caption + * of the current window (can be 0). + * Note that the window position is not necessarily positive (e.g. + * when the window is on a monitor to the left of the primary monitor + * or simply when maximized--try pressing the maximize button). + * the returned size is the size of the client area + */ + printf("window now %dx%d, top-left of client at: (%d,%d), of window at: (%d,%d)\n", + nWidth, nHeight, + nPosX ,nPosY, + nPosX-border, + nPosY-border-caption); + } + + glClearColor(.2f,0.f,0.f,0.f); + glClear(GL_COLOR_BUFFER_BIT); + glColor3f(1,1,1); + DrawQuad(); + + glutSwapBuffers(); + glutPostRedisplay(); +} + + +int main(int argc, char* argv[]) +{ + glutInit( &argc, argv ); + glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE /*| GLUT_BORDERLESS*/); // do try as well with GLUT_BORDERLESS and GLUT_CAPTIONLESS + glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_GLUTMAINLOOP_RETURNS); + + /* The window position you request is the outer top-left of the window, + * the client area is at a different position if the window has borders + * and/or a title bar. + */ + glutInitWindowPosition(150,250); + glutInitWindowSize(200,200); + + nWindow = glutCreateWindow("test"); + printf("main window id: %d\n", nWindow); + + glutKeyboardFunc( SampleKeyboard ); + glutDisplayFunc( Redisplay ); + glutReshapeFunc( Reshape ); + + glutMainLoop(); + printf("glutMainLoop returned\n"); + + return 1; +} \ No newline at end of file diff --git a/progs/demos/Resizer/Resizer.dsp b/progs/demos/Resizer/Resizer.dsp new file mode 100644 index 0000000..b61b8b5 --- /dev/null +++ b/progs/demos/Resizer/Resizer.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="Resizer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Resizer - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Resizer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Resizer.mak" CFG="Resizer - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Resizer - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Resizer - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Resizer - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "Resizer - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "Resizer - Win32 Release" +# Name "Resizer - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Resizer.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/progs/demos/demos.dsw b/progs/demos/demos.dsw index cc6c03e..7c9f79b 100644 --- a/progs/demos/demos.dsw +++ b/progs/demos/demos.dsw @@ -75,6 +75,18 @@ Package=<4> ############################################################################### +Project: "Resizer"=.\Resizer\Resizer.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "lorenz"=.\Lorenz\lorenz.dsp - Package Owner=<4> Package=<5> diff --git a/progs/demos/subwin/subwin.c b/progs/demos/subwin/subwin.c index 5278672..22e28b0 100644 --- a/progs/demos/subwin/subwin.c +++ b/progs/demos/subwin/subwin.c @@ -104,8 +104,8 @@ static void display(void) glColor3d(0.1,0.1,0.4); if (win == mainwin) { - shapesPrintf (2, 3, "Move The mounse into different windows"); - shapesPrintf (3, 3, "pressing keys will add to the string"); + 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]); @@ -170,7 +170,7 @@ main(int argc, char *argv[]) glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE); - glutCreateWindow("OpenGLUT Sub Windows"); + glutCreateWindow("FreeGLUT Sub Windows"); glutReshapeFunc(resize); glutDisplayFunc(display); @@ -194,7 +194,7 @@ main(int argc, char *argv[]) glClearColor(0.7f,0.7f,0.7f,1); winmax = sw1 > winmax ? sw1 : winmax; - sw2=glutCreateSubWindow(mainwin,328,240,314,236); + sw2=glutCreateSubWindow(mainwin,322,240,314,236); glutReshapeFunc(resize); glutDisplayFunc(display); glutKeyboardFunc(key); -- 1.7.10.4