• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

man/H03-May-2022-958829

sage/H03-May-2022-16,36014,348

templates/H03-May-2022-351296

AUTHORSH A D03-Feb-200340 21

COPYINGH A D03-Feb-200325.8 KiB505418

ChangeLogH A D13-Dec-20068.4 KiB219147

INSTALLH A D11-Apr-20069.3 KiB237179

Makefile.amH A D22-Sep-2005145 74

Makefile.inH A D03-May-202221.1 KiB691613

NEWSH A D13-Dec-2006520 106

READMEH A D27-Jul-20062.1 KiB2313

TODOH A D18-Oct-200529 21

aclocal.m4H A D31-Oct-2006261.7 KiB7,4326,673

autogen.shH A D29-Nov-2004710 4729

build_sage.plH A D29-Aug-20068.5 KiB246150

compileH A D11-Apr-20063.6 KiB14379

config.guessH A D12-Feb-200641.1 KiB1,4121,215

config.h.inH A D31-Oct-20061.5 KiB5939

config.subH A D12-Feb-200629.5 KiB1,5011,360

configureH A D03-May-2022751.6 KiB23,52418,968

configure.acH A D12-Jul-20062.4 KiB137112

depcompH A D11-Apr-200615.6 KiB531330

install-shH A D11-Apr-20069 KiB324189

ltmain.shH A D12-Feb-2006191.8 KiB6,8645,416

missingH A D11-Apr-200610.8 KiB361268

sage.pcH A D31-Oct-2006234 1210

sage.pc.inH A D04-Dec-2003240 1210

sage.specH A D31-Oct-20061.7 KiB7762

sage.spec.inH A D12-Jul-20061.7 KiB7762

README

1Sage is an OpenGL extension library written to make use of SDL's mechanism for enabling OpenGL's extensions.
2
3
4Usage
5-----
6To use this, make sure you include <sage/sage.h> before you include glext.h as sage uses a custom version of this file interally.
7
8To use opengl extensions, call sage_init();
9This should ideally be called everytime a context is created.
10
11To check if an extension is supported, query the array, sage_ext[EXT] where EXT is the upper case version of the extension, e.g. GL_ARB_MULTITEXTURE. This will return 1 if supported, 0 otherwise.
12
13You can then call functions either like glActiveTextureARB or as SAGE_glActiveTextureARB. The SAGE_ version uses function pointers to access the function. The first method will use the actual function if GL_ARB_MULTITEXTURE has already been defined otherwise it is a #define to the SAGE_ form.
14As there is a slight overhead in using a function pointer, the glActiveTextureARB form should be faster on platforms where it is possible to use it. However #defines are configured based on the Open GL header available at the time of compiling the client application (or library) that uses sage. This means that if you compile using an Open GL header file defining Open GL 1.5 functions, you may find that when you run the program on a driver that only supports 1.3 or 1.4 functions that it will crash as the 1.5 functions do not exist.
15
16When compiling and running on the same machine, this should not be a problem. If you then distribute the compiled binary, then this may become a problem. To alleviate this problem, you should use the SAGE_ form of the function declarations, or make sure you use the extension form of the functions. (e.g. glActiveTextureARB instead of glActiveTexture). A final suggestion is to make sure your open gl headers define the version of open gl your are targeting as the minimum for your distribution.
17
18
19Source file generation
20-----------------------
21
22If you want to update sage with a newer glext.h, then place glext.h into the top level sage dir, and run build_sage.pl. This will then generate the required source files.
23