Changeset 31

Show
Ignore:
Timestamp:
07/21/04 10:52:09 (4 years ago)
Author:
aldacron
Message:

* changed the names of the load functions for each package to <PackageName?>_Load()
* modified the makefiles to create object output subdirectories for each package when building, and to delete them when using make clean or cleanall
* updated the readme files and corrected some mistakes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictGL/Makefile

    r20 r31  
    55 
    66DFLAGS = -v 
    7 LIBFLAGS = -c        
     7LIBFLAGS = -c -n       
    88DINC = -I$(SRC.DIR) 
    99 
     
    1111OGL.SRC = \ 
    1212    $(OGL.SRC.DIR)\gl.d \ 
    13     $(OGL.SRC.DIR)\gltypes.d \ 
     13    $(OGL.SRC.DIR)\gltypes.d 
     14     
     15GLEE.SRC.DIR = $(SRC.DIR) 
     16GLEE.SRC = \ 
    1417    $(SRC.DIR)\glee.d \ 
    1518    $(SRC.DIR)\glConstants.d 
     
    1821OGL.OBJ = \ 
    1922    $(OGL.OBJ.DIR)\gl.obj \ 
    20     $(OGL.OBJ.DIR)\gltypes.obj \ 
     23    $(OGL.OBJ.DIR)\gltypes.obj 
     24     
     25GLEE.OBJ.DIR = $(OBJ.DIR)\glee 
     26GLEE.OBJ = \ 
    2127    $(OGL.OBJ.DIR)\glee.obj \ 
    2228    $(OGL.OBJ.DIR)\glConstants.obj  
     
    2632DEFAULT: lib 
    2733     
    28 clean: 
    29     del $(OGL.OBJ.DIR)\*.obj 
     34clean_globj: 
     35    @rd /S /Q $(OGL.OBJ.DIR) 
     36     
     37clean_gleeobj: 
     38    @rd /S /Q $(GLEE.OBJ.DIR) 
     39     
     40clean_lib: 
     41    @del $(OGL.LIB).lib 
    3042 
    31 cleanall: 
    32     del $(OGL.OBJ.DIR)\*.obj 
    33     del $(OGL.LIB).lib 
    34     del $(OGL.LIB).bak  
     43clean: clean_globj clean_gleeobj     
    3544 
    36 lib: 
    37     dmd $(OGL.SRC) -c $(DFLAGS) $(DINC) -od$(OGL.OBJ.DIR) 
     45cleanall: clean clean_lib 
     46     
     47gl: 
     48    @md $(OGL.OBJ.DIR) 
     49    dmd $(OGL.SRC) -c $(DFLAGS) $(DINC) -od$(OGL.OBJ.DIR) 
     50     
     51glee: 
     52    @md $(GLEE.OBJ.DIR) 
     53    dmd $(GLEE.SRC) -c $(DFLAGS) $(DINC) -od$(OGL.OBJ.DIR) 
     54 
     55lib_gl: 
    3856    lib $(LIBFLAGS) $(OGL.LIB).lib $(OGL.OBJ) 
     57     
     58lib_glglee: 
     59    lib $(LIBFLAGS) $(OGL.LIB).lib $(OGL.OBJ) $(GLEE.OBJ) 
     60     
     61lib: gl glee lib_glglee 
    3962 
     63lib_noglee: gl lib_gl 
     64 
  • trunk/DerelictGL/README

    r20 r31  
    2929 
    3030In your code, you need to import the derelict.opengl.gl module. To make use 
    31 of extensions, import glee; 
     31of GLEE extensions, import glee; 
    3232 
    3333++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
     
    3838++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    3939 
    40 During initialization of your application, you need to make a call to 
    41 dglLoad. This will load the shared library, platform-specific core gl functions 
     40Before calling any OpenGL functions, you need to make a call to DerelictGL_Load.  
     41This will load the shared library, platform-specific core gl functions 
    4242(such as the wgl* functions on Windows), and all core GL 1.1 functions. If 
    4343you only require OpenGL 1.1, then you are finished initializing DerelictGL and 
    4444can go on about your business. 
    4545 
    46 If you require the functionality of OpenGL 1.2+ or any extensions, then you'll 
    47 need to make a call to GLeeInit. The catch is that you must first create 
    48 and activate an OpenGL context (if you aren't sure what I'm talking about, take 
    49 a gander at the nehe.gamedev.net OpenGL tutorials). OpenGL requires that a GL 
    50 context be active before querying for extensions. This is why dglLoad only loads 
    51 the core 1.1 functions. Once your context is activated, calling GLeeInit 
    52 will load all available core OpenGL 1.5 functions as well as all available 
    53 extensions. 
     46If you wish to use GLee, then you'll need to make a call to GLeeInit. The catch  
     47is that you must first create and activate an OpenGL context (if you aren't sure 
     48what I'm talking about, take a gander at the nehe.gamedev.net OpenGL tutorials). 
     49OpenGL requires that a GL context be active before querying for extensions. This 
     50is why DerelictGL_Load only loads the core 1.1 functions. Once your context is  
     51activated, calling GLeeInit will load all available core OpenGL 1.5 functions as 
     52well as all available extensions. 
     53 
     54Additionally, the use of GLee requires that you link to the C library GLee.lib 
     55found in <derelict_dir>\DerelictGL\glee_dist\cbuild. GLee is a static library, 
     56and not a DLL. 
     57 
     58If you prefer lionking to DerelictGL without including GLee, you can either include 
     59GL.d and GL.obj on your project's build path, or make the DerelictGL library with 
     60the command 'make lib_noglee' (see BUILDING below). You will then have to setup 
     61and load any extensions manually. 
    5462 
    5563++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    5664 
    5765// load the shared library and Core 1.1 functions via DerelictGL 
    58 dglLoad(); 
     66DerelictGL_Load(); 
    5967 
    6068// app-specific code to init an OpenGL context goes here 
     
    103111such as the vendor string) you can use glGetString as normal. Note, however, that 
    104112GLee provides some convenience functions which can be used to get standard and 
    105 platform-specific extension, as well as error, strings: 
     113platform-specific extensions, as well as error, strings: 
    106114 
    107115GLeeGetExtStrGL(); 
     
    118126 
    1191271) ensure that both dmd\bin and dm\bin are on your path 
    120 2) from a command prompt, cd to <derelict_dir>\src\derelict\opengl 
    121 3) type 'make' or 'make lib' to build derelictGL.lib     
     1282) from a command prompt, cd to <derelict_dir>\DerelictGL 
     1293) type 'make' or 'make lib' to build derelictGL.lib with GLee 
     130   optionally type 'make lib_noglee' to build derelictGL.lib without GLee     
    1221314) optionally type 'make clean' to delete all object files OR 
    123    optionally type 'make cleanall' to delete all object, lib and bak files 
    124 5) run go.bat to build the C library glee.lib - this only need be done once but 
    125   is required to make use of GLee. 
     132   optionally type 'make cleanall' to delete all object and lib files 
     1335) optionally run <derelict_dir>\DerelictGL\glee_dist\cbuild\go.bat to build the 
     134C library GLee.lib - this only need be done once but is required to make use of GLee. 
    126135 
  • trunk/DerelictGL/derelict/opengl/gl.d

    r20 r31  
    205205* Loads all core GL 1.0 & 1.1 functions 
    206206*/ 
    207 private void loadGL() 
     207private void DerelictGL_Load() 
    208208{ 
    209209    // gl 1.0 
  • trunk/DerelictGLU/Makefile

    r20 r31  
    66 
    77DFLAGS = -v 
    8 LIBFLAGS = -c        
     8LIBFLAGS = -c -n        
    99DINC = -I$(SRC.DIR) -I$(OGL.SRC.DIR) 
    1010 
     
    2121DEFAULT: lib 
    2222 
    23 clean
    24     del $(GLU.OBJ.DIR)\*.obj 
     23clean_obj
     24    @rd /S /Q $(GLU.OBJ.DIR) 
    2525     
    26 cleanall: 
    27     del $(GLU.OBJ.DIR)\*.obj 
    28     del $(GLU.LIB).lib 
    29     del $(GLU.LIB).bak 
     26clean_lib: 
     27    @del $(GLU.LIB).lib 
     28     
     29clean: clean_obj 
     30     
     31cleanall: clean clean_lib    
    3032     
    3133lib: 
     34    @md $(GLU.OBJ.DIR) 
    3235    dmd $(GLU.SRC) -c $(DFLAGS) $(DINC) -od$(GLU.OBJ.DIR) 
    3336    lib $(LIBFLAGS) $(GLU.LIB).lib $(GLU.OBJ) 
  • trunk/DerelictGLU/README

    r23 r31  
    2727++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    2828 
    29 During initialization of your application, you need to make a call to 
    30 dgluLoad. This will load the shared library. 
     29Before you attemtp to call any GLU functions, you need to make a call to 
     30DerelictGLU_Load. This will load the shared library. 
    3131 
    3232++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    3333 
    34 // load the shared library 
    35 dgluLoad(); 
     34// load the shared library - the try...catch block is optional of course 
     35try 
     36
     37   DerelictGLU_Load(); 
     38
     39catch(Exception e) 
     40
     41   ... 
     42
    3643 
    3744++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
     
    4754 
    48551) ensure that both dmd\bin and dm\bin are on your path 
    49 2) from a command prompt, cd to <derelict_dir>\src\derelict\glu 
     562) from a command prompt, cd to <derelict_dir>\DerelictGLU 
    50573) type 'make' or 'make lib' to build derelictGLU.lib     
    51584) optionally type 'make clean' to delete all object files OR 
    52    optionally type 'make cleanall' to delete all object, lib and bak files 
     59   optionally type 'make cleanall' to delete all object, and lib files 
  • trunk/DerelictGLU/derelict/glu/glu.d

    r20 r31  
    4747} 
    4848 
    49 public void dgluLoad() 
     49public void DerelictGLU_Load() 
    5050{ 
    5151    if(hglu !== null) 
  • trunk/DerelictSDL/Makefile

    r20 r31  
    55 
    66DFLAGS = -v 
    7 LIBFLAGS = -c        
     7LIBFLAGS = -c -n       
    88DINC = -I$(SRC.DIR) 
    99 
     
    6262DEFAULT: lib 
    6363     
    64 clean
    65     del $(SDL.OBJ.DIR)\*.obj 
     64clean_obj
     65    @rd /S /Q $(SDL.OBJ.DIR) 
    6666 
    67 cleanall: 
    68     del $(SDL.OBJ.DIR)\*.obj 
    69     del $(SDL.LIB).lib 
    70     del $(SDL.LIB).bak  
     67clean_lib: 
     68    @del $(SDL.LIB).lib 
     69     
     70clean: clean_obj 
     71 
     72cleanall: clean clean_lib 
    7173 
    7274lib: 
     75    @md $(SDL.OBJ.DIR) 
    7376    dmd $(SDL.SRC) -c $(DFLAGS) $(DINC) -od$(SDL.OBJ.DIR) 
    7477    lib $(LIBFLAGS) $(SDL.LIB).lib $(SDL.OBJ) 
  • trunk/DerelictSDL/README

    r23 r31  
    3535++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    3636 
    37 During initialization of your application, you need to make a call to 
    38 DSDL_Load. This will load the shared library. 
     37Before calling any SDL functions, you need to make a call to DerelictSDL_Load.  
     38This will load the shared library. 
    3939 
    4040++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    4141 
    42 // load the shared library 
    43 DSDL_Load(); 
     42// load the shared library - the try...catch block is optional of course 
     43try 
     44
     45   DerelictSDL_Load(); 
     46
     47catch(Exception e) 
     48
     49   ... 
     50
    4451 
    4552++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    4653 
    47 From that point you can call SDL functions as normal. 
     54From that point you can call SDL functions as normal. Don't forget to make sure 
     55that SDL.dll is on the path. 
    4856 
    4957-------------------------------------------------------------------------------- 
     
    5462 
    55631) ensure that both dmd\bin and dm\bin are on your path 
    56 2) from a command prompt, cd to <derelict_dir>\src\derelict\sdl 
     642) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    57653) type 'make' or 'make lib' to build derelictSDL.lib     
    58664) optionally type 'make clean' to delete all object files OR 
    59    optionally type 'make cleanall' to delete all object, lib and bak files 
     67   optionally type 'make cleanall' to delete all object and lib files 
  • trunk/DerelictSDL/derelict/sdl/sdl.d

    r20 r31  
    5757} 
    5858 
    59 public void DSDL_Load() 
     59public void DerelictSDL_Load() 
    6060{ 
    6161    if(hsdl !== null)