Changeset 2699 for trunk/src/opengl


Ignore:
Timestamp:
Feb 9, 2000, 2:44:32 PM (26 years ago)
Author:
sandervl
Message:

added version resources + removed/rewrote exitlist handlers

Location:
trunk/src/opengl
Files:
3 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/glu/makefile

    r2692 r2699  
    1 # $Id: makefile,v 1.3 2000-02-09 12:08:31 bird Exp $
     1# $Id: makefile,v 1.4 2000-02-09 13:44:32 sandervl Exp $
    22#
    33# PD-Win32
     
    3333
    3434SOURCES = \
    35   initterm.cpp \
    3635  nurbs\interface\bezierEval.cpp \
    3736  nurbs\interface\bezierPatch.cpp \
     
    223222
    224223OBJS = \
    225   initterm.obj \
     224  $(PDWIN32_LIB)/dllentry.obj \
     225  resource.obj \
    226226  nurbs\interface\bezierEval.obj \
    227227  nurbs\interface\bezierPatch.obj \
     
    314314  util\registry.obj
    315315
    316 $(TARGET).DLL: $(SOURCES) initterm.obj $(TARGET).lrf $(TARGET).def
     316$(TARGET).DLL: $(SOURCES) resource.obj $(TARGET).lrf $(TARGET).def
    317317    cd util
    318318    $(MAKE_CMD)
     
    344344        $(IMPDEF) $** $@
    345345
     346resource.asm: $(TARGET).rc
     347    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     348
     349resource.obj: resource.asm
     350
    346351clean:
    347         $(RM) *.obj *.dll *.lib *.lrf
     352        $(RM) *.obj *.dll *.lib *.lrf *exp.def resource.asm
    348353        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    349354        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • trunk/src/opengl/glut/Makefile

    r2692 r2699  
    1 # $Id: Makefile,v 1.3 2000-02-09 12:08:32 bird Exp $
     1# $Id: Makefile,v 1.4 2000-02-09 13:44:32 sandervl Exp $
    22#
    33# PD-Win32 API
     
    3939       glut_tr24.obj glut_util.obj glut_vidresize.obj glut_warp.obj glut_win.obj \
    4040       glut_winmisc.obj win32_glx.obj win32_menu.obj win32_util.obj win32_winproc.obj \
    41        win32_x11.obj initterm.obj glut_term.obj
     41       win32_x11.obj glut_term.obj $(PDWIN32_LIB)/dllentry.obj resource.obj
    4242
    4343all     : $(TARGET).DLL
     
    5353$(TARGET)exp.def: $(TARGET).def
    5454        $(IMPDEF) $** $@
     55
     56resource.asm: $(TARGET).rc
     57    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     58
     59resource.obj: resource.asm
    5560
    5661win32_glx.obj: win32_glx.c os2_glx.h
     
    111116$(PDWIN32_LIB)\WINMM.LIB
    112117$(PDWIN32_LIB)\KERNEL32.LIB
    113 $(PDWIN32_LIB)\PMWINX.LIB
    114118$(PDWIN32_LIB)\GDI32.LIB
    115119$(PDWIN32_LIB)\USER32.LIB
    116 $(PDWIN32_LIB)\OPENGL32.LIB
    117120$(PDWIN32_LIB)\GLU32.LIB
    118121$(PDWIN32_LIB)\OPENGL32.LIB
     
    122125
    123126clean:
    124         $(RM) *.obj *.lib *.dll *.map *.lrf
     127        $(RM) *.obj *.lib *.dll *.map *.lrf *exp.def resource.asm
    125128        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    126129        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • trunk/src/opengl/initterm.cpp

    r2595 r2699  
    1 /* $Id: initterm.cpp,v 1.2 2000-02-01 19:41:55 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.3 2000-02-09 13:44:30 sandervl Exp $ */
    22
    33/*
     
    3333#include <odin.h>
    3434#include <win32type.h>
     35#include <winconst.h>
    3536#include <odinlx.h>
    3637#include <misc.h>                      /* PLF Wed  98-03-18 23:18:15       */
     
    4142void CDECL _ctordtorInit( void );
    4243void CDECL _ctordtorTerm( void );
     44
     45 //Win32 resource table (produced by wrc)
     46 extern DWORD _Resource_PEResTab;
    4347}
    4448
    45 /*-------------------------------------------------------------------*/
    46 /* A clean up routine registered with DosExitList must be used if    */
    47 /* runtime calls are required and the runtime is dynamically linked. */
    48 /* This will guarantee that this clean up routine is run before the  */
    49 /* library DLL is terminated.                                        */
    50 /*-------------------------------------------------------------------*/
    51 static void APIENTRY cleanup(ULONG reason);
     49//******************************************************************************
     50//******************************************************************************
     51BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     52{
     53   switch (fdwReason)
     54   {
     55   case DLL_PROCESS_ATTACH:
     56        mod_init();
     57        return TRUE;
    5258
     59   case DLL_THREAD_ATTACH:
     60   case DLL_THREAD_DETACH:
     61        return TRUE;
    5362
     63   case DLL_PROCESS_DETACH:
     64        mod_cleanup();
     65        _ctordtorTerm();
     66        return TRUE;
     67   }
     68   return FALSE;
     69}
    5470/****************************************************************************/
    5571/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8399         /*******************************************************************/
    84100
    85          if(RegisterLxDll(hModule, 0, 0) == FALSE)
     101         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    86102                return 0UL;
    87103
    88          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    89          if(rc)
    90                 return 0UL;
    91 
    92          mod_init();
    93104         break;
    94105
     
    106117   return 1UL;
    107118}
    108 
    109 
    110 static void APIENTRY cleanup(ULONG ulReason)
    111 {
    112    mod_cleanup();
    113 
    114    _ctordtorTerm();
    115 
    116    DosExitList(EXLST_EXIT, cleanup);
    117 
    118    return ;
    119 }
  • trunk/src/opengl/makefile

    r2692 r2699  
    1 # $Id: makefile,v 1.4 2000-02-09 12:08:31 bird Exp $
     1# $Id: makefile,v 1.5 2000-02-09 13:44:31 sandervl Exp $
    22#
    33# PD-Win32 API
     
    3535TARGET3 = glut\glut32
    3636
    37 OBJS1=  opengl32.obj initterm.obj
     37OBJS1=  opengl32.obj initterm.obj resource.obj
    3838
    3939all: $(TARGET1).dll $(TARGET1).lib \
     
    4343$(TARGET1).dll: $(OBJS1) $(TARGET1).def
    4444        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS1) $(TARGET1).def \
    45               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     45              $(PDWIN32_LIB)/gdi32.lib $(PDWIN32_LIB)/kernel32.lib \
    4646              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    4747              OS2386.LIB $(RTLLIB_O)
     
    5555$(TARGET1)exp.def: $(TARGET1).def
    5656        $(IMPDEF) $** $@
     57
     58resource.asm: $(TARGET1).rc
     59    $(RC) $(RCFLAGS) -o resource.asm $(TARGET1).rc
     60
     61resource.obj: resource.asm
    5762
    5863$(TARGET2).dll:
     
    7075
    7176clean:
    72         $(RM) *.obj *.lib *.dll *.map
     77        $(RM) *.obj *.lib *.dll *.map resource.asm *exp.def
    7378        $(RM) $(PDWIN32_BIN)\$(TARGET1).dll
    7479        $(RM) $(PDWIN32_LIB)\$(TARGET1).lib
  • trunk/src/opengl/opengl32.def

    r2689 r2699  
    1 ;/* $Id: opengl32.def,v 1.4 2000-02-09 08:50:54 jeroen Exp $ */
     1;/* $Id: opengl32.def,v 1.5 2000-02-09 13:44:31 sandervl Exp $ */
    22LIBRARY OPENGL32 INITINSTANCE
    33
     
    55
    66IMPORTS
    7    GetPixelFormat=GDI32.GetPixelFormat
    8    DescribePixelFormat=GDI32.DescribePixelFormat
    9    ChoosePixelFormat=GDI32.ChoosePixelFormat
    10    SetPixelFormat=GDI32.SetPixelFormat
    11    SwapBuffers=GDI32.SwapBuffers
    127   OS2glAccum=OPENGL.glAccum
    138   OS2glAlphaFunc=OPENGL.glAlphaFunc
     
    369364
    370365EXPORTS
    371    GetPixelFormat
    372    SetPixelFormat
    373    ChoosePixelFormat
    374    DescribePixelFormat
    375    SwapBuffers
     366   GetPixelFormat            = _GetPixelFormat@4
     367   SetPixelFormat            = _SetPixelFormat@12
     368   ChoosePixelFormat         = _ChoosePixelFormat@8
     369   DescribePixelFormat       = _DescribePixelFormat@16
     370   SwapBuffers               = _SwapBuffers@4
     371
    376372; NOTE: The Glmf** functions are NT specific. The are used to generate an
    377373; enhanced meta-file in which OpenGL commands are stored.
Note: See TracChangeset for help on using the changeset viewer.