projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moving the platform-specific FBConfig and device context variables into platform...
[freeglut]
/
src
/
mswin
/
freeglut_init_mswin.c
diff --git
a/src/mswin/freeglut_init_mswin.c
b/src/mswin/freeglut_init_mswin.c
index
1777ebd
..
9792632
100644
(file)
--- a/
src/mswin/freeglut_init_mswin.c
+++ b/
src/mswin/freeglut_init_mswin.c
@@
-26,7
+26,12
@@
*/
\r
\r
#include <GL/freeglut.h>
\r
*/
\r
\r
#include <GL/freeglut.h>
\r
-#include "freeglut_internal_mswin.h"
\r
+#include "../Common/freeglut_internal.h"
\r
+
\r
+
\r
+
\r
+extern LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg,
\r
+ WPARAM wParam, LPARAM lParam );
\r
\r
\r
/*
\r
\r
\r
/*
\r
@@
-38,9
+43,9
@@
void fgPlatformInitialize( const char* displayName )
ATOM atom;
\r
\r
/* What we need to do is to initialize the fgDisplay global structure here. */
\r
ATOM atom;
\r
\r
/* What we need to do is to initialize the fgDisplay global structure here. */
\r
- fgDisplay.Instance = GetModuleHandle( NULL );
\r
- fgDisplay.DisplayName= displayName ? strdup(displayName) : 0 ;
\r
- atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc );
\r
+ fgDisplay.pDisplay.Instance = GetModuleHandle( NULL );
\r
+ fgDisplay.pDisplay.DisplayName= displayName ? strdup(displayName) : 0 ;
\r
+ atom = GetClassInfo( fgDisplay.pDisplay.Instance, _T("FREEGLUT"), &wc );
\r
\r
if( atom == 0 )
\r
{
\r
\r
if( atom == 0 )
\r
{
\r
@@
-57,8
+62,8
@@
void fgPlatformInitialize( const char* displayName )
wc.lpfnWndProc = fgPlatformWindowProc;
\r
wc.cbClsExtra = 0;
\r
wc.cbWndExtra = 0;
\r
wc.lpfnWndProc = fgPlatformWindowProc;
\r
wc.cbClsExtra = 0;
\r
wc.cbWndExtra = 0;
\r
- wc.hInstance = fgDisplay.Instance;
\r
- wc.hIcon = LoadIcon( fgDisplay.Instance, _T("GLUT_ICON") );
\r
+ wc.hInstance = fgDisplay.pDisplay.Instance;
\r
+ wc.hIcon = LoadIcon( fgDisplay.pDisplay.Instance, _T("GLUT_ICON") );
\r
\r
#if defined(_WIN32_WCE)
\r
wc.style = CS_HREDRAW | CS_VREDRAW;
\r
\r
#if defined(_WIN32_WCE)
\r
wc.style = CS_HREDRAW | CS_VREDRAW;
\r
@@
-92,9
+97,9
@@
void fgPlatformInitialize( const char* displayName )
ReleaseDC( desktop, context );
\r
}
\r
/* If we have a DisplayName try to use it for metrics */
\r
ReleaseDC( desktop, context );
\r
}
\r
/* If we have a DisplayName try to use it for metrics */
\r
- if( fgDisplay.DisplayName )
\r
+ if( fgDisplay.pDisplay.DisplayName )
\r
{
\r
{
\r
- HDC context = CreateDC(fgDisplay.DisplayName,0,0,0);
\r
+ HDC context = CreateDC(fgDisplay.pDisplay.DisplayName,0,0,0);
\r
if( context )
\r
{
\r
fgDisplay.ScreenWidth = GetDeviceCaps( context, HORZRES );
\r
if( context )
\r
{
\r
fgDisplay.ScreenWidth = GetDeviceCaps( context, HORZRES );
\r
@@
-142,10
+147,10
@@
void fgPlatformDeinitialiseInputDevices ( void )
\r
void fgPlatformCloseDisplay ( void )
\r
{
\r
\r
void fgPlatformCloseDisplay ( void )
\r
{
\r
- if( fgDisplay.DisplayName )
\r
+ if( fgDisplay.pDisplay.DisplayName )
\r
{
\r
{
\r
- free( fgDisplay.DisplayName );
\r
- fgDisplay.DisplayName = NULL;
\r
+ free( fgDisplay.pDisplay.DisplayName );
\r
+ fgDisplay.pDisplay.DisplayName = NULL;
\r
}
\r
\r
/* Reset the timer granularity */
\r
}
\r
\r
/* Reset the timer granularity */
\r