mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-15 02:26:44 -04:00
Moved to git
Assembla's decision to remove Trac incited us to ditch them entirely. Further, the repository no longer includes binaries or libraries; these can be downloaded from niotso.org/pub/ and updated with the included update-libraries script.
This commit is contained in:
parent
6b0b0c1d9c
commit
227617b540
33 changed files with 368 additions and 95 deletions
|
@ -1,14 +1,14 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
project(libgldemo)
|
||||
|
||||
if(WIN32)
|
||||
set(LIBGLDEMO_SOURCES wgl.c)
|
||||
else()
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
project(libgldemo)
|
||||
|
||||
if(WIN32)
|
||||
set(LIBGLDEMO_SOURCES wgl.c)
|
||||
else()
|
||||
set(LIBGLDEMO_SOURCES glx.c)
|
||||
add_definitions(-D_POSIX_C_SOURCE=200112)
|
||||
endif()
|
||||
|
||||
add_library(libgldemo_static STATIC ${LIBGLDEMO_SOURCES})
|
||||
set_target_properties(libgldemo_static PROPERTIES
|
||||
OUTPUT_NAME "gldemo"
|
||||
add_definitions(-D_POSIX_C_SOURCE=200112)
|
||||
endif()
|
||||
|
||||
add_library(libgldemo_static STATIC ${LIBGLDEMO_SOURCES})
|
||||
set_target_properties(libgldemo_static PROPERTIES
|
||||
OUTPUT_NAME "gldemo"
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
|
|
|
@ -49,8 +49,6 @@ static void KillGLWindow()
|
|||
DestroyWindow(hWnd);
|
||||
hWnd = NULL;
|
||||
}
|
||||
|
||||
UnregisterClass("OpenGL", hInst);
|
||||
}
|
||||
|
||||
static int CreateGLWindow(const char *__restrict title, uint16_t width, uint16_t height)
|
||||
|
@ -71,7 +69,6 @@ static int CreateGLWindow(const char *__restrict title, uint16_t width, uint16_t
|
|||
0, /* Reserved */
|
||||
0, 0, 0 /* Masks */
|
||||
};
|
||||
DEVMODE dm;
|
||||
DWORD dwStyle, dwExStyle;
|
||||
RECT WindowRect;
|
||||
int PixelFormat;
|
||||
|
@ -79,10 +76,11 @@ static int CreateGLWindow(const char *__restrict title, uint16_t width, uint16_t
|
|||
int (WINAPI *wglGetSwapIntervalEXT)(void);
|
||||
|
||||
if(fullscreen){
|
||||
width = dm.dmPelsWidth;
|
||||
height = dm.dmPelsHeight;
|
||||
dwExStyle = WS_EX_APPWINDOW | WS_EX_TOPMOST;
|
||||
dwStyle = WS_POPUP;
|
||||
|
||||
width = ResWidth;
|
||||
height = ResHeight;
|
||||
ShowCursor(0);
|
||||
}else{
|
||||
dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
||||
|
@ -227,7 +225,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
wc.hInstance = hInst = hInstance;
|
||||
wc.hIcon = (HICON) LoadImage(NULL, IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_SHARED);
|
||||
wc.hCursor = (HCURSOR) LoadImage(NULL, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_SHARED | LR_DEFAULTSIZE);
|
||||
hInstance = GetModuleHandle(NULL);
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);
|
||||
ResWidth = dm.dmPelsWidth;
|
||||
ResHeight = dm.dmPelsHeight;
|
||||
|
@ -259,6 +256,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
|
||||
if(msg.message == WM_QUIT){
|
||||
KillGLWindow();
|
||||
UnregisterClass("OpenGL", hInstance);
|
||||
return (!Demo.Shutdown || Demo.Shutdown()) ? 0 : -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue