--- /dev/null
+# Microsoft eMbedded Visual Tools Project File - Name="freeglut" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE ARMV4) Dynamic-Link Library" 0xa302
+
+CFG=freeglut - Win32 (WCE ARMV4) 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 "freeglut_evc4.vcn".
+!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 "freeglut_evc4.vcn" CFG="freeglut - Win32 (WCE ARMV4) Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "freeglut - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Dynamic-Link Library")
+!MESSAGE "freeglut - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+CPP="C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\WCE420\bin\xicle42"
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "freeglut - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ARMV4Rel"
+# PROP BASE Intermediate_Dir "ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ARMV4Rel"
+# PROP Intermediate_Dir "ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "FREEGLUT_EXPORTS" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "FREEGLUT_EXPORTS" /YX /O2 /M$(CECrtMT) /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32="C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\WCE420\bin\xilinke42"
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /out:"ARMV4Rel/freeglut.dll" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF "$(CFG)" == "freeglut - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "ARMV4Dbg"
+# PROP BASE Intermediate_Dir "ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "ARMV4Dbg"
+# PROP Intermediate_Dir "ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "FREEGLUT_EXPORTS" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "FREEGLUT_EXPORTS" /YX /M$(CECrtMTDebug) /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32="C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\WCE420\bin\xilinke42"
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /out:"ARMV4Dbg/freeglutD.dll" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ENDIF
+
+# Begin Target
+
+# Name "freeglut - Win32 (WCE ARMV4) Release"
+# Name "freeglut - Win32 (WCE ARMV4) Debug"
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\src\freeglut_callbacks.c
+DEP_CPP_FREEG=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEG=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_cursor.c
+DEP_CPP_FREEGL=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGL=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_display.c
+DEP_CPP_FREEGLU=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLU=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_ext.c
+DEP_CPP_FREEGLUT=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_font.c
+DEP_CPP_FREEGLUT_=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_font_data.c
+DEP_CPP_FREEGLUT_F=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_F=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_gamemode.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_geometry.c
+DEP_CPP_FREEGLUT_G=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_G=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_glutfont_definitions.c
+DEP_CPP_FREEGLUT_GL=\
+ ".\src\freeglut_internal.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_init.c
+DEP_CPP_FREEGLUT_I=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_I=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_internal.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_joystick.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_main.c
+DEP_CPP_FREEGLUT_M=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_M=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_menu.c
+DEP_CPP_FREEGLUT_ME=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_ME=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_misc.c
+DEP_CPP_FREEGLUT_MI=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_MI=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_overlay.c
+DEP_CPP_FREEGLUT_O=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_O=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_state.c
+DEP_CPP_FREEGLUT_S=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_S=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_stroke_mono_roman.c
+DEP_CPP_FREEGLUT_ST=\
+ ".\src\freeglut_internal.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_stroke_roman.c
+DEP_CPP_FREEGLUT_STR=\
+ ".\src\freeglut_internal.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_structure.c
+DEP_CPP_FREEGLUT_STRU=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_STRU=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_teapot.c
+DEP_CPP_FREEGLUT_T=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_T=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_videoresize.c
+DEP_CPP_FREEGLUT_V=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_V=\
+ ".\src\config.h"\
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\freeglut_window.c
+DEP_CPP_FREEGLUT_W=\
+ ".\src\freeglut_internal.h"\
+ {$(INCLUDE)}"GL\freeglut.h"\
+ {$(INCLUDE)}"GL\freeglut_ext.h"\
+ {$(INCLUDE)}"GL\freeglut_std.h"\
+
+NODEP_CPP_FREEGLUT_W=\
+ ".\src\config.h"\
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\include\GL\freeglut.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\GL\freeglut_ext.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\GL\freeglut_std.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\GL\glut.h
+# End Source File
+# End Group
+# End Target
+# End Project
--- /dev/null
+Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Klimt"=..\..\klimt\klimt\build\EVC4\Klimt.vcp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "freeglut"=.\freeglut_evc4.vcp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Klimt
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
/* link with Win32 shared freeglut lib */
# if defined(_MSC_VER)
-# pragma comment (lib, "freeglut.lib")
+# ifndef _WIN32_WCE
+# pragma comment (lib, "freeglut.lib")
+# endif
# endif
# endif
/* Drag in other Windows libraries as required by FreeGLUT */
# if defined(_MSC_VER)
-# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */
-# pragma comment (lib, "user32.lib") /* link Windows user lib */
-# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */
-# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */
-# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */
+# ifndef _WIN32_WCE
+# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */
+# pragma comment (lib, "user32.lib") /* link Windows user lib */
+# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */
+# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */
+# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */
+# endif //_WIN32_WCE
# endif
#else
}
}
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* This is a temporary solution only...
);
XFlush( fgDisplay.Display ); /* XXX Is this really necessary? */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
{
POINT coords;
#if TARGET_HOST_UNIX_X11
glXSwapBuffers( fgDisplay.Display, fgStructure.Window->Window.Handle );
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
SwapBuffers( fgStructure.Window->Window.Device );
#endif
{ "glutWindowStatusFunc", (void *) glutWindowStatusFunc },
{ "glutKeyboardUpFunc", (void *) glutKeyboardUpFunc },
{ "glutSpecialUpFunc", (void *) glutSpecialUpFunc },
+#if !TARGET_HOST_WINCE
{ "glutJoystickFunc", (void *) glutJoystickFunc },
+#endif //TARGET_HOST_WINCE
{ "glutSetColor", (void *) glutSetColor },
{ "glutGetColor", (void *) glutGetColor },
{ "glutCopyColormap", (void *) glutCopyColormap },
{ "glutReportErrors", (void *) glutReportErrors },
{ "glutIgnoreKeyRepeat", (void *) glutIgnoreKeyRepeat },
{ "glutSetKeyRepeat", (void *) glutSetKeyRepeat },
+#if !TARGET_HOST_WINCE
{ "glutForceJoystickFunc", (void *) glutForceJoystickFunc },
{ "glutGameModeString", (void *) glutGameModeString },
{ "glutEnterGameMode", (void *) glutEnterGameMode },
{ "glutLeaveGameMode", (void *) glutLeaveGameMode },
{ "glutGameModeGet", (void *) glutGameModeGet },
+#endif //TARGET_HOST_WINCE
/* freeglut extensions */
{ "glutMainLoopEvent", (void *) glutMainLoopEvent },
{ "glutLeaveMainLoop", (void *) glutLeaveMainLoop },
return glut_functions[ i ].address;
/* Try core GL functions */
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
return( void * )wglGetProcAddress( ( LPCSTR )procName );
#elif TARGET_HOST_UNIX_X11 && defined( GLX_ARB_get_proc_address )
return(void * )glXGetProcAddressARB( ( const GLubyte * )procName );
*/
# endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/* DEVMODE devMode; */
*/
# endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* Restore the previously rememebered desktop display settings
*/
# endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
unsigned int displayModes = 0, mode = 0xffffffff;
GLboolean success = GL_FALSE;
0, /* FPSInterval */
0, /* SwapCount */
0, /* SwapTime */
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
{ 0, GL_FALSE }, /* Time */
#else
{ { 0, 0 }, GL_FALSE },
FALSE
);
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
WNDCLASS wc;
ATOM atom;
*/
fgDisplay.Instance = GetModuleHandle( NULL );
- atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc );
+ atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc );
+
if( atom == 0 )
{
ZeroMemory( &wc, sizeof(WNDCLASS) );
* XXX Old code had "| CS_DBCLCKS" commented out. Plans for the
* XXX future? Dead-end idea?
*/
- wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = fgWindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = fgDisplay.Instance;
- wc.hIcon = LoadIcon( fgDisplay.Instance, "GLUT_ICON" );
+ wc.hIcon = LoadIcon( fgDisplay.Instance, _T("GLUT_ICON") );
+
+#if TARGET_HOST_WIN32
+ wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
if (!wc.hIcon)
wc.hIcon = LoadIcon( NULL, IDI_WINLOGO );
+#else //TARGET_HOST_WINCE
+ wc.style = CS_HREDRAW | CS_VREDRAW;
+#endif
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
- wc.lpszClassName = "FREEGLUT";
+ wc.lpszClassName = _T("FREEGLUT");
/*
* Register the window class
#endif
+#if !TARGET_HOST_WINCE
fgJoystickInit( 0 );
fgJoystickInit( 1 );
+#endif //!TARGET_HOST_WINCE
fgState.Initialised = GL_TRUE;
}
free( timer );
}
+#if !TARGET_HOST_WINCE
fgJoystickClose( );
+#endif //!TARGET_HOST_WINCE
fgState.Initialised = GL_FALSE;
* Everything inside the following #ifndef is copied from the X sources.
*/
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
fgElapsedTime( );
/* check if GLUT_FPS env var is set */
+#if !TARGET_HOST_WINCE
{
const char *fps = getenv( "GLUT_FPS" );
if( fps )
}
}
+#endif //TARGET_HOST_WINCE
+
/*
* Have the display created now. If there wasn't a "-display"
* in the program arguments, we will use the DISPLAY environment
/*
* Freeglut is meant to be available under all Unix/X11 and Win32 platforms.
*/
-#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(_WIN32_WCE)
+# define TARGET_HOST_UNIX_X11 0
+# define TARGET_HOST_WIN32 0
+# define TARGET_HOST_WINCE 1
+#elif defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
# define TARGET_HOST_UNIX_X11 0
# define TARGET_HOST_WIN32 1
+# define TARGET_HOST_WINCE 0
#else
# define TARGET_HOST_UNIX_X11 1
# define TARGET_HOST_WIN32 0
+# define TARGET_HOST_WINCE 0
#endif
#define FREEGLUT_MAX_MENUS 3
#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>
+#include <TCHAR.H>
#endif
#if defined(_MSC_VER)
#endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
HINSTANCE Instance; /* The application's instance */
DEVMODE DisplayMode; /* Desktop's display settings */
typedef Window SFG_WindowHandleType ;
typedef GLXContext SFG_WindowContextType ;
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
typedef HWND SFG_WindowHandleType ;
typedef HGLRC SFG_WindowContextType ;
XVisualInfo* VisualInfo; /* The window's visual information */
Pixmap Pixmap; /* Used for offscreen rendering */
/* GLXPixmap GLXPixMap; */ /* Used for offscreen rendering */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
HDC Device; /* The window's device context */
#endif
/*
* The window procedure for Win32 events handling
*/
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg,
WPARAM wParam, LPARAM lParam );
GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
width, height );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
+#if !TARGET_HOST_WINCE
{
RECT rect;
SWP_NOZORDER
);
}
+#endif //TARGET_HOST_WINCE
/*
* XXX Should update {window->State.OldWidth, window->State.OldHeight}
INVOKE_WCB( *window, Display, ( ) );
fgSetWindow( current_window );
}
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
RedrawWindow(
window->Window.Handle, NULL, NULL,
RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW
if( window->State.JoystickLastPoll + window->State.JoystickPollRate <=
checkTime )
{
+#if !TARGET_HOST_WINCE
fgJoystickPollWindow( window );
+#endif //!TARGET_HOST_WINCE
window->State.JoystickLastPoll = checkTime;
}
return elapsed;
#elif TARGET_HOST_WIN32
return timeGetTime() - fgState.Time.Value;
+#elif TARGET_HOST_WINCE
+ return GetTickCount() - fgState.Time.Value;
#endif
}
else
gettimeofday( &fgState.Time.Value, NULL );
#elif TARGET_HOST_WIN32
fgState.Time.Value = timeGetTime ();
+#elif TARGET_HOST_WINCE
+ fgState.Time.Value = GetTickCount();
#endif
fgState.Time.Set = GL_TRUE ;
if( -1 == err )
fgWarning ( "freeglut select() error: %d\n", errno );
}
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
MsgWaitForMultipleObjects( 0, NULL, FALSE, msec, QS_ALLEVENTS );
#endif
}
}
}
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
MSG stMsg;
{
int action;
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
SFG_Window *window = (SFG_Window *)fgStructure.Windows.First ;
#endif
freeglut_assert_ready;
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* Processing before the main loop: If there is a window which is open and
* which has a visibility callback, call it. I know this is an ugly hack,
}
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* Determine a GLUT modifer mask based on MS-WINDOWS system info.
*/
{
unsigned int current_DisplayMode = fgState.DisplayMode;
fgState.DisplayMode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH;
+#if !TARGET_HOST_WINCE
fgSetupPixelFormat( window, GL_FALSE, PFD_MAIN_PLANE );
+#endif
fgState.DisplayMode = current_DisplayMode;
if( fgStructure.MenuContext )
}
else
{
+#if !TARGET_HOST_WINCE
fgSetupPixelFormat( window, GL_FALSE, PFD_MAIN_PLANE );
+#endif
if( ! fgState.UseCurrentContext )
window->Window.Context =
if( window->State.Visible )
{
window->State.NeedToResize = GL_TRUE;
+#if TARGET_HOST_WINCE
+ window->State.Width = HIWORD(lParam);
+ window->State.Height = LOWORD(lParam);
+#else
window->State.Width = LOWORD(lParam);
window->State.Height = HIWORD(lParam);
+#endif //TARGET_HOST_WINCE
}
break;
break;
}
+#if !TARGET_HOST_WINCE
if( GetSystemMetrics( SM_SWAPBUTTON ) )
{
if( button == GLUT_LEFT_BUTTON )
if( button == GLUT_RIGHT_BUTTON )
button = GLUT_LEFT_BUTTON;
}
+#endif //!TARGET_HOST_WINCE
if( button == -1 )
return DefWindowProc( hWnd, uMsg, lParam, wParam );
default:
{
+#if !TARGET_HOST_WINCE
BYTE state[ 256 ];
WORD code[ 2 ];
( (char)wParam,
window->State.MouseX, window->State.MouseY )
);
+#endif //!TARGET_HOST_WINCE
}
}
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
break;
+#if !TARGET_HOST_WINCE
case WM_SYNCPAINT: /* 0x0088 */
/* Another window has moved, need to update this one */
window->State.Redisplay = GL_TRUE;
break ;
}
}
+#endif //!TARGET_HOST_WINCE
/* We need to pass the message on to the operating system as well */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
* that that wasn't the original intent...if not, perhaps we need another
* symbolic constant, FREEGLUT_MENU_ITEM_BORDER, or such.)
*/
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
#define FREEGLUT_MENU_FONT GLUT_BITMAP_8_BY_13
#else
#define FREEGLUT_MENU_FONT GLUT_BITMAP_HELVETICA_18
* too. These variables should be stuffed into global state and initialized
* via the glutInit*() system.
*/
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
static float menu_pen_fore [4] = {0.0f, 0.0f, 0.0f, 1.0f};
static float menu_pen_back [4] = {0.85f, 0.85f, 0.85f, 1.0f};
static float menu_pen_hfore [4] = {1.0f, 1.0f, 1.0f, 1.0f};
*/
void FGAPIENTRY glutForceJoystickFunc( void )
{
+#if !TARGET_HOST_WINCE
freeglut_assert_ready;
freeglut_return_if_fail( fgStructure.Window != NULL );
freeglut_return_if_fail( FETCH_WCB( *( fgStructure.Window ), Joystick ) );
fgJoystickPollWindow( fgStructure.Window );
+#endif //!TARGET_HOST_WINCE
}
/*
*/
int FGAPIENTRY glutGet( GLenum eWhat )
{
-#if TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
int returnValue ;
GLboolean boolValue ;
#endif
return fgStructure.Window->Window.VisualInfo->visualid;
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* Handle the OpenGL inquiries
/*
* ...then we've got to correct the results we've just received...
*/
+
+#if !TARGET_HOST_WINCE
if ( ( fgStructure.GameMode != fgStructure.Window ) && ( fgStructure.Window->Parent == NULL ) &&
( ! fgStructure.Window->IsMenu ) )
{
winRect.top += GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION );
winRect.bottom -= GetSystemMetrics( SM_CYSIZEFRAME );
}
+#endif //TARGET_HOST_WINCE
switch( eWhat )
{
break;
case GLUT_WINDOW_BORDER_WIDTH :
+#if TARGET_HOST_WINCE
+ return 0;
+#else
return GetSystemMetrics( SM_CXSIZEFRAME );
+#endif //TARGET_HOST_WINCE
case GLUT_WINDOW_HEADER_HEIGHT :
+#if TARGET_HOST_WINCE
+ return 0;
+#else
return GetSystemMetrics( SM_CYCAPTION );
+#endif //TARGET_HOST_WINCE
case GLUT_DISPLAY_MODE_POSSIBLE:
+#if TARGET_HOST_WINCE
+ return GL_FALSE;
+#else
return fgSetupPixelFormat( fgStructure.Window, GL_TRUE,
PFD_MAIN_PLANE );
+#endif //TARGET_HOST_WINCE
+
case GLUT_WINDOW_FORMAT_ID:
+#if !TARGET_HOST_WINCE
if( fgStructure.Window != NULL )
return GetPixelFormat( fgStructure.Window->Window.Device );
+#endif //TARGET_HOST_WINCE
return 0;
#endif
*/
return 3 ;
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
case GLUT_HAS_MOUSE:
/*
/*
* We are much more fortunate under Win32 about this...
*/
+#if TARGET_HOST_WINCE
+ return 1;
+#else
return GetSystemMetrics( SM_CMOUSEBUTTONS );
+#endif //TARGET_HOST_WINCE
#endif
case GLUT_OVERLAY_DAMAGED:
return -1;
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
case GLUT_OVERLAY_POSSIBLE:
/* return fgSetupPixelFormat( fgStructure.Window, GL_TRUE,
#include <GL/freeglut.h>
#include "freeglut_internal.h"
+#if TARGET_HOST_WINCE
+#include <aygshell.h>
+#pragma comment( lib, "Aygshell.lib" )
+
+wchar_t* wstr_from_str(const char* str)
+{
+ int i,len=strlen(str);
+ wchar_t* wstr = (wchar_t*)malloc(2*len+2);
+ for(i=0; i<len; i++)
+ wstr[i] = str[i];
+ wstr[len] = 0;
+ return wstr;
+}
+
+
+#endif //TARGET_HOST_WINCE
+
/*
* TODO BEFORE THE STABLE RELEASE:
*
GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
unsigned char layer_type )
{
+#if TARGET_HOST_WINCE
+ return GL_TRUE;
+#else
PIXELFORMATDESCRIPTOR* ppfd, pfd;
int flags, pixelformat;
if( checkOnly )
return GL_TRUE;
return SetPixelFormat( window->Window.Device, pixelformat, ppfd );
+#endif //TARGET_HOST_WINCE
}
#endif
window->Window.Handle,
window->Window.Context
);
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
if( fgStructure.Window )
ReleaseDC( fgStructure.Window->Window.Handle,
fgStructure.Window->Window.Device );
* that they should replace a window manager that they like, and which
* works, just because *we* think that it's not "modern" enough.
*/
+#if TARGET_HOST_WINCE
+ sizeHints.x = 0;
+ sizeHints.y = 0;
+ sizeHints.width = 320;
+ sizeHints.height = 240;
+#else
sizeHints.x = x;
sizeHints.y = y;
sizeHints.width = w;
sizeHints.height = h;
+#endif //TARGET_HOST_WINCE
wmHints.flags = StateHint;
wmHints.initial_state = fgState.ForceIconic ? IconicState : NormalState;
XMapWindow( fgDisplay.Display, window->Window.Handle );
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
WNDCLASS wc;
DWORD flags;
/*
* Grab the window class we have registered on glutInit():
*/
- atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc );
+ atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc );
assert( atom != 0 );
if( gameMode )
}
else
{
+#if !TARGET_HOST_WINCE
if ( ( ! isSubWindow ) && ( ! window->IsMenu ) )
{
/*
h += (GetSystemMetrics( SM_CYSIZEFRAME ) )*2 +
GetSystemMetrics( SM_CYCAPTION );
}
+#endif //TARGET_HOST_WINCE
if( ! fgState.Position.Use )
{
flags |= WS_POPUP;
exFlags |= WS_EX_TOOLWINDOW;
}
+#if !TARGET_HOST_WINCE
else if( window->Parent == NULL )
flags |= WS_OVERLAPPEDWINDOW;
+#endif
else
flags |= WS_CHILD;
}
+#if TARGET_HOST_WINCE
+ {
+ wchar_t* wstr = wstr_from_str(title);
+
+ window->Window.Handle = CreateWindow(
+ _T("FREEGLUT"),
+ wstr,
+ WS_VISIBLE | WS_POPUP,
+ 0,0, 240,320,
+ NULL,
+ NULL,
+ fgDisplay.Instance,
+ (LPVOID) window
+ );
+
+ free(wstr);
+
+ SHFullScreen(window->Window.Handle, SHFS_HIDESTARTICON);
+ SHFullScreen(window->Window.Handle, SHFS_HIDESIPBUTTON);
+ SHFullScreen(window->Window.Handle, SHFS_HIDETASKBAR);
+ MoveWindow(window->Window.Handle, 0, 0, 240, 320, TRUE);
+ ShowWindow(window->Window.Handle, SW_SHOW);
+ UpdateWindow(window->Window.Handle);
+ }
+#else
window->Window.Handle = CreateWindowEx(
exFlags,
"FREEGLUT",
fgDisplay.Instance,
(LPVOID) window
);
+#endif TARGET_HOST_WINCE
+
if( !( window->Window.Handle ) )
fgError( "Failed to create a window (%s)!", title );
+#if TARGET_HOST_WINCE
+ ShowWindow( window->Window.Handle, SW_SHOW );
+#else
ShowWindow( window->Window.Handle,
fgState.ForceIconic ? SW_SHOWMINIMIZED : SW_SHOW );
+#endif //TARGET_HOST_WINCE
+
UpdateWindow( window->Window.Handle );
ShowCursor( TRUE ); /* XXX Old comments say "hide cusror"! */
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* Make sure we don't close a window with current context active
XMapWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
ShowWindow( fgStructure.Window->Window.Handle, SW_SHOW );
fgStructure.Window->Window.Handle );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
ShowWindow( fgStructure.Window->Window.Handle, SW_HIDE );
fgDisplay.Screen );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
ShowWindow( fgStructure.Window->Window.Handle, SW_MINIMIZE );
SetWindowText( fgStructure.Window->Window.Handle, title );
+#elif TARGET_HOST_WINCE
+ {
+ wchar_t* wstr = wstr_from_str(title);
+
+ SetWindowText( fgStructure.Window->Window.Handle, wstr );
+
+ free(wstr);
+ }
#endif
}
}
SetWindowText( fgStructure.Window->Window.Handle, title );
+#elif TARGET_HOST_WINCE
+ {
+ wchar_t* wstr = wstr_from_str(title);
+
+ SetWindowText( fgStructure.Window->Window.Handle, wstr );
+
+ free(wstr);
+ }
#endif
}
}
x, y );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
{
RECT winRect;
XLowerWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
SetWindowPos(
fgStructure.Window->Window.Handle,
XRaiseWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
SetWindowPos(
fgStructure.Window->Window.Handle,