-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathw32_entrypoint.cpp
69 lines (50 loc) · 1.34 KB
/
w32_entrypoint.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/***********************************************
* $author: javery
* $date : 27 Oct 01
* $descp : prorgram entry point
* $path : C:\Program Files\Microsoft Visual Studio\MyProjects\KaosDemoEngine\w32_entrypoint.cpp
* $ver : 0.0.0
***********************************************/
#include "required.h"
#include "model.h"
#include "import_geo.h"
#include "import_3ds.h"
int WINAPI WinMain( HINSTANCE hInstance , HINSTANCE hPrevInstance , LPSTR lpCmdLineArgs , int iWinArg )
{
WndStruct w; w.xDimension = 300,w.yDimension=300;w.hInstance = hInstance;
MSG m;
OpenGL_Struct ogl;
k_boolean complete=k_false;
ogl.contextDepth = 16;
ogl.contextPitch = 640;
ogl.fullScreen = k_false;
ogl.yResolution = 480;
SYS_OGL_CreateContext(&ogl,&w);
Model_t debugMe1;//,debugMe2;
IG_3DS_LoadObject( &debugMe1 , "working.3ds" );
/* while( complete==k_false )
{
if( PeekMessage( &m , w.hWnd , 0 , 0 , PM_REMOVE) )
{
if( m.message == WM_QUIT || m.message == WM_CLOSE || m.message == WM_DESTROY )
{
PostQuitMessage( 0 );
complete = k_true;
}
else
{
TranslateMessage( &m );
DispatchMessage( &m );
}
}
else
{
SYS_OGL_PrepFrame();
glLoadIdentity();
// debugMe2.Renderer( &debugMe1 );
SwapBuffers( ogl.hDeviceContext );
}
}*/
SYS_OGL_KillContext( &ogl , &w );
return m.wParam;
}