• opengl.h


    #ifndef _GM_OPENGL_
    #define _GM_OPENGL_
    #include <windows.h>        // Header File For Windows
    #include <glgl.h>          // Header File For The OpenGL32 Library
    #include <glglu.h>         // Header File For The GLu32 Librar
    #include <glglaux.h>       // Header File For The GLAUX Librar
    
    #pragma comment(lib,"OpenGL32.lib")
    #pragma comment(lib,"GLu32.lib")
    #pragma comment(lib,"GLAUX.lib")
    
    #endif
    
    #ifdef glDG
    #include <strsafe.h>
    #include <windows.h>
    
    void ErrorExit() 
    { 
        // Retrieve the system error message for the last-error code
    
        LPVOID lpMsgBuf;
        LPVOID lpDisplayBuf;
        DWORD dw = GetLastError(); 
    
        FormatMessage(
            FORMAT_MESSAGE_ALLOCATE_BUFFER | 
            FORMAT_MESSAGE_FROM_SYSTEM |
            FORMAT_MESSAGE_IGNORE_INSERTS,
            NULL,
            dw,
            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
            (LPTSTR) &lpMsgBuf,
            0, NULL );
    
        // Display the error message and exit the process
    
        lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT, 
            (lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)"fun") + 40) * sizeof(TCHAR)); 
        StringCchPrintf((LPTSTR)lpDisplayBuf, 
            LocalSize(lpDisplayBuf) / sizeof(TCHAR),
            TEXT("%s failed with error %d: %s"), 
            "fun", dw, lpMsgBuf); 
        MessageBox(NULL, (LPCTSTR)lpDisplayBuf, TEXT("Error"), MB_OK); 
    
        LocalFree(lpMsgBuf);
        LocalFree(lpDisplayBuf);
        ExitProcess(dw); 
    }
    #endif
  • 相关阅读:
    bzoj 1016 JSOI2008 最小生成树计数
    bzoj 1070 SCOI2007 修车
    bzoj 1042 HAOI2008 硬币购物
    bzoj 1132 POI2008 Tro
    bzoj 1227 SDOI2009 虔诚的墓主人
    bzoj 1024 SCOI2009 生日快乐
    1103 POI2007 大都市meg
    bzoj 1009:[HNOI2008]GT考试
    noip2006T1 能量项链
    bzoj 1006: [HNOI2008]神奇的国度
  • 原文地址:https://www.cnblogs.com/laohaozi/p/8266590.html
Copyright © 2020-2023  润新知