- Main Page
- Data Structures
- Files

- File List

# E:/DevIL/src-ILU/src/ilu_main.c

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Utility Sources
    00004 // Copyright (C) 2000-2002 by Denton Woods
    00005 // Last modified: 05/20/2001 <--Y2K Compliant! =]
    00006 //
    00007 // Filename: src-ILU/src/ilu_main.c
    00008 //
    00009 // Description: Startup functions
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #include "ilu_internal.h"
    00015 #include "ilu_states.h"
    00016 #ifdef _WIN32
    00017         #define WIN32_LEAN_AND_MEAN
    00018         #include <windows.h>
    00019 #endif//_WIN32
    00020
    00021 #ifdef _WIN32
    00022         #if (defined(IL_USE_PRAGMA_LIBS))
    00023                 #if defined(_MSC_VER) || defined(__BORLANDC__)
    00024                         #pragma comment(lib, "DevIL.lib")
    00025                 #endif
    00026         #endif
    00027 #endif
    00028
    00029 /* Only needed for MSVC++ unless extended to actually do something =) */
    00030 #if defined(_WIN32) && defined(_MSC_VER)
    00031
    00032 #ifndef IL_STATIC_LIB
    00033 BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
    00034 {
    00035         hModule;  ul_reason_for_call;  lpReserved;
    00036
    00037         if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
    00038                 //iluInit();
    00039         }
    00040
    00041         return TRUE;
    00042 }
    00043
    00044 #endif
    00045 #endif
    00046
    00047 void ILAPIENTRY iluInit()
    00048 {
    00049         // Used mostly for rotations
    00050         //IL_PI = 4 * atan(1);          // precomputed value of pi
    00051         //IL_DEGCONV = IL_PI / 180;     // division is slow on some computers
    00052
    00053         iluSetLanguage(ILU_ENGLISH);
    00054         return;
    00055 }
    00056
    00057
    00058 //#ifndef _WIN32_WCE
    00059 ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName)
    00060 {
    00061         ILuint Id;
    00062         ilGenImages(1, &Id);
    00063         if (Id == 0)
    00064                 return 0;
    00065         if (!ilLoadImage(FileName)) {
    00066                 ilDeleteImages(1, &Id);
    00067                 return 0;
    00068         }
    00069         return Id;
    00070 }
    00071 //#endif//_WIN32_WCE