glOOP.cpp
资源名称:gloop.zip [点击查看]
上传用户:shxiangxiu
上传日期:2007-01-03
资源大小:1101k
文件大小:2k
源码类别:
OpenGL
开发平台:
Visual C++
- /////////////////////////////////////////////////////////////////////////////
- // glOOP.cpp : Defines the initialization routines for the DLL.
- //
- // glOOP (OpenGL Object Oriented Programming library)
- // Copyright (c) Craig Fahrnbach 1997, 1998
- //
- // OpenGL is a registered trademark of Silicon Graphics
- //
- //
- // This program is provided for educational and personal use only and
- // is provided without guarantee or warrantee expressed or implied.
- //
- // Commercial use is strickly prohibited without written permission
- // from ImageWare Development.
- //
- // This program is -not- in the public domain.
- //
- /////////////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include <afxdllx.h>
- #include "glOOP.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- static AFX_EXTENSION_MODULE MyglOOPDLL = { NULL, NULL };
- //////////////////////////////////////////////////////////////////
- // Declare our exported global variables
- __declspec( dllexport ) C3dEngine the3dEngine; // Our OpenGL engine
- //////////////////////////////////////////////////////////////////
- // Declare our DLL global variables
- C3dMaterialList* pMatlList; // A material list pointer to
- // use during file load
- CString szIndent = _T(""); // Object indent used for serialization
- extern "C" int APIENTRY
- DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
- {
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- TRACE0("glOOP.DLL Initializing!n");
- // Extension DLL one-time initialization
- AfxInitExtensionModule(MyglOOPDLL, hInstance);
- // Insert this DLL into the resource chain
- new CDynLinkLibrary(MyglOOPDLL);
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- {
- TRACE0("glOOP.DLL Terminating!n");
- }
- return 1; // ok
- }