forgot to delete old ones

svn path=/trunk/; revision=21026
This commit is contained in:
Ged Murphy
2006-02-17 00:04:52 +00:00
parent 0443356e34
commit 85a9eb08a3
714 changed files with 0 additions and 357373 deletions
-19
View File
@@ -1,19 +0,0 @@
; File generated automatically from lzexpand/lz32.spec; do not edit!
LIBRARY lz32.dll
EXPORTS
CopyLZFile@8=KERNEL32.CopyLZFile
GetExpandedNameA@8=KERNEL32.GetExpandedNameA
GetExpandedNameW@8=KERNEL32.GetExpandedNameW
LZClose@4=KERNEL32.LZClose
;LZCloseFile
LZCopy@8=KERNEL32.LZCopy
;LZCreateFileW
LZDone@0=KERNEL32.LZDone
LZInit@4=KERNEL32.LZInit
LZOpenFileA@12=KERNEL32.LZOpenFileA
LZOpenFileW@12=KERNEL32.LZOpenFileW
LZRead@12=KERNEL32.LZRead
LZSeek@12=KERNEL32.LZSeek
LZStart@0=KERNEL32.LZStart
-5
View File
@@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Lempel-Ziv Expander\0"
#define REACTOS_STR_INTERNAL_NAME "lz32\0"
#define REACTOS_STR_ORIGINAL_FILENAME "lz32.dll\0"
#include <reactos/version.rc>
-10
View File
@@ -1,10 +0,0 @@
<module name="lz32" type="win32dll" baseaddress="${BASEADDRESS_LZ32}" installbase="system32" installname="lz32.dll">
<importlibrary definition="lz32.def" />
<include base="lz32">.</include>
<define name="_DISABLE_TIDENTS" />
<define name="__USE_W32API" />
<library>ntdll</library>
<library>kernel32</library>
<file>lzexpand_main.c</file>
<file>lz32.rc</file>
</module>
-29
View File
@@ -1,29 +0,0 @@
/*
* LZ Decompression functions
*
* Copyright 1996 Marcus Meissner
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windows.h"
BOOL STDCALL
DllMain(HANDLE hDll,
DWORD dwReason,
LPVOID lpReserved)
{
return TRUE;
}
-182
View File
@@ -1,182 +0,0 @@
/*
* MAPI Default IMalloc implementation
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "winerror.h"
#include "winternl.h"
#include "objbase.h"
#include "shlwapi.h"
#include "mapiutil.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mapi);
static const IMallocVtbl MAPI_IMalloc_vt;
typedef struct
{
const IMallocVtbl *lpVtbl;
LONG lRef;
} MAPI_IMALLOC;
static MAPI_IMALLOC MAPI_IMalloc = { &MAPI_IMalloc_vt, 0u };
extern LONG MAPI_ObjectCount; /* In mapi32_main.c */
/*************************************************************************
* MAPIGetDefaultMalloc@0 (MAPI32.59)
*
* Get the default MAPI IMalloc interface.
*
* PARAMS
* None.
*
* RETURNS
* A pointer to the MAPI default allocator.
*/
LPMALLOC WINAPI MAPIGetDefaultMalloc(void)
{
TRACE("()\n");
IMalloc_AddRef((LPMALLOC)&MAPI_IMalloc);
return (LPMALLOC)&MAPI_IMalloc;
}
/**************************************************************************
* IMAPIMalloc_QueryInterface
*/
static HRESULT WINAPI IMAPIMalloc_fnQueryInterface(LPMALLOC iface, REFIID refiid,
LPVOID *ppvObj)
{
TRACE("(%s,%p)\n", debugstr_guid(refiid), ppvObj);
if (IsEqualIID(refiid, &IID_IUnknown) ||
IsEqualIID(refiid, &IID_IMalloc))
{
*ppvObj = (LPMALLOC) &MAPI_IMalloc;
TRACE("Returning IMalloc (%p)\n", *ppvObj);
return S_OK;
}
TRACE("Returning E_NOINTERFACE\n");
return E_NOINTERFACE;
}
/**************************************************************************
* IMAPIMalloc_AddRef
*/
static ULONG WINAPI IMAPIMalloc_fnAddRef(LPMALLOC iface)
{
TRACE("(%p)\n", iface);
InterlockedIncrement(&MAPI_ObjectCount);
return 1u;
}
/**************************************************************************
* IMAPIMalloc_Release
*/
static ULONG WINAPI IMAPIMalloc_fnRelease(LPMALLOC iface)
{
TRACE("(%p)\n", iface);
InterlockedDecrement(&MAPI_ObjectCount);
return 1u;
}
/**************************************************************************
* IMAPIMalloc_Alloc
*/
static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
{
TRACE("(%p)->(%ld)\n", iface, cb);
return LocalAlloc(LMEM_FIXED, cb);
}
/**************************************************************************
* IMAPIMalloc_Realloc
*/
static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
{
TRACE("(%p)->(%p, %ld)\n", iface, pv, cb);
if (!pv)
return LocalAlloc(LMEM_FIXED, cb);
if (cb)
return LocalReAlloc((HANDLE) pv, cb, LMEM_MOVEABLE);
LocalFree((HANDLE) pv);
return NULL;
}
/**************************************************************************
* IMAPIMalloc_Free
*/
static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv)
{
TRACE("(%p)->(%p)\n", iface, pv);
LocalFree((HANDLE) pv);
}
/**************************************************************************
* IMAPIMalloc_GetSize
*/
static DWORD WINAPI IMAPIMalloc_fnGetSize(LPMALLOC iface, LPVOID pv)
{
TRACE("(%p)->(%p)\n", iface, pv);
return LocalSize((HANDLE) pv);
}
/**************************************************************************
* IMAPIMalloc_DidAlloc
*/
static INT WINAPI IMAPIMalloc_fnDidAlloc(LPMALLOC iface, LPVOID pv)
{
TRACE("(%p)->(%p)\n", iface, pv);
return -1;
}
/**************************************************************************
* IMAPIMalloc_HeapMinimize
*/
static void WINAPI IMAPIMalloc_fnHeapMinimize(LPMALLOC iface)
{
TRACE("(%p)\n", iface);
}
static const IMallocVtbl MAPI_IMalloc_vt =
{
IMAPIMalloc_fnQueryInterface,
IMAPIMalloc_fnAddRef,
IMAPIMalloc_fnRelease,
IMAPIMalloc_fnAlloc,
IMAPIMalloc_fnRealloc,
IMAPIMalloc_fnFree,
IMAPIMalloc_fnGetSize,
IMAPIMalloc_fnDidAlloc,
IMAPIMalloc_fnHeapMinimize
};
-191
View File
@@ -1,191 +0,0 @@
8 stub @
10 stdcall MAPILogonEx(long ptr ptr long ptr)
11 stdcall MAPILogonEx@20(long ptr ptr long ptr) MAPILogonEx
12 stdcall MAPIAllocateBuffer(long ptr)
13 stdcall MAPIAllocateBuffer@8(long ptr) MAPIAllocateBuffer
14 stdcall MAPIAllocateMore(long ptr ptr)
15 stdcall MAPIAllocateMore@12(long ptr ptr) MAPIAllocateMore
16 stdcall MAPIFreeBuffer(ptr)
17 stdcall MAPIFreeBuffer@4(ptr) MAPIFreeBuffer
18 stub MAPIAdminProfiles
19 stub MAPIAdminProfiles@8
20 stdcall MAPIInitialize(ptr)
21 stdcall MAPIInitialize@4(ptr) MAPIInitialize
22 stdcall MAPIUninitialize()
23 stdcall MAPIUninitialize@0() MAPIUninitialize
24 stub PRProviderInit
25 stub LAUNCHWIZARD
26 stub LaunchWizard@20
27 stub DllGetClassObject
28 stdcall -private DllCanUnloadNow()
29 stub MAPIOpenFormMgr
30 stub MAPIOpenFormMgr@8
31 stub MAPIOpenLocalFormContainer
32 stub MAPIOpenLocalFormContainer@4
33 stdcall ScInitMapiUtil@4(long) ScInitMapiUtil
34 stdcall DeinitMapiUtil@0() DeinitMapiUtil
35 stub ScGenerateMuid@4
36 stub HrAllocAdviseSink@12
41 stdcall WrapProgress@20(ptr ptr ptr ptr ptr) WrapProgress
42 stdcall HrThisThreadAdviseSink@8(ptr ptr) HrThisThreadAdviseSink
43 stub ScBinFromHexBounded@12
44 stdcall FBinFromHex@8(ptr ptr) FBinFromHex
45 stdcall HexFromBin@12(ptr long ptr) HexFromBin
46 stub BuildDisplayTable@40
47 stdcall SwapPlong@8(ptr long) SwapPlong
48 stdcall SwapPword@8(ptr long) SwapPword
49 stub MAPIInitIdle@4
50 stub MAPIDeinitIdle@0
51 stub InstallFilterHook@4
52 stub FtgRegisterIdleRoutine@20
53 stub EnableIdleRoutine@8
54 stub DeregisterIdleRoutine@4
55 stub ChangeIdleRoutine@28
59 stdcall MAPIGetDefaultMalloc@0() MAPIGetDefaultMalloc
60 stdcall CreateIProp@24(ptr ptr ptr ptr ptr ptr) CreateIProp
61 stub CreateTable@36
62 stdcall MNLS_lstrlenW@4(wstr) MNLS_lstrlenW
63 stdcall MNLS_lstrcmpW@8(wstr wstr) MNLS_lstrcmpW
64 stdcall MNLS_lstrcpyW@8(ptr wstr) MNLS_lstrcpyW
65 stdcall MNLS_CompareStringW@24(long wstr wstr) MNLS_CompareStringW
66 stdcall MNLS_MultiByteToWideChar@24(long long str long ptr long) kernel32.MultiByteToWideChar
67 stdcall MNLS_WideCharToMultiByte@32(long long wstr long ptr long ptr ptr) kernel32.WideCharToMultiByte
68 stdcall MNLS_IsBadStringPtrW@8(ptr long) kernel32.IsBadStringPtrW
72 stdcall FEqualNames@8(ptr ptr) FEqualNames
73 stub WrapStoreEntryID@24
74 stdcall IsBadBoundedStringPtr@8(ptr long) IsBadBoundedStringPtr
75 stub HrQueryAllRows@24
76 stdcall PropCopyMore@16(ptr ptr ptr ptr) PropCopyMore
77 stdcall UlPropSize@4(ptr) UlPropSize
78 stdcall FPropContainsProp@12(ptr ptr long) FPropContainsProp
79 stdcall FPropCompareProp@12(ptr long ptr) FPropCompareProp
80 stdcall LPropCompareProp@8(ptr ptr) LPropCompareProp
81 stub HrAddColumns@16
82 stub HrAddColumnsEx@20
121 stdcall -ret64 FtAddFt@16(double double) MAPI32_FtAddFt
122 stub FtAdcFt@20
123 stdcall -ret64 FtSubFt@16(double double) MAPI32_FtSubFt
124 stdcall -ret64 FtMulDw@12(long double) MAPI32_FtMulDw
125 stdcall -ret64 FtMulDwDw@8(long long) MAPI32_FtMulDwDw
126 stdcall -ret64 FtNegFt@8(double) MAPI32_FtNegFt
127 stub FtDivFtBogus@20
128 stdcall UlAddRef@4(ptr) UlAddRef
129 stdcall UlRelease@4(ptr) UlRelease
130 stdcall SzFindCh@8(str long) shlwapi.StrChrA
131 stdcall SzFindLastCh@8(str str long) shlwapi.StrRChrA
132 stdcall SzFindSz@8(str str) shlwapi.StrStrA
133 stdcall UFromSz@4(str) UFromSz
135 stdcall HrGetOneProp@12(ptr long ptr) HrGetOneProp
136 stdcall HrSetOneProp@8(ptr ptr) HrSetOneProp
137 stdcall FPropExists@8(ptr long) FPropExists
138 stdcall PpropFindProp@12(ptr long long) PpropFindProp
139 stdcall FreePadrlist@4(ptr) FreePadrlist
140 stdcall FreeProws@4(ptr) FreeProws
141 stub HrSzFromEntryID@12
142 stub HrEntryIDFromSz@12
143 stub HrComposeEID@28
144 stub HrDecomposeEID@28
145 stub HrComposeMsgID@24
146 stub HrDecomposeMsgID@24
147 stdcall OpenStreamOnFile@24(ptr ptr ptr ptr ptr ptr) OpenStreamOnFile
148 stdcall OpenStreamOnFile(ptr ptr ptr ptr ptr ptr)
149 stub OpenTnefStream@28
150 stub OpenTnefStream
151 stub OpenTnefStreamEx@32
152 stub OpenTnefStreamEx
153 stub GetTnefStreamCodepage@12
154 stub GetTnefStreamCodepage
155 stdcall UlFromSzHex@4(ptr) UlFromSzHex
156 stub UNKOBJ_ScAllocate@12
157 stub UNKOBJ_ScAllocateMore@16
158 stub UNKOBJ_Free@8
159 stub UNKOBJ_FreeRows@8
160 stub UNKOBJ_ScCOAllocate@12
161 stub UNKOBJ_ScCOReallocate@12
162 stub UNKOBJ_COFree@8
163 stub UNKOBJ_ScSzFromIdsAlloc@20
164 stub ScCountNotifications@12
165 stub ScCopyNotifications@16
166 stub ScRelocNotifications@20
170 stdcall ScCountProps@12(long ptr ptr) ScCountProps
171 stdcall ScCopyProps@16(long ptr ptr ptr) ScCopyProps
172 stdcall ScRelocProps@20(long ptr ptr ptr ptr) ScRelocProps
173 stdcall LpValFindProp@12(long long ptr) LpValFindProp
174 stdcall ScDupPropset@16(long ptr ptr ptr) ScDupPropset
175 stdcall FBadRglpszA@8(ptr long) FBadRglpszA
176 stdcall FBadRglpszW@8(ptr long) FBadRglpszW
177 stdcall FBadRowSet@4(ptr) FBadRowSet
178 stub FBadRglpNameID@8
179 stdcall FBadPropTag@4(long) FBadPropTag
180 stdcall FBadRow@4(ptr) FBadRow
181 stdcall FBadProp@4(ptr) FBadProp
182 stdcall FBadColumnSet@4(ptr) FBadColumnSet
183 stub RTFSync@12
184 stub RTFSync
185 stub WrapCompressedRTFStream@12
186 stub WrapCompressedRTFStream
187 stub __ValidateParameters@8
188 stub __CPPValidateParameters@8
189 stub FBadSortOrderSet@4
190 stdcall FBadEntryList@4(ptr) FBadEntryList
191 stub FBadRestriction@4
192 stub ScUNCFromLocalPath@12
193 stub ScLocalPathFromUNC@12
194 stub HrIStorageFromStream@16
195 stub HrValidateIPMSubtree@20
196 stub OpenIMsgSession@12
197 stub CloseIMsgSession@4
198 stub OpenIMsgOnIStg@44
199 stub SetAttribIMsgOnIStg@16
200 stub GetAttribIMsgOnIStg@12
201 stub MapStorageSCode@4
202 stub ScMAPIXFromCMC
203 stub ScMAPIXFromSMAPI
204 stub EncodeID@12
205 stub FDecodeID@12
206 stub CchOfEncoding@4
207 stdcall CbOfEncoded@4(ptr) CbOfEncoded
208 stub MAPISendDocuments
209 stdcall MAPILogon(long ptr ptr long long ptr)
210 stub MAPILogoff
211 stub MAPISendMail
212 stub MAPISaveMail
213 stub MAPIReadMail
214 stub MAPIFindNext
215 stub MAPIDeleteMail
217 stub MAPIAddress
218 stub MAPIDetails
219 stub MAPIResolveName
220 stub BMAPISendMail
221 stub BMAPISaveMail
222 stub BMAPIReadMail
223 stub BMAPIGetReadMail
224 stub BMAPIFindNext
225 stub BMAPIAddress
226 stub BMAPIGetAddress
227 stub BMAPIDetails
228 stub BMAPIResolveName
229 stub cmc_act_on
230 stub cmc_free
231 stub cmc_list
232 stub cmc_logoff
233 stub cmc_logon
234 stub cmc_look_up
235 stdcall cmc_query_configuration( long long ptr ptr )
236 stub cmc_read
237 stub cmc_send
238 stub cmc_send_documents
239 stub HrDispatchNotifications@4
241 stub HrValidateParameters@8
244 stub ScCreateConversationIndex@16
246 stub HrGetOmiProvidersFlags
247 stub HrGetOmiProvidersFlags@8
248 stub HrSetOmiProvidersFlagsInvalid
249 stub HrSetOmiProvidersFlagsInvalid@4
250 stub GetOutlookVersion
251 stub GetOutlookVersion@0
252 stub FixMAPI
253 stub FixMAPI@0
# This entry point is sometimes used to detect if the mapi dll came from Outlook
#254 stub FGetComponentPath
#255 stub FGetComponentPath@20
-19
View File
@@ -1,19 +0,0 @@
<module name="mapi32" type="win32dll" baseaddress="${BASEADDRESS_MAPI32}" installbase="system32" installname="mapi32.dll">
<importlibrary definition="mapi32.spec.def" />
<include base="mapi32">.</include>
<include base="ReactOS">include/wine</include>
<define name="__USE_W32API" />
<define name="_WIN32_WINNT">0x501</define>
<define name="__WINESRC__" />
<library>ntdll</library>
<library>kernel32</library>
<library>shlwapi</library>
<library>wine</library>
<library>uuid</library>
<library>advapi32</library>
<file>mapi32_main.c</file>
<file>imalloc.c</file>
<file>prop.c</file>
<file>util.c</file>
<file>mapi32.spec</file>
</module>
-94
View File
@@ -1,94 +0,0 @@
/*
* MAPI basics
*
* Copyright 2001 CodeWeavers Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "objbase.h"
#include "mapix.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mapi);
LONG MAPI_ObjectCount = 0;
/***********************************************************************
* DllMain (MAPI32.init)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
TRACE("(%p,%ld,%p)\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:
TRACE("DLL_PROCESS_DETACH: %ld objects remaining\n", MAPI_ObjectCount);
break;
}
return TRUE;
}
/***********************************************************************
* DllCanUnloadNow (MAPI32.28)
*
* Determine if this dll can be unloaded from the callers address space.
*
* PARAMS
* None.
*
* RETURNS
* S_OK, if the dll can be unloaded,
* S_FALSE, otherwise.
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
return MAPI_ObjectCount == 0 ? S_OK : S_FALSE;
}
HRESULT WINAPI MAPIInitialize ( LPVOID lpMapiInit )
{
ERR("Stub\n");
return MAPI_E_NOT_INITIALIZED;
}
ULONG WINAPI MAPILogon(ULONG ulUIParam, LPSTR lpszProfileName, LPSTR
lpszPassword, FLAGS flFlags, ULONG ulReserver, LPLHANDLE lplhSession)
{
ERR("Stub\n");
return MAPI_E_LOGON_FAILED;
}
HRESULT WINAPI MAPILogonEx(ULONG_PTR ulUIParam, LPWSTR lpszProfileName,
LPWSTR lpszPassword, ULONG flFlags,
LPMAPISESSION *lppSession)
{
ERR("Stub\n");
return MAPI_E_LOGON_FAILED;
}
VOID WINAPI MAPIUninitialize(void)
{
ERR("Stub\n");
}
File diff suppressed because it is too large Load Diff
-823
View File
@@ -1,823 +0,0 @@
/*
* MAPI Utility functions
*
* Copyright 2004 Jon Griffiths
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "winerror.h"
#include "winternl.h"
#include "objbase.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "mapival.h"
#include "xcmc.h"
WINE_DEFAULT_DEBUG_CHANNEL(mapi);
static const BYTE digitsToHex[] = {
0,1,2,3,4,5,6,7,8,9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,10,11,12,13,14,15,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,10,11,12,13,
14,15 };
/**************************************************************************
* ScInitMapiUtil (MAPI32.33)
*
* Initialise Mapi utility functions.
*
* PARAMS
* ulReserved [I] Reserved, pass 0.
*
* RETURNS
* Success: S_OK. Mapi utility functions may be called.
* Failure: MAPI_E_INVALID_PARAMETER, if ulReserved is not 0.
*
* NOTES
* Your application does not need to call this function unless it does not
* call MAPIInitialize()/MAPIUninitialize().
*/
SCODE WINAPI ScInitMapiUtil(ULONG ulReserved)
{
FIXME("(0x%08lx)stub!\n", ulReserved);
if (ulReserved)
return MAPI_E_INVALID_PARAMETER;
return S_OK;
}
/**************************************************************************
* DeinitMapiUtil (MAPI32.34)
*
* Uninitialise Mapi utility functions.
*
* PARAMS
* None.
*
* RETURNS
* Nothing.
*
* NOTES
* Your application does not need to call this function unless it does not
* call MAPIInitialize()/MAPIUninitialize().
*/
VOID WINAPI DeinitMapiUtil(void)
{
FIXME("()stub!\n");
}
typedef LPVOID *LPMAPIALLOCBUFFER;
/**************************************************************************
* MAPIAllocateBuffer (MAPI32.12)
* MAPIAllocateBuffer@8 (MAPI32.13)
*
* Allocate a block of memory.
*
* PARAMS
* cbSize [I] Size of the block to allocate in bytes
* lppBuffer [O] Destination for pointer to allocated memory
*
* RETURNS
* Success: S_OK. *lppBuffer is filled with a pointer to a memory block of
* length cbSize bytes.
* Failure: MAPI_E_INVALID_PARAMETER, if lppBuffer is NULL.
* MAPI_E_NOT_ENOUGH_MEMORY, if the memory allocation fails.
*
* NOTES
* Memory allocated with this function should be freed with MAPIFreeBuffer().
* Further allocations of memory may be linked to the pointer returned using
* MAPIAllocateMore(). Linked allocations are freed when the initial pointer
* is feed.
*/
SCODE WINAPI MAPIAllocateBuffer(ULONG cbSize, LPVOID *lppBuffer)
{
LPMAPIALLOCBUFFER lpBuff;
TRACE("(%ld,%p)\n", cbSize, lppBuffer);
if (!lppBuffer)
return E_INVALIDARG;
lpBuff = HeapAlloc(GetProcessHeap(), 0, cbSize + sizeof(*lpBuff));
if (!lpBuff)
return MAPI_E_NOT_ENOUGH_MEMORY;
TRACE("initial allocation:%p, returning %p\n", lpBuff, lpBuff + 1);
*lpBuff++ = NULL;
*lppBuffer = lpBuff;
return S_OK;
}
/**************************************************************************
* MAPIAllocateMore (MAPI32.14)
* MAPIAllocateMore@12 (MAPI32.15)
*
* Allocate a block of memory linked to a previous allocation.
*
* PARAMS
* cbSize [I] Size of the block to allocate in bytes
* lpOrig [I] Initial allocation to link to, from MAPIAllocateBuffer()
* lppBuffer [O] Destination for pointer to allocated memory
*
* RETURNS
* Success: S_OK. *lppBuffer is filled with a pointer to a memory block of
* length cbSize bytes.
* Failure: MAPI_E_INVALID_PARAMETER, if lpOrig or lppBuffer is invalid.
* MAPI_E_NOT_ENOUGH_MEMORY, if memory allocation fails.
*
* NOTES
* Memory allocated with this function and stored in *lppBuffer is freed
* when lpOrig is passed to MAPIFreeBuffer(). It should not be freed independently.
*/
SCODE WINAPI MAPIAllocateMore(ULONG cbSize, LPVOID lpOrig, LPVOID *lppBuffer)
{
LPMAPIALLOCBUFFER lpBuff = lpOrig;
TRACE("(%ld,%p,%p)\n", cbSize, lpOrig, lppBuffer);
if (!lppBuffer || !lpBuff || !--lpBuff)
return E_INVALIDARG;
/* Find the last allocation in the chain */
while (*lpBuff)
{
TRACE("linked:%p->%p\n", lpBuff, *lpBuff);
lpBuff = *lpBuff;
}
if (SUCCEEDED(MAPIAllocateBuffer(cbSize, lppBuffer)))
{
*lpBuff = ((LPMAPIALLOCBUFFER)*lppBuffer) - 1;
TRACE("linking %p->%p\n", lpBuff, *lpBuff);
}
return *lppBuffer ? S_OK : MAPI_E_NOT_ENOUGH_MEMORY;
}
/**************************************************************************
* MAPIFreeBuffer (MAPI32.16)
* MAPIFreeBuffer@4 (MAPI32.17)
*
* Free a block of memory and any linked allocations associated with it.
*
* PARAMS
* lpBuffer [I] Memory to free, returned from MAPIAllocateBuffer()
*
* RETURNS
* S_OK.
*/
ULONG WINAPI MAPIFreeBuffer(LPVOID lpBuffer)
{
LPMAPIALLOCBUFFER lpBuff = lpBuffer;
TRACE("(%p)\n", lpBuffer);
if (lpBuff && --lpBuff)
{
while (lpBuff)
{
LPVOID lpFree = lpBuff;
lpBuff = *lpBuff;
TRACE("linked:%p->%p, freeing %p\n", lpFree, lpBuff, lpFree);
HeapFree(GetProcessHeap(), 0, lpFree);
}
}
return S_OK;
}
/**************************************************************************
* WrapProgress@20 (MAPI32.41)
*/
HRESULT WINAPI WrapProgress(PVOID unk1, PVOID unk2, PVOID unk3, PVOID unk4, PVOID unk5)
{
/* Native does not implement this function */
return MAPI_E_NO_SUPPORT;
}
/*************************************************************************
* HrThisThreadAdviseSink@8 (MAPI32.42)
*
* Ensure that an advise sink is only notified in its originating thread.
*
* PARAMS
* lpSink [I] IMAPIAdviseSink interface to be protected
* lppNewSink [I] Destination for wrapper IMAPIAdviseSink interface
*
* RETURNS
* Success: S_OK. *lppNewSink contains a new sink to use in place of lpSink.
* Failure: E_INVALIDARG, if any parameter is invalid.
*/
HRESULT WINAPI HrThisThreadAdviseSink(LPMAPIADVISESINK lpSink, LPMAPIADVISESINK* lppNewSink)
{
FIXME("(%p,%p)semi-stub\n", lpSink, lppNewSink);
if (!lpSink || !lppNewSink)
return E_INVALIDARG;
/* Don't wrap the sink for now, just copy it */
*lppNewSink = lpSink;
IMAPIAdviseSink_AddRef(lpSink);
return S_OK;
}
/*************************************************************************
* FBinFromHex (MAPI32.44)
*
* Create an array of binary data from a string.
*
* PARAMS
* lpszHex [I] String to convert to binary data
* lpOut [O] Destination for resulting binary data
*
* RETURNS
* Success: TRUE. lpOut contains the decoded binary data.
* Failure: FALSE, if lpszHex does not represent a binary string.
*
* NOTES
* - lpOut must be at least half the length of lpszHex in bytes.
* - Although the Mapi headers prototype this function as both
* Ascii and Unicode, there is only one (Ascii) implementation. This
* means that lpszHex is treated as an Ascii string (i.e. a single NUL
* character in the byte stream terminates the string).
*/
BOOL WINAPI FBinFromHex(LPWSTR lpszHex, LPBYTE lpOut)
{
LPSTR lpStr = (LPSTR)lpszHex;
TRACE("(%p,%p)\n", lpszHex, lpOut);
while (*lpStr)
{
if (lpStr[0] < '0' || lpStr[0] > 'f' || digitsToHex[lpStr[0] - '0'] == 0xff ||
lpStr[1] < '0' || lpStr[1] > 'f' || digitsToHex[lpStr[1] - '0'] == 0xff)
return FALSE;
*lpOut++ = (digitsToHex[lpStr[0] - '0'] << 4) | digitsToHex[lpStr[1] - '0'];
lpStr += 2;
}
return TRUE;
}
/*************************************************************************
* HexFromBin (MAPI32.45)
*
* Create a string from an array of binary data.
*
* PARAMS
* lpHex [I] Binary data to convert to string
* iCount [I] Length of lpHex in bytes
* lpszOut [O] Destination for resulting hex string
*
* RETURNS
* Nothing.
*
* NOTES
* - lpszOut must be at least 2 * iCount + 1 bytes characters long.
* - Although the Mapi headers prototype this function as both
* Ascii and Unicode, there is only one (Ascii) implementation. This
* means that the resulting string is not properly NUL terminated
* if the caller expects it to be a Unicode string.
*/
void WINAPI HexFromBin(LPBYTE lpHex, int iCount, LPWSTR lpszOut)
{
static const char hexDigits[] = { "0123456789ABCDEF" };
LPSTR lpStr = (LPSTR)lpszOut;
TRACE("(%p,%d,%p)\n", lpHex, iCount, lpszOut);
while (iCount-- > 0)
{
*lpStr++ = hexDigits[*lpHex >> 4];
*lpStr++ = hexDigits[*lpHex & 0xf];
lpHex++;
}
*lpStr = '\0';
}
/*************************************************************************
* SwapPlong@8 (MAPI32.47)
*
* Swap the bytes in a ULONG array.
*
* PARAMS
* lpData [O] Array to swap bytes in
* ulLen [I] Number of ULONG element to swap the bytes of
*
* RETURNS
* Nothing.
*/
VOID WINAPI SwapPlong(PULONG lpData, ULONG ulLen)
{
ULONG i;
for (i = 0; i < ulLen; i++)
lpData[i] = RtlUlongByteSwap(lpData[i]);
}
/*************************************************************************
* SwapPword@8 (MAPI32.48)
*
* Swap the bytes in a USHORT array.
*
* PARAMS
* lpData [O] Array to swap bytes in
* ulLen [I] Number of USHORT element to swap the bytes of
*
* RETURNS
* Nothing.
*/
VOID WINAPI SwapPword(PUSHORT lpData, ULONG ulLen)
{
ULONG i;
for (i = 0; i < ulLen; i++)
lpData[i] = RtlUshortByteSwap(lpData[i]);
}
/**************************************************************************
* MNLS_lstrlenW@4 (MAPI32.62)
*
* Calculate the length of a Unicode string.
*
* PARAMS
* lpszStr [I] String to calculate the length of
*
* RETURNS
* The length of lpszStr in Unicode characters.
*/
ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr)
{
TRACE("(%s)\n", debugstr_w(lpszStr));
return strlenW(lpszStr);
}
/*************************************************************************
* MNLS_lstrcmpW@8 (MAPI32.63)
*
* Compare two Unicode strings.
*
* PARAMS
* lpszLeft [I] First string to compare
* lpszRight [I] Second string to compare
*
* RETURNS
* An integer less than, equal to or greater than 0, indicating that
* lpszLeft is less than, the same, or greater than lpszRight.
*/
INT WINAPI MNLS_lstrcmpW(LPCWSTR lpszLeft, LPCWSTR lpszRight)
{
TRACE("(%s,%s)\n", debugstr_w(lpszLeft), debugstr_w(lpszRight));
return strcmpW(lpszLeft, lpszRight);
}
/*************************************************************************
* MNLS_lstrcpyW@8 (MAPI32.64)
*
* Copy a Unicode string to another string.
*
* PARAMS
* lpszDest [O] Destination string
* lpszSrc [I] Source string
*
* RETURNS
* The length lpszDest in Unicode characters.
*/
ULONG WINAPI MNLS_lstrcpyW(LPWSTR lpszDest, LPCWSTR lpszSrc)
{
ULONG len;
TRACE("(%p,%s)\n", lpszDest, debugstr_w(lpszSrc));
len = (strlenW(lpszSrc) + 1) * sizeof(WCHAR);
memcpy(lpszDest, lpszSrc, len);
return len;
}
/*************************************************************************
* MNLS_CompareStringW@12 (MAPI32.65)
*
* Compare two Unicode strings.
*
* PARAMS
* dwCp [I] Code page for the comparison
* lpszLeft [I] First string to compare
* lpszRight [I] Second string to compare
*
* RETURNS
* CSTR_LESS_THAN, CSTR_EQUAL or CSTR_GREATER_THAN, indicating that
* lpszLeft is less than, the same, or greater than lpszRight.
*/
INT WINAPI MNLS_CompareStringW(DWORD dwCp, LPCWSTR lpszLeft, LPCWSTR lpszRight)
{
INT ret;
TRACE("0x%08lx,%s,%s\n", dwCp, debugstr_w(lpszLeft), debugstr_w(lpszRight));
ret = MNLS_lstrcmpW(lpszLeft, lpszRight);
return ret < 0 ? CSTR_LESS_THAN : ret ? CSTR_GREATER_THAN : CSTR_EQUAL;
}
/**************************************************************************
* FEqualNames@8 (MAPI32.72)
*
* Compare two Mapi names.
*
* PARAMS
* lpName1 [I] First name to compare to lpName2
* lpName2 [I] Second name to compare to lpName1
*
* RETURNS
* TRUE, if the names are the same,
* FALSE, Otherwise.
*/
BOOL WINAPI FEqualNames(LPMAPINAMEID lpName1, LPMAPINAMEID lpName2)
{
TRACE("(%p,%p)\n", lpName1, lpName2);
if (!lpName1 || !lpName2 ||
!IsEqualGUID(lpName1->lpguid, lpName2->lpguid) ||
lpName1->ulKind != lpName2->ulKind)
return FALSE;
if (lpName1->ulKind == MNID_STRING)
return !strcmpW(lpName1->Kind.lpwstrName, lpName2->Kind.lpwstrName);
return lpName1->Kind.lID == lpName2->Kind.lID ? TRUE : FALSE;
}
/**************************************************************************
* IsBadBoundedStringPtr@8 (MAPI32.71)
*
* Determine if a string pointer is valid.
*
* PARAMS
* lpszStr [I] String to check
* ulLen [I] Maximum length of lpszStr
*
* RETURNS
* TRUE, if lpszStr is invalid or longer than ulLen,
* FALSE, otherwise.
*/
BOOL WINAPI IsBadBoundedStringPtr(LPCSTR lpszStr, ULONG ulLen)
{
if (!lpszStr || IsBadStringPtrA(lpszStr, -1) || strlen(lpszStr) >= ulLen)
return TRUE;
return FALSE;
}
/**************************************************************************
* FtAddFt@16 (MAPI32.121)
*
* Add two FILETIME's together.
*
* PARAMS
* ftLeft [I] FILETIME to add to ftRight
* ftRight [I] FILETIME to add to ftLeft
*
* RETURNS
* The sum of ftLeft and ftRight
*/
LONGLONG WINAPI MAPI32_FtAddFt(FILETIME ftLeft, FILETIME ftRight)
{
LONGLONG *pl = (LONGLONG*)&ftLeft, *pr = (LONGLONG*)&ftRight;
return *pl + *pr;
}
/**************************************************************************
* FtSubFt@16 (MAPI32.123)
*
* Subtract two FILETIME's together.
*
* PARAMS
* ftLeft [I] Initial FILETIME
* ftRight [I] FILETIME to subtract from ftLeft
*
* RETURNS
* The remainder after ftRight is subtracted from ftLeft.
*/
LONGLONG WINAPI MAPI32_FtSubFt(FILETIME ftLeft, FILETIME ftRight)
{
LONGLONG *pl = (LONGLONG*)&ftLeft, *pr = (LONGLONG*)&ftRight;
return *pr - *pl;
}
/**************************************************************************
* FtMulDw@12 (MAPI32.124)
*
* Multiply a FILETIME by a DWORD.
*
* PARAMS
* dwLeft [I] DWORD to multiply with ftRight
* ftRight [I] FILETIME to multiply with dwLeft
*
* RETURNS
* The product of dwLeft and ftRight
*/
LONGLONG WINAPI MAPI32_FtMulDw(DWORD dwLeft, FILETIME ftRight)
{
LONGLONG *pr = (LONGLONG*)&ftRight;
return (LONGLONG)dwLeft * (*pr);
}
/**************************************************************************
* FtMulDwDw@8 (MAPI32.125)
*
* Multiply two DWORD, giving the result as a FILETIME.
*
* PARAMS
* dwLeft [I] DWORD to multiply with dwRight
* dwRight [I] DWORD to multiply with dwLeft
*
* RETURNS
* The product of ftMultiplier and ftMultiplicand as a FILETIME.
*/
LONGLONG WINAPI MAPI32_FtMulDwDw(DWORD dwLeft, DWORD dwRight)
{
return (LONGLONG)dwLeft * (LONGLONG)dwRight;
}
/**************************************************************************
* FtNegFt@8 (MAPI32.126)
*
* Negate a FILETIME.
*
* PARAMS
* ft [I] FILETIME to negate
*
* RETURNS
* The negation of ft.
*/
LONGLONG WINAPI MAPI32_FtNegFt(FILETIME ft)
{
LONGLONG *p = (LONGLONG*)&ft;
return - *p;
}
/**************************************************************************
* UlAddRef@4 (MAPI32.128)
*
* Add a reference to an object.
*
* PARAMS
* lpUnk [I] Object to add a reference to.
*
* RETURNS
* The new reference count of the object, or 0 if lpUnk is NULL.
*
* NOTES
* See IUnknown_AddRef.
*/
ULONG WINAPI UlAddRef(void *lpUnk)
{
TRACE("(%p)\n", lpUnk);
if (!lpUnk)
return 0UL;
return IUnknown_AddRef((LPUNKNOWN)lpUnk);
}
/**************************************************************************
* UlRelease@4 (MAPI32.129)
*
* Remove a reference from an object.
*
* PARAMS
* lpUnk [I] Object to remove reference from.
*
* RETURNS
* The new reference count of the object, or 0 if lpUnk is NULL. If lpUnk is
* non-NULL and this function returns 0, the object pointed to by lpUnk has
* been released.
*
* NOTES
* See IUnknown_Release.
*/
ULONG WINAPI UlRelease(void *lpUnk)
{
TRACE("(%p)\n", lpUnk);
if (!lpUnk)
return 0UL;
return IUnknown_Release((LPUNKNOWN)lpUnk);
}
/**************************************************************************
* UFromSz@4 (MAPI32.133)
*
* Read an integer from a string
*
* PARAMS
* lpszStr [I] String to read the integer from.
*
* RETURNS
* Success: The integer read from lpszStr.
* Failure: 0, if the first character in lpszStr is not 0-9.
*
* NOTES
* This function does not accept whitespace and stops at the first non-digit
* character.
*/
UINT WINAPI UFromSz(LPCSTR lpszStr)
{
ULONG ulRet = 0;
TRACE("(%s)\n", debugstr_a(lpszStr));
if (lpszStr)
{
while (*lpszStr >= '0' && *lpszStr <= '9')
{
ulRet = ulRet * 10 + (*lpszStr - '0');
lpszStr = CharNextA(lpszStr);
}
}
return ulRet;
}
/*************************************************************************
* OpenStreamOnFile@24 (MAPI32.147)
*
* Create a stream on a file.
*
* PARAMS
* lpAlloc [I] Memory allocation function
* lpFree [I] Memory free function
* ulFlags [I] Flags controlling the opening process
* lpszPath [I] Path of file to create stream on
* lpszPrefix [I] Prefix of the temporary file name (if ulFlags includes SOF_UNIQUEFILENAME)
* lppStream [O] Destination for created stream
*
* RETURNS
* Success: S_OK. lppStream contains the new stream object
* Failure: E_INVALIDARG if any parameter is invalid, or an HRESULT error code
* describing the error.
*/
HRESULT WINAPI OpenStreamOnFile(LPALLOCATEBUFFER lpAlloc, LPFREEBUFFER lpFree,
ULONG ulFlags, LPWSTR lpszPath, LPWSTR lpszPrefix,
LPSTREAM *lppStream)
{
WCHAR szBuff[MAX_PATH];
DWORD dwMode = STGM_READWRITE, dwAttributes = 0;
HRESULT hRet;
TRACE("(%p,%p,0x%08lx,%s,%s,%p)\n", lpAlloc, lpFree, ulFlags,
debugstr_a((LPSTR)lpszPath), debugstr_a((LPSTR)lpszPrefix), lppStream);
if (lppStream)
*lppStream = NULL;
if (ulFlags & SOF_UNIQUEFILENAME)
{
FIXME("Should generate a temporary name\n");
return E_INVALIDARG;
}
if (!lpszPath || !lppStream)
return E_INVALIDARG;
/* FIXME: Should probably munge mode and attributes, and should handle
* Unicode arguments (I assume MAPI_UNICODE is set in ulFlags if
* we are being passed Unicode strings; MSDN doesn't say).
* This implementation is just enough for Outlook97 to start.
*/
MultiByteToWideChar(CP_ACP, 0, (LPSTR)lpszPath, -1, szBuff, MAX_PATH);
hRet = SHCreateStreamOnFileEx(szBuff, dwMode, dwAttributes, TRUE,
NULL, lppStream);
return hRet;
}
/*************************************************************************
* UlFromSzHex@4 (MAPI32.155)
*
* Read an integer from a hexadecimal string.
*
* PARAMS
* lpSzHex [I] String containing the hexadecimal number to read
*
* RETURNS
* Success: The number represented by lpszHex.
* Failure: 0, if lpszHex does not contain a hex string.
*
* NOTES
* This function does not accept whitespace and stops at the first non-hex
* character.
*/
ULONG WINAPI UlFromSzHex(LPCWSTR lpszHex)
{
LPSTR lpStr = (LPSTR)lpszHex;
ULONG ulRet = 0;
TRACE("(%s)\n", debugstr_a(lpStr));
while (*lpStr)
{
if (lpStr[0] < '0' || lpStr[0] > 'f' || digitsToHex[lpStr[0] - '0'] == 0xff ||
lpStr[1] < '0' || lpStr[1] > 'f' || digitsToHex[lpStr[1] - '0'] == 0xff)
break;
ulRet = ulRet * 16 + ((digitsToHex[lpStr[0] - '0'] << 4) | digitsToHex[lpStr[1] - '0']);
lpStr += 2;
}
return ulRet;
}
/************************************************************************
* FBadEntryList@4 (MAPI32.190)
*
* Determine is an entry list is invalid.
*
* PARAMS
* lpEntryList [I] List to check
*
* RETURNS
* TRUE, if lpEntryList is invalid,
* FALSE, otherwise.
*/
BOOL WINAPI FBadEntryList(LPENTRYLIST lpEntryList)
{
ULONG i;
if (IsBadReadPtr(lpEntryList, sizeof(*lpEntryList)) ||
IsBadReadPtr(lpEntryList->lpbin,
lpEntryList->cValues * sizeof(*lpEntryList->lpbin)))
return TRUE;
for (i = 0; i < lpEntryList->cValues; i++)
if(IsBadReadPtr(lpEntryList->lpbin[i].lpb, lpEntryList->lpbin[i].cb))
return TRUE;
return FALSE;
}
/*************************************************************************
* CbOfEncoded@4 (MAPI32.207)
*
* Return the length of an encoded string.
*
* PARAMS
* lpSzEnc [I] Encoded string to get the length of.
*
* RETURNS
* The length of the encoded string in bytes.
*/
ULONG WINAPI CbOfEncoded(LPCSTR lpszEnc)
{
ULONG ulRet = 0;
TRACE("(%s)\n", debugstr_a(lpszEnc));
if (lpszEnc)
ulRet = (((strlen(lpszEnc) | 3) >> 2) + 1) * 3;
return ulRet;
}
/*************************************************************************
* cmc_query_configuration (MAPI32.235)
*
* Retrieves the configuration information for the installed CMC
*
* PARAMS
* session [I] MAPI session handle
* item [I] Enumerated variable that identifies which
* configuration information is being requested
* reference [O] Buffer where configuration information is written
* config_extensions[I/O] Path of file to create stream on
*
* RETURNS
* A CMD define
*/
CMC_return_code WINAPI cmc_query_configuration(
CMC_session_id session,
CMC_enum item,
CMC_buffer reference,
CMC_extension *config_extensions)
{
FIXME("stub");
return CMC_E_NOT_SUPPORTED;
}
-82
View File
@@ -1,82 +0,0 @@
# Makefile to import Mesa3D into ReactOS
#
# Place this into Mesa/src/mesa and run make -f Makefile.ReactOS to create
# a mesa32 output directory which contains the source code and a mesa32.xml
# rbuild file.
.PHONY: import_mesa3d
doonly: import_mesa3d
# Output directory
OUTPUT = mesa32
# Enable the OpenGL ICD interface
ICD=1
# Enable x86 optimizations
X86=1
include Makefile.mgw
# rbuild XML creation
RBUILD_OUTPUT =
RBUILD_HEADER = '<!-- Autogeneratd by Makefile.ReactOS -->\n'
RBUILD_HEADER += '<module name="mesa32" type="win32dll" baseaddress="$${BASEADDRESS_MESA32}" installbase="system32" installname="mesa32.dll" allowwarnings="true">\n'
RBUILD_HEADER += '\t<importlibrary definition="src/$(GL_DEF)" />\n'
RBUILD_HEADER += '\t<linkerflag>-Wl,--enable-stdcall-fixup</linkerflag>\n'
RBUILD_HEADER += '\t<library>ntdll</library>\n'
RBUILD_HEADER += '\t<library>kernel32</library>\n'
RBUILD_HEADER += '\t<define name="__USE_W32API" />\n'
RBUILD_HEADER += '\t<define name="USE_EXTERNAL_DXTN_LIB" />\n'
RBUILD_HEADER += '\t<!-- The following is autogenrated by Makefile.ReactOS -->\n'
RBUILD_FOOTER += '</module>\n'
define rbuild_xml_include
INC = $(1:-I$(TOP)/src/mesa%=src%)
INC2 = $(INC:-I$(TOP)/%=%)
ifneq ($(INC2),)
RBUILD_OUTPUT += '\t<include base="mesa32">$(INC2)</include>\n'
endif
endef
define rbuild_xml_library
RBUILD_OUTPUT += '\t<library>$(1:-l%=%)</library>\n'
endef
define rbuild_xml_define
RBUILD_OUTPUT += '\t<define name="$(1:-D%=%)" />\n'
endef
define rbuild_xml_file
RBUILD_OUTPUT += '\t<file>src/$(1)</file>\n'
endef
rbuild_makefile:
$(foreach library,$(filter -l%,$(LDLIBS)),$(eval $(call rbuild_xml_library,$(library))))
$(foreach define,$(filter -D%,$(CFLAGS)),$(eval $(call rbuild_xml_define,$(define))))
$(foreach include,$(filter -I%,$(INCLUDE_DIRS)),$(eval $(call rbuild_xml_include,$(include))))
$(foreach file,$(SOURCES),$(eval $(call rbuild_xml_file,$(file))))
@echo -ne $(RBUILD_HEADER)$(RBUILD_OUTPUT)$(RBUILD_FOOTER) > $(OUTPUT)/mesa32.xml
# Main import target
SOURCE_DIRS =
define import_add_dir
DIR = $(firstword $(subst /, ,$(dir $(1))))
ifeq ($(filter $(DIR),$(SOURCE_DIRS)),)
SOURCE_DIRS += $(DIR)
endif
endef
$(OUTPUT):
test -d $(OUTPUT) || mkdir -p $(OUTPUT)
import_mesa3d: $(OUTPUT) rbuild_makefile
$(foreach file,$(SOURCES),$(eval $(call import_add_dir,$(file))))
cp -r $(TOP)/include $(OUTPUT)
test -d $(OUTPUT)/src || mkdir -p $(OUTPUT)/src
cp -r $(SOURCE_DIRS) $(OUTPUT)/src
-8
View File
@@ -1,8 +0,0 @@
This is Mesa-6.4 (http://www.mesa3d.org/) with an ICD interface.
The ICD functions are in src/drivers/windows/icd/icd.c
I have created a Makefile.ReactOS which will generate a mesa32 output directory
containing the needed sources and a mesa32.xml rbuild file.
--blight
-65
View File
@@ -1,65 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 3.3
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* Allegro (DJGPP) driver by Bernhard Tschirren ([email protected]) */
#ifndef AMESA_H
#define AMESA_H
#define AMESA_MAJOR_VERSION 3
#define AMESA_MINOR_VERSION 3
typedef struct amesa_visual *AMesaVisual;
typedef struct amesa_buffer *AMesaBuffer;
typedef struct amesa_context *AMesaContext;
extern AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,
GLint depthSize,
GLint stencilSize,
GLint accumSize);
extern void AMesaDestroyVisual(AMesaVisual visual);
extern AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,
GLint width, GLint height);
extern void AMesaDestroyBuffer(AMesaBuffer buffer);
extern AMesaContext AMesaCreateContext(AMesaVisual visual,
AMesaContext sharelist);
extern void AMesaDestroyContext(AMesaContext context);
extern GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer);
extern void AMesaSwapBuffers(AMesaBuffer buffer);
#endif /* AMESA_H */
@@ -1,89 +0,0 @@
/*
(c) Copyright 2001 convergence integrated media GmbH.
All rights reserved.
Written by Denis Oliver Kropp <[email protected]> and
Andreas Hundt <[email protected]>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __DIRECTFBGL_H__
#define __DIRECTFBGL_H__
#include <directfb.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct {
int buffer_size;
int depth_size;
int stencil_size;
int aux_buffers;
int red_size;
int green_size;
int blue_size;
int alpha_size;
int accum_red_size;
int accum_green_size;
int accum_blue_size;
int accum_alpha_size;
DFBBoolean double_buffer;
DFBBoolean stereo;
} DFBGLAttributes;
DEFINE_INTERFACE( IDirectFBGL,
/** Context handling **/
/*
* Acquire the hardware lock.
*/
DFBResult (*Lock) (
IDirectFBGL *thiz
);
/*
* Release the lock.
*/
DFBResult (*Unlock) (
IDirectFBGL *thiz
);
/*
* Query the OpenGL attributes.
*/
DFBResult (*GetAttributes) (
IDirectFBGL *thiz,
DFBGLAttributes *attributes
);
)
#ifdef __cplusplus
}
#endif
#endif
-160
View File
@@ -1,160 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* DOS/DJGPP device driver v1.7 for Mesa
*
* Copyright (C) 2002 - Daniel Borca
* Email : [email protected]
* Web : http://www.geocities.com/dborca
*/
#ifndef DMESA_H_included
#define DMESA_H_included
#define DMESA_MAJOR_VERSION 6
#define DMESA_MINOR_VERSION 3
/* Sample Usage:
*
* 1. Call DMesaCreateVisual() to initialize graphics.
* 2. Call DMesaCreateContext() to create a DMesa rendering context.
* 3. Call DMesaCreateBuffer() to define the window.
* 4. Call DMesaMakeCurrent() to bind the DMesaBuffer to a DMesaContext.
* 5. Make gl* calls to render your graphics.
* 6. Use DMesaSwapBuffers() when double buffering to swap front/back buffers.
* 7. Before exiting, destroy DMesaBuffer, DMesaContext and DMesaVisual.
*/
typedef struct dmesa_context *DMesaContext;
typedef struct dmesa_visual *DMesaVisual;
typedef struct dmesa_buffer *DMesaBuffer;
#ifdef __cplusplus
extern "C" {
#endif
/*
* Create a new Visual and set graphics mode.
*/
DMesaVisual DMesaCreateVisual (GLint width, /* X res */
GLint height, /* Y res */
GLint colDepth, /* BPP */
GLint refresh, /* refresh rate: 0=default */
GLboolean dbFlag, /* double-buffered */
GLboolean rgbFlag, /* RGB mode */
GLint alphaSize, /* requested bits/alpha */
GLint depthSize, /* requested bits/depth */
GLint stencilSize, /* requested bits/stencil */
GLint accumSize); /* requested bits/accum */
/*
* Destroy Visual and restore screen.
*/
void DMesaDestroyVisual (DMesaVisual v);
/*
* Create a new Context for rendering.
*/
DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
/*
* Destroy Context.
*/
void DMesaDestroyContext (DMesaContext c);
/*
* Return a handle to the current context.
*/
DMesaContext DMesaGetCurrentContext (void);
/*
* Create a new Buffer (window).
*/
DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
GLint xpos, GLint ypos,
GLint width, GLint height);
/*
* Destroy Buffer.
*/
void DMesaDestroyBuffer (DMesaBuffer b);
/*
* Return a handle to the current buffer.
*/
DMesaBuffer DMesaGetCurrentBuffer (void);
/*
* Swap the front and back buffers for the given Buffer.
* No action is taken if the buffer is not double buffered.
*/
void DMesaSwapBuffers (DMesaBuffer b);
/*
* Bind Buffer to Context and make the Context the current one.
*/
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
/*
* Move/Resize current Buffer.
*/
GLboolean DMesaMoveBuffer (GLint xpos, GLint ypos);
GLboolean DMesaResizeBuffer (GLint width, GLint height);
/*
* Set palette index, using normalized values.
*/
void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue);
/*
* DMesa functions
*/
typedef void (*DMesaProc) (void);
DMesaProc DMesaGetProcAddress (const char *name);
/*
* DMesa state retrieval.
*/
#define DMESA_GET_SCREEN_SIZE 0x0100
#define DMESA_GET_DRIVER_CAPS 0x0200
#define DMESA_GET_VIDEO_MODES 0x0300
#define DMESA_GET_BUFFER_ADDR 0x0400
#define DMESA_DRIVER_SWDB_BIT 0x1 /* software double-buffered */
#define DMESA_DRIVER_LLWO_BIT 0x2 /* lower-left window origin */
int DMesaGetIntegerv (GLenum pname, GLint *params);
#ifdef __cplusplus
}
#endif
#endif
-103
View File
@@ -1,103 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.0
* Copyright (C) 1995-2001 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli
*
* NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide)
*/
#ifndef FXMESA_H
#define FXMESA_H
#include <glide.h>
#ifdef __cplusplus
extern "C" {
#endif
#define FXMESA_MAJOR_VERSION 6
#define FXMESA_MINOR_VERSION 3
/*
* Values for attribList parameter to fxMesaCreateContext():
*/
#define FXMESA_NONE 0 /* to terminate attribList */
#define FXMESA_DOUBLEBUFFER 10
#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */
#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */
#define FXMESA_STENCIL_SIZE 13 /* followed by an integer */
#define FXMESA_ACCUM_SIZE 14 /* followed by an integer */
#define FXMESA_COLORDEPTH 20 /* followed by an integer */
#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */
typedef struct tfxMesaContext *fxMesaContext;
#if defined (__BEOS__)
#pragma export on
#endif
GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t,
GrScreenRefresh_t,
const GLint attribList[]);
GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win,
GLint width, GLint height,
const GLint attribList[]);
GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx);
GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n);
GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx);
GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void);
GLAPI void GLAPIENTRY fxMesaSwapBuffers(void);
GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal);
GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx);
GLAPI void GLAPIENTRY fxCloseHardware(void);
GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h);
#if defined (__BEOS__)
#pragma export off
#endif
#ifdef __cplusplus
}
#endif
#endif
-85
View File
@@ -1,85 +0,0 @@
/*
* Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
* Version: 4.0
* Copyright (C) 1995-2000 Brian Paul
* Copyright (C) 1998 Uwe Maurer
* Copyrigth (C) 2001 Filip Spacek
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef GGIMESA_H
#define GGIMESA_H
#define GGIMESA_MAJOR_VERSION 4
#define GGIMESA_MINOR_VERSION 0
#ifdef __cplusplus
extern "C" {
#endif
#include <ggi/ggi.h>
#include "GL/gl.h"
typedef struct ggi_mesa_context *ggi_mesa_context_t;
/*
* Initialize Mesa GGI extension
*/
int ggiMesaInit(void);
/*
* Clean up Mesa GGI exension
*/
int ggiMesaExit(void);
/*
* Attach Mesa GGI extension to the visual 'vis'
*/
int ggiMesaAttach(ggi_visual_t vis);
/*
* Detach Mesa GGI extension from the visual 'vis'
*/
int ggiMesaDetach(ggi_visual_t vis);
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
GLboolean stereo_flag, GLint depth_size,
GLint stencil_size, GLint accum_red_size,
GLint accum_green_size, GLint accum_blue_size,
GLint accum_alpha_size, GLint num_samples);
/*
* Create a new context capable of displaying on the visual vis.
*/
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
/*
* Destroy the context 'ctx'
*/
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
/*
* Make context 'ctx' the current context and bind it to visual 'vis'.
* Note that the context must have been created with respect to that visual.
*/
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
void ggiMesaSwapBuffers(void);
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-340
View File
@@ -1,340 +0,0 @@
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#ifndef __glu_h__
#define __glu_h__
#if defined(USE_MGL_NAMESPACE)
#include "glu_mangle.h"
#endif
#include <GL/gl.h>
#ifndef GLAPIENTRY
#define GLAPIENTRY
#endif
#ifndef GLAPIENTRYP
#define GLAPIENTRYP GLAPIENTRY *
#endif
#ifndef GLAPI
#define GLAPI
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************/
/* Extensions */
#define GLU_EXT_object_space_tess 1
#define GLU_EXT_nurbs_tessellator 1
/* Boolean */
#define GLU_FALSE 0
#define GLU_TRUE 1
/* Version */
#define GLU_VERSION_1_1 1
#define GLU_VERSION_1_2 1
#define GLU_VERSION_1_3 1
/* StringName */
#define GLU_VERSION 100800
#define GLU_EXTENSIONS 100801
/* ErrorCode */
#define GLU_INVALID_ENUM 100900
#define GLU_INVALID_VALUE 100901
#define GLU_OUT_OF_MEMORY 100902
#define GLU_INCOMPATIBLE_GL_VERSION 100903
#define GLU_INVALID_OPERATION 100904
/* NurbsDisplay */
/* GLU_FILL */
#define GLU_OUTLINE_POLYGON 100240
#define GLU_OUTLINE_PATCH 100241
/* NurbsCallback */
#define GLU_NURBS_ERROR 100103
#define GLU_ERROR 100103
#define GLU_NURBS_BEGIN 100164
#define GLU_NURBS_BEGIN_EXT 100164
#define GLU_NURBS_VERTEX 100165
#define GLU_NURBS_VERTEX_EXT 100165
#define GLU_NURBS_NORMAL 100166
#define GLU_NURBS_NORMAL_EXT 100166
#define GLU_NURBS_COLOR 100167
#define GLU_NURBS_COLOR_EXT 100167
#define GLU_NURBS_TEXTURE_COORD 100168
#define GLU_NURBS_TEX_COORD_EXT 100168
#define GLU_NURBS_END 100169
#define GLU_NURBS_END_EXT 100169
#define GLU_NURBS_BEGIN_DATA 100170
#define GLU_NURBS_BEGIN_DATA_EXT 100170
#define GLU_NURBS_VERTEX_DATA 100171
#define GLU_NURBS_VERTEX_DATA_EXT 100171
#define GLU_NURBS_NORMAL_DATA 100172
#define GLU_NURBS_NORMAL_DATA_EXT 100172
#define GLU_NURBS_COLOR_DATA 100173
#define GLU_NURBS_COLOR_DATA_EXT 100173
#define GLU_NURBS_TEXTURE_COORD_DATA 100174
#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
#define GLU_NURBS_END_DATA 100175
#define GLU_NURBS_END_DATA_EXT 100175
/* NurbsError */
#define GLU_NURBS_ERROR1 100251
#define GLU_NURBS_ERROR2 100252
#define GLU_NURBS_ERROR3 100253
#define GLU_NURBS_ERROR4 100254
#define GLU_NURBS_ERROR5 100255
#define GLU_NURBS_ERROR6 100256
#define GLU_NURBS_ERROR7 100257
#define GLU_NURBS_ERROR8 100258
#define GLU_NURBS_ERROR9 100259
#define GLU_NURBS_ERROR10 100260
#define GLU_NURBS_ERROR11 100261
#define GLU_NURBS_ERROR12 100262
#define GLU_NURBS_ERROR13 100263
#define GLU_NURBS_ERROR14 100264
#define GLU_NURBS_ERROR15 100265
#define GLU_NURBS_ERROR16 100266
#define GLU_NURBS_ERROR17 100267
#define GLU_NURBS_ERROR18 100268
#define GLU_NURBS_ERROR19 100269
#define GLU_NURBS_ERROR20 100270
#define GLU_NURBS_ERROR21 100271
#define GLU_NURBS_ERROR22 100272
#define GLU_NURBS_ERROR23 100273
#define GLU_NURBS_ERROR24 100274
#define GLU_NURBS_ERROR25 100275
#define GLU_NURBS_ERROR26 100276
#define GLU_NURBS_ERROR27 100277
#define GLU_NURBS_ERROR28 100278
#define GLU_NURBS_ERROR29 100279
#define GLU_NURBS_ERROR30 100280
#define GLU_NURBS_ERROR31 100281
#define GLU_NURBS_ERROR32 100282
#define GLU_NURBS_ERROR33 100283
#define GLU_NURBS_ERROR34 100284
#define GLU_NURBS_ERROR35 100285
#define GLU_NURBS_ERROR36 100286
#define GLU_NURBS_ERROR37 100287
/* NurbsProperty */
#define GLU_AUTO_LOAD_MATRIX 100200
#define GLU_CULLING 100201
#define GLU_SAMPLING_TOLERANCE 100203
#define GLU_DISPLAY_MODE 100204
#define GLU_PARAMETRIC_TOLERANCE 100202
#define GLU_SAMPLING_METHOD 100205
#define GLU_U_STEP 100206
#define GLU_V_STEP 100207
#define GLU_NURBS_MODE 100160
#define GLU_NURBS_MODE_EXT 100160
#define GLU_NURBS_TESSELLATOR 100161
#define GLU_NURBS_TESSELLATOR_EXT 100161
#define GLU_NURBS_RENDERER 100162
#define GLU_NURBS_RENDERER_EXT 100162
/* NurbsSampling */
#define GLU_OBJECT_PARAMETRIC_ERROR 100208
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
#define GLU_OBJECT_PATH_LENGTH 100209
#define GLU_OBJECT_PATH_LENGTH_EXT 100209
#define GLU_PATH_LENGTH 100215
#define GLU_PARAMETRIC_ERROR 100216
#define GLU_DOMAIN_DISTANCE 100217
/* NurbsTrim */
#define GLU_MAP1_TRIM_2 100210
#define GLU_MAP1_TRIM_3 100211
/* QuadricDrawStyle */
#define GLU_POINT 100010
#define GLU_LINE 100011
#define GLU_FILL 100012
#define GLU_SILHOUETTE 100013
/* QuadricCallback */
/* GLU_ERROR */
/* QuadricNormal */
#define GLU_SMOOTH 100000
#define GLU_FLAT 100001
#define GLU_NONE 100002
/* QuadricOrientation */
#define GLU_OUTSIDE 100020
#define GLU_INSIDE 100021
/* TessCallback */
#define GLU_TESS_BEGIN 100100
#define GLU_BEGIN 100100
#define GLU_TESS_VERTEX 100101
#define GLU_VERTEX 100101
#define GLU_TESS_END 100102
#define GLU_END 100102
#define GLU_TESS_ERROR 100103
#define GLU_TESS_EDGE_FLAG 100104
#define GLU_EDGE_FLAG 100104
#define GLU_TESS_COMBINE 100105
#define GLU_TESS_BEGIN_DATA 100106
#define GLU_TESS_VERTEX_DATA 100107
#define GLU_TESS_END_DATA 100108
#define GLU_TESS_ERROR_DATA 100109
#define GLU_TESS_EDGE_FLAG_DATA 100110
#define GLU_TESS_COMBINE_DATA 100111
/* TessContour */
#define GLU_CW 100120
#define GLU_CCW 100121
#define GLU_INTERIOR 100122
#define GLU_EXTERIOR 100123
#define GLU_UNKNOWN 100124
/* TessProperty */
#define GLU_TESS_WINDING_RULE 100140
#define GLU_TESS_BOUNDARY_ONLY 100141
#define GLU_TESS_TOLERANCE 100142
/* TessError */
#define GLU_TESS_ERROR1 100151
#define GLU_TESS_ERROR2 100152
#define GLU_TESS_ERROR3 100153
#define GLU_TESS_ERROR4 100154
#define GLU_TESS_ERROR5 100155
#define GLU_TESS_ERROR6 100156
#define GLU_TESS_ERROR7 100157
#define GLU_TESS_ERROR8 100158
#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
#define GLU_TESS_MISSING_END_POLYGON 100153
#define GLU_TESS_MISSING_END_CONTOUR 100154
#define GLU_TESS_COORD_TOO_LARGE 100155
#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
/* TessWinding */
#define GLU_TESS_WINDING_ODD 100130
#define GLU_TESS_WINDING_NONZERO 100131
#define GLU_TESS_WINDING_POSITIVE 100132
#define GLU_TESS_WINDING_NEGATIVE 100133
#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
/*************************************************************/
#ifdef __cplusplus
class GLUnurbs;
class GLUquadric;
class GLUtesselator;
#else
typedef struct GLUnurbs GLUnurbs;
typedef struct GLUquadric GLUquadric;
typedef struct GLUtesselator GLUtesselator;
#endif
typedef GLUnurbs GLUnurbsObj;
typedef GLUquadric GLUquadricObj;
typedef GLUtesselator GLUtesselatorObj;
typedef GLUtesselator GLUtriangulatorObj;
#define GLU_TESS_MAX_COORD 1.0e150
/* Internal convenience typedefs */
typedef void (GLAPIENTRYP _GLUfuncptr)();
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
#ifdef __cplusplus
}
#endif
#endif /* __glu_h__ */
@@ -1,86 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef GLU_MANGLE_H
#define GLU_MANGLE_H
#define gluLookAt mgluLookAt
#define gluOrtho2D mgluOrtho2D
#define gluPerspective mgluPerspective
#define gluPickMatrix mgluPickMatrix
#define gluProject mgluProject
#define gluUnProject mgluUnProject
#define gluErrorString mgluErrorString
#define gluScaleImage mgluScaleImage
#define gluBuild1DMipmaps mgluBuild1DMipmaps
#define gluBuild2DMipmaps mgluBuild2DMipmaps
#define gluNewQuadric mgluNewQuadric
#define gluDeleteQuadric mgluDeleteQuadric
#define gluQuadricDrawStyle mgluQuadricDrawStyle
#define gluQuadricOrientation mgluQuadricOrientation
#define gluQuadricNormals mgluQuadricNormals
#define gluQuadricTexture mgluQuadricTexture
#define gluQuadricCallback mgluQuadricCallback
#define gluCylinder mgluCylinder
#define gluSphere mgluSphere
#define gluDisk mgluDisk
#define gluPartialDisk mgluPartialDisk
#define gluNewNurbsRenderer mgluNewNurbsRenderer
#define gluDeleteNurbsRenderer mgluDeleteNurbsRenderer
#define gluLoadSamplingMatrices mgluLoadSamplingMatrices
#define gluNurbsProperty mgluNurbsProperty
#define gluGetNurbsProperty mgluGetNurbsProperty
#define gluBeginCurve mgluBeginCurve
#define gluEndCurve mgluEndCurve
#define gluNurbsCurve mgluNurbsCurve
#define gluBeginSurface mgluBeginSurface
#define gluEndSurface mgluEndSurface
#define gluNurbsSurface mgluNurbsSurface
#define gluBeginTrim mgluBeginTrim
#define gluEndTrim mgluEndTrim
#define gluPwlCurve mgluPwlCurve
#define gluNurbsCallback mgluNurbsCallback
#define gluNewTess mgluNewTess
#define gluDeleteTess mgluDeleteTess
#define gluTessBeginPolygon mgluTessBeginPolygon
#define gluTessBeginContour mgluTessBeginContour
#define gluTessVertex mgluTessVertex
#define gluTessEndPolygon mgluTessEndPolygon
#define gluTessEndContour mgluTessEndContour
#define gluTessProperty mgluTessProperty
#define gluTessNormal mgluTessNormal
#define gluTessCallback mgluTessCallback
#define gluGetTessProperty mgluGetTessProperty
#define gluBeginPolygon mgluBeginPolygon
#define gluNextContour mgluNextContour
#define gluEndPolygon mgluEndPolygon
#define gluGetString mgluGetString
#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels
#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels
#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels
#define gluBuild3DMipmaps mgluBuild3DMipmaps
#define gluCheckExtension mgluCheckExtension
#define gluUnProject4 mgluUnProject4
#define gluNurbsCallbackData mgluNurbsCallbackData
#define gluNurbsCallbackDataEXT mgluNurbsCallbackDataEXT
#endif
-551
View File
@@ -1,551 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.3
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef GLX_H
#define GLX_H
#ifdef __VMS
#include <GL/vms_x_fix.h>
# ifdef __cplusplus
/* VMS Xlib.h gives problems with C++.
* this avoids a bunch of trivial warnings */
#pragma message disable nosimpint
#endif
#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef __VMS
# ifdef __cplusplus
#pragma message enable nosimpint
#endif
#endif
#include <GL/gl.h>
#if defined(USE_MGL_NAMESPACE)
#include "glx_mangle.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define GLX_VERSION_1_1 1
#define GLX_VERSION_1_2 1
#define GLX_VERSION_1_3 1
#define GLX_VERSION_1_4 1
#define GLX_EXTENSION_NAME "GLX"
/*
* Tokens for glXChooseVisual and glXGetConfig:
*/
#define GLX_USE_GL 1
#define GLX_BUFFER_SIZE 2
#define GLX_LEVEL 3
#define GLX_RGBA 4
#define GLX_DOUBLEBUFFER 5
#define GLX_STEREO 6
#define GLX_AUX_BUFFERS 7
#define GLX_RED_SIZE 8
#define GLX_GREEN_SIZE 9
#define GLX_BLUE_SIZE 10
#define GLX_ALPHA_SIZE 11
#define GLX_DEPTH_SIZE 12
#define GLX_STENCIL_SIZE 13
#define GLX_ACCUM_RED_SIZE 14
#define GLX_ACCUM_GREEN_SIZE 15
#define GLX_ACCUM_BLUE_SIZE 16
#define GLX_ACCUM_ALPHA_SIZE 17
/*
* Error codes returned by glXGetConfig:
*/
#define GLX_BAD_SCREEN 1
#define GLX_BAD_ATTRIBUTE 2
#define GLX_NO_EXTENSION 3
#define GLX_BAD_VISUAL 4
#define GLX_BAD_CONTEXT 5
#define GLX_BAD_VALUE 6
#define GLX_BAD_ENUM 7
/*
* GLX 1.1 and later:
*/
#define GLX_VENDOR 1
#define GLX_VERSION 2
#define GLX_EXTENSIONS 3
/*
* GLX 1.3 and later:
*/
#define GLX_CONFIG_CAVEAT 0x20
#define GLX_DONT_CARE 0xFFFFFFFF
#define GLX_X_VISUAL_TYPE 0x22
#define GLX_TRANSPARENT_TYPE 0x23
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
#define GLX_TRANSPARENT_RED_VALUE 0x25
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
#define GLX_WINDOW_BIT 0x00000001
#define GLX_PIXMAP_BIT 0x00000002
#define GLX_PBUFFER_BIT 0x00000004
#define GLX_AUX_BUFFERS_BIT 0x00000010
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
#define GLX_DEPTH_BUFFER_BIT 0x00000020
#define GLX_STENCIL_BUFFER_BIT 0x00000040
#define GLX_ACCUM_BUFFER_BIT 0x00000080
#define GLX_NONE 0x8000
#define GLX_SLOW_CONFIG 0x8001
#define GLX_TRUE_COLOR 0x8002
#define GLX_DIRECT_COLOR 0x8003
#define GLX_PSEUDO_COLOR 0x8004
#define GLX_STATIC_COLOR 0x8005
#define GLX_GRAY_SCALE 0x8006
#define GLX_STATIC_GRAY 0x8007
#define GLX_TRANSPARENT_RGB 0x8008
#define GLX_TRANSPARENT_INDEX 0x8009
#define GLX_VISUAL_ID 0x800B
#define GLX_SCREEN 0x800C
#define GLX_NON_CONFORMANT_CONFIG 0x800D
#define GLX_DRAWABLE_TYPE 0x8010
#define GLX_RENDER_TYPE 0x8011
#define GLX_X_RENDERABLE 0x8012
#define GLX_FBCONFIG_ID 0x8013
#define GLX_RGBA_TYPE 0x8014
#define GLX_COLOR_INDEX_TYPE 0x8015
#define GLX_MAX_PBUFFER_WIDTH 0x8016
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
#define GLX_MAX_PBUFFER_PIXELS 0x8018
#define GLX_PRESERVED_CONTENTS 0x801B
#define GLX_LARGEST_PBUFFER 0x801C
#define GLX_WIDTH 0x801D
#define GLX_HEIGHT 0x801E
#define GLX_EVENT_MASK 0x801F
#define GLX_DAMAGED 0x8020
#define GLX_SAVED 0x8021
#define GLX_WINDOW 0x8022
#define GLX_PBUFFER 0x8023
#define GLX_PBUFFER_HEIGHT 0x8040
#define GLX_PBUFFER_WIDTH 0x8041
#define GLX_RGBA_BIT 0x00000001
#define GLX_COLOR_INDEX_BIT 0x00000002
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
/*
* GLX 1.4 and later:
*/
#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
#define GLX_SAMPLES 0x186a1 /*100001*/
typedef struct __GLXcontextRec *GLXContext;
typedef XID GLXPixmap;
typedef XID GLXDrawable;
/* GLX 1.3 and later */
typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef XID GLXFBConfigID;
typedef XID GLXContextID;
typedef XID GLXWindow;
typedef XID GLXPbuffer;
extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
int *attribList );
extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
GLXContext shareList, Bool direct );
extern void glXDestroyContext( Display *dpy, GLXContext ctx );
extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
GLXContext ctx);
extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
unsigned long mask );
extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
Pixmap pixmap );
extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
int attrib, int *value );
extern GLXContext glXGetCurrentContext( void );
extern GLXDrawable glXGetCurrentDrawable( void );
extern void glXWaitGL( void );
extern void glXWaitX( void );
extern void glXUseXFont( Font font, int first, int count, int list );
/* GLX 1.1 and later */
extern const char *glXQueryExtensionsString( Display *dpy, int screen );
extern const char *glXQueryServerString( Display *dpy, int screen, int name );
extern const char *glXGetClientString( Display *dpy, int name );
/* GLX 1.2 and later */
extern Display *glXGetCurrentDisplay( void );
/* GLX 1.3 and later */
extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
const int *attribList, int *nitems );
extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
int attribute, int *value );
extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
int *nelements );
extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
GLXFBConfig config );
extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
Window win, const int *attribList );
extern void glXDestroyWindow( Display *dpy, GLXWindow window );
extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
Pixmap pixmap, const int *attribList );
extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
const int *attribList );
extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
unsigned int *value );
extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
int renderType, GLXContext shareList,
Bool direct );
extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
GLXDrawable read, GLXContext ctx );
extern GLXDrawable glXGetCurrentReadDrawable( void );
extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
int *value );
extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
unsigned long mask );
extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
unsigned long *mask );
/* GLX 1.4 and later */
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
#ifndef GLX_GLXEXT_LEGACY
#include <GL/glxext.h>
#else
/*
* 28. GLX_EXT_visual_info extension
*/
#ifndef GLX_EXT_visual_info
#define GLX_EXT_visual_info 1
#define GLX_X_VISUAL_TYPE_EXT 0x22
#define GLX_TRANSPARENT_TYPE_EXT 0x23
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
#define GLX_TRUE_COLOR_EXT 0x8002
#define GLX_DIRECT_COLOR_EXT 0x8003
#define GLX_PSEUDO_COLOR_EXT 0x8004
#define GLX_STATIC_COLOR_EXT 0x8005
#define GLX_GRAY_SCALE_EXT 0x8006
#define GLX_STATIC_GRAY_EXT 0x8007
#define GLX_NONE_EXT 0x8000
#define GLX_TRANSPARENT_RGB_EXT 0x8008
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
#endif /* 28. GLX_EXT_visual_info extension */
/*
* 41. GLX_SGI_video_sync
*/
#ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1
extern int glXGetVideoSyncSGI(unsigned int *count);
extern int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count);
#endif /* GLX_SGI_video_sync */
/*
* 42. GLX_EXT_visual_rating
*/
#ifndef GLX_EXT_visual_rating
#define GLX_EXT_visual_rating 1
#define GLX_VISUAL_CAVEAT_EXT 0x20
/*#define GLX_NONE_EXT 0x8000*/
#define GLX_SLOW_VISUAL_EXT 0x8001
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
#endif /* GLX_EXT_visual_rating */
/*
* 47. GLX_EXT_import_context
*/
#ifndef GLX_EXT_import_context
#define GLX_EXT_import_context 1
#define GLX_SHARE_CONTEXT_EXT 0x800A
#define GLX_VISUAL_ID_EXT 0x800B
#define GLX_SCREEN_EXT 0x800C
extern void glXFreeContextEXT(Display *dpy, GLXContext context);
extern GLXContextID glXGetContextIDEXT(const GLXContext context);
extern Display *glXGetCurrentDisplayEXT(void);
extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID);
extern int glXQueryContextInfoEXT(Display *dpy, GLXContext context,
int attribute,int *value);
#endif /* GLX_EXT_import_context */
/*
* 215. GLX_MESA_copy_sub_buffer
*/
#ifndef GLX_MESA_copy_sub_buffer
#define GLX_MESA_copy_sub_buffer 1
extern void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
int x, int y, int width, int height );
#endif
/*
* 216. GLX_MESA_pixmap_colormap
*/
#ifndef GLX_MESA_pixmap_colormap
#define GLX_MESA_pixmap_colormap 1
extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
Pixmap pixmap, Colormap cmap );
#endif /* GLX_MESA_pixmap_colormap */
/*
* 217. GLX_MESA_release_buffers
*/
#ifndef GLX_MESA_release_buffers
#define GLX_MESA_release_buffers 1
extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
#endif /* GLX_MESA_release_buffers */
/*
* 218. GLX_MESA_set_3dfx_mode
*/
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_MESA_set_3dfx_mode 1
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
extern Bool glXSet3DfxModeMESA( int mode );
#endif /* GLX_MESA_set_3dfx_mode */
/*
* ARB 2. GLX_ARB_get_proc_address
*/
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
extern void (*glXGetProcAddressARB(const GLubyte *procName))();
#endif /* GLX_ARB_get_proc_address */
#endif /* GLX_GLXEXT_LEGACY */
/**
** The following aren't in glxext.h yet.
**/
/*
* ???. GLX_NV_vertex_array_range
*/
#ifndef GLX_NV_vertex_array_range
#define GLX_NV_vertex_array_range
extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
extern void glXFreeMemoryNV(GLvoid *pointer);
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
#endif /* GLX_NV_vertex_array_range */
/*
* ???. GLX_MESA_agp_offset
*/
#ifndef GLX_MESA_agp_offset
#define GLX_MESA_agp_offset 1
extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer);
typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer);
#endif /* GLX_MESA_agp_offset */
/*
* ???. GLX_MESA_allocate_memory
*/
#ifndef GLX_MESA_allocate_memory
#define GLX_MESA_allocate_memory 1
extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
#endif /* GLX_MESA_allocate_memory */
/*
* ARB ?. GLX_ARB_render_texture
*/
#ifndef GLX_ARB_render_texture
#define GLX_ARB_render_texture 1
extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
#endif /* GLX_ARB_render_texture */
/*
* Remove this when glxext.h is updated.
*/
#ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
#endif /* GLX_NV_float_buffer */
/*** Should these go here, or in another header? */
/*
** GLX Events
*/
typedef struct {
int event_type; /* GLX_DAMAGED or GLX_SAVED */
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came for SendEvent request */
Display *display; /* display the event was read from */
GLXDrawable drawable; /* XID of Drawable */
unsigned int buffer_mask; /* mask indicating which buffers are affected */
unsigned int aux_buffer; /* which aux buffer was affected */
int x, y;
int width, height;
int count; /* if nonzero, at least this many more */
} GLXPbufferClobberEvent;
typedef union __GLXEvent {
GLXPbufferClobberEvent glxpbufferclobber;
long pad[24];
} GLXEvent;
#ifdef __cplusplus
}
#endif
#endif
@@ -1,55 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.1
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef GLX_MANGLE_H
#define GLX_MANGLE_H
#define glXChooseVisual mglXChooseVisual
#define glXCreateContext mglXCreateContext
#define glXDestroyContext mglXDestroyContext
#define glXMakeCurrent mglXMakeCurrent
#define glXCopyContext mglXCopyContext
#define glXSwapBuffers mglXSwapBuffers
#define glXCreateGLXPixmap mglXCreateGLXPixmap
#define glXDestroyGLXPixmap mglXDestroyGLXPixmap
#define glXQueryExtension mglXQueryExtension
#define glXQueryVersion mglXQueryVersion
#define glXIsDirect mglXIsDirect
#define glXGetConfig mglXGetConfig
#define glXGetCurrentContext mglXGetCurrentContext
#define glXGetCurrentDrawable mglXGetCurrentDrawable
#define glXWaitGL mglXWaitGL
#define glXWaitX mglXWaitX
#define glXUseXFont mglXUseXFont
#define glXQueryExtensionsString mglXQueryExtensionsString
#define glXQueryServerString mglXQueryServerString
#define glXGetClientString mglXGetClientString
#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA
#define glXReleaseBuffersMESA mglXReleaseBuffersMESA
#define glXCopySubBufferMESA mglXCopySubBufferMESA
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
/* GLX 1.4 */
#define glXGetProcAddress mglXGetProcAddress
#endif
-693
View File
@@ -1,693 +0,0 @@
#ifndef __glxext_h_
#define __glxext_h_
#ifdef __cplusplus
extern "C" {
#endif
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
#ifndef APIENTRYP
#define APIENTRYP APIENTRY *
#endif
#ifndef GLAPI
#define GLAPI extern
#endif
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2004/07/26 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
#define GLX_GLXEXT_VERSION 6
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
#define GLX_PIXMAP_BIT 0x00000002
#define GLX_PBUFFER_BIT 0x00000004
#define GLX_RGBA_BIT 0x00000001
#define GLX_COLOR_INDEX_BIT 0x00000002
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
#define GLX_AUX_BUFFERS_BIT 0x00000010
#define GLX_DEPTH_BUFFER_BIT 0x00000020
#define GLX_STENCIL_BUFFER_BIT 0x00000040
#define GLX_ACCUM_BUFFER_BIT 0x00000080
#define GLX_CONFIG_CAVEAT 0x20
#define GLX_X_VISUAL_TYPE 0x22
#define GLX_TRANSPARENT_TYPE 0x23
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
#define GLX_TRANSPARENT_RED_VALUE 0x25
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
#define GLX_DONT_CARE 0xFFFFFFFF
#define GLX_NONE 0x8000
#define GLX_SLOW_CONFIG 0x8001
#define GLX_TRUE_COLOR 0x8002
#define GLX_DIRECT_COLOR 0x8003
#define GLX_PSEUDO_COLOR 0x8004
#define GLX_STATIC_COLOR 0x8005
#define GLX_GRAY_SCALE 0x8006
#define GLX_STATIC_GRAY 0x8007
#define GLX_TRANSPARENT_RGB 0x8008
#define GLX_TRANSPARENT_INDEX 0x8009
#define GLX_VISUAL_ID 0x800B
#define GLX_SCREEN 0x800C
#define GLX_NON_CONFORMANT_CONFIG 0x800D
#define GLX_DRAWABLE_TYPE 0x8010
#define GLX_RENDER_TYPE 0x8011
#define GLX_X_RENDERABLE 0x8012
#define GLX_FBCONFIG_ID 0x8013
#define GLX_RGBA_TYPE 0x8014
#define GLX_COLOR_INDEX_TYPE 0x8015
#define GLX_MAX_PBUFFER_WIDTH 0x8016
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
#define GLX_MAX_PBUFFER_PIXELS 0x8018
#define GLX_PRESERVED_CONTENTS 0x801B
#define GLX_LARGEST_PBUFFER 0x801C
#define GLX_WIDTH 0x801D
#define GLX_HEIGHT 0x801E
#define GLX_EVENT_MASK 0x801F
#define GLX_DAMAGED 0x8020
#define GLX_SAVED 0x8021
#define GLX_WINDOW 0x8022
#define GLX_PBUFFER 0x8023
#define GLX_PBUFFER_HEIGHT 0x8040
#define GLX_PBUFFER_WIDTH 0x8041
#endif
#ifndef GLX_VERSION_1_4
#define GLX_SAMPLE_BUFFERS 100000
#define GLX_SAMPLES 100001
#endif
#ifndef GLX_ARB_get_proc_address
#endif
#ifndef GLX_ARB_multisample
#define GLX_SAMPLE_BUFFERS_ARB 100000
#define GLX_SAMPLES_ARB 100001
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
#endif
#ifndef GLX_EXT_visual_info
#define GLX_X_VISUAL_TYPE_EXT 0x22
#define GLX_TRANSPARENT_TYPE_EXT 0x23
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
#define GLX_NONE_EXT 0x8000
#define GLX_TRUE_COLOR_EXT 0x8002
#define GLX_DIRECT_COLOR_EXT 0x8003
#define GLX_PSEUDO_COLOR_EXT 0x8004
#define GLX_STATIC_COLOR_EXT 0x8005
#define GLX_GRAY_SCALE_EXT 0x8006
#define GLX_STATIC_GRAY_EXT 0x8007
#define GLX_TRANSPARENT_RGB_EXT 0x8008
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
#endif
#ifndef GLX_SGI_swap_control
#endif
#ifndef GLX_SGI_video_sync
#endif
#ifndef GLX_SGI_make_current_read
#endif
#ifndef GLX_SGIX_video_source
#endif
#ifndef GLX_EXT_visual_rating
#define GLX_VISUAL_CAVEAT_EXT 0x20
#define GLX_SLOW_VISUAL_EXT 0x8001
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
/* reuse GLX_NONE_EXT */
#endif
#ifndef GLX_EXT_import_context
#define GLX_SHARE_CONTEXT_EXT 0x800A
#define GLX_VISUAL_ID_EXT 0x800B
#define GLX_SCREEN_EXT 0x800C
#endif
#ifndef GLX_SGIX_fbconfig
#define GLX_WINDOW_BIT_SGIX 0x00000001
#define GLX_PIXMAP_BIT_SGIX 0x00000002
#define GLX_RGBA_BIT_SGIX 0x00000001
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
#define GLX_RENDER_TYPE_SGIX 0x8011
#define GLX_X_RENDERABLE_SGIX 0x8012
#define GLX_FBCONFIG_ID_SGIX 0x8013
#define GLX_RGBA_TYPE_SGIX 0x8014
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
/* reuse GLX_SCREEN_EXT */
#endif
#ifndef GLX_SGIX_pbuffer
#define GLX_PBUFFER_BIT_SGIX 0x00000004
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
#define GLX_WIDTH_SGIX 0x801D
#define GLX_HEIGHT_SGIX 0x801E
#define GLX_EVENT_MASK_SGIX 0x801F
#define GLX_DAMAGED_SGIX 0x8020
#define GLX_SAVED_SGIX 0x8021
#define GLX_WINDOW_SGIX 0x8022
#define GLX_PBUFFER_SGIX 0x8023
#endif
#ifndef GLX_SGI_cushion
#endif
#ifndef GLX_SGIX_video_resize
#define GLX_SYNC_FRAME_SGIX 0x00000000
#define GLX_SYNC_SWAP_SGIX 0x00000001
#endif
#ifndef GLX_SGIX_dmbuffer
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
#endif
#ifndef GLX_SGIX_swap_group
#endif
#ifndef GLX_SGIX_swap_barrier
#endif
#ifndef GLX_SGIS_blended_overlay
#define GLX_BLENDED_RGBA_SGIS 0x8025
#endif
#ifndef GLX_SGIS_shared_multisample
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
#endif
#ifndef GLX_SUN_get_transparent_index
#endif
#ifndef GLX_3DFX_multisample
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
#define GLX_SAMPLES_3DFX 0x8051
#endif
#ifndef GLX_MESA_copy_sub_buffer
#endif
#ifndef GLX_MESA_pixmap_colormap
#endif
#ifndef GLX_MESA_release_buffers
#endif
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
#endif
#ifndef GLX_SGIX_visual_select_group
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
#endif
#ifndef GLX_OML_swap_method
#define GLX_SWAP_METHOD_OML 0x8060
#define GLX_SWAP_EXCHANGE_OML 0x8061
#define GLX_SWAP_COPY_OML 0x8062
#define GLX_SWAP_UNDEFINED_OML 0x8063
#endif
#ifndef GLX_OML_sync_control
#endif
#ifndef GLX_SGIX_hyperpipe_group
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
#define GLX_BAD_HYPERPIPE_SGIX 92
#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
#define GLX_PIPE_RECT_SGIX 0x00000001
#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
#define GLX_HYPERPIPE_ID_SGIX 0x8030
#endif
#ifndef GLX_MESA_agp_offset
#endif
/*************************************************************/
#ifndef GLX_ARB_get_proc_address
typedef void (*__GLXextFuncPtr)(void);
#endif
#ifndef GLX_SGIX_video_source
typedef XID GLXVideoSourceSGIX;
#endif
#ifndef GLX_SGIX_fbconfig
typedef XID GLXFBConfigIDSGIX;
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
#endif
#ifndef GLX_SGIX_pbuffer
typedef XID GLXPbufferSGIX;
typedef struct {
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came for SendEvent request */
Display *display; /* display the event was read from */
GLXDrawable drawable; /* i.d. of Drawable */
int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
unsigned int mask; /* mask indicating which buffers are affected*/
int x, y;
int width, height;
int count; /* if nonzero, at least this many more */
} GLXBufferClobberEventSGIX;
#endif
#if defined(__sun__)
#include <inttypes.h>
#if defined(__STDC__)
#if defined(__arch64__)
typedef long int int64_t;
#else
typedef long long int int64_t;
#endif /* __arch64__ */
#endif /* __STDC__ */
#elif defined(__UNIXOS2__) || defined(__SOL64__)
typedef long int int32_t;
typedef long long int int64_t;
#elif defined( __VMS )
#include <inttypes.h>
#elif defined(__SCO__) || defined(__USLC__)
#include <stdint.h>
#elif defined(WIN32) && defined(__GNUC__)
#include <stdint.h>
#endif
#ifndef GLX_VERSION_1_3
#define GLX_VERSION_1_3 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
extern void glXDestroyWindow (Display *, GLXWindow);
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
extern void glXDestroyPixmap (Display *, GLXPixmap);
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern GLXDrawable glXGetCurrentReadDrawable (void);
extern Display * glXGetCurrentDisplay (void);
extern int glXQueryContext (Display *, GLXContext, int, int *);
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
#endif
#ifndef GLX_VERSION_1_4
#define GLX_VERSION_1_4 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#endif
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
#endif
#ifndef GLX_ARB_multisample
#define GLX_ARB_multisample 1
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif
#ifndef GLX_EXT_visual_info
#define GLX_EXT_visual_info 1
#endif
#ifndef GLX_SGI_swap_control
#define GLX_SGI_swap_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXSwapIntervalSGI (int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#endif
#ifndef GLX_SGI_video_sync
#define GLX_SGI_video_sync 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetVideoSyncSGI (unsigned int *);
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
#endif
#ifndef GLX_SGI_make_current_read
#define GLX_SGI_make_current_read 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
#endif
#ifndef GLX_SGIX_video_source
#define GLX_SGIX_video_source 1
#ifdef _VL_H
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
#endif /* _VL_H */
#endif
#ifndef GLX_EXT_visual_rating
#define GLX_EXT_visual_rating 1
#endif
#ifndef GLX_EXT_import_context
#define GLX_EXT_import_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Display * glXGetCurrentDisplayEXT (void);
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
extern GLXContextID glXGetContextIDEXT (const GLXContext);
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
extern void glXFreeContextEXT (Display *, GLXContext);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
#endif
#ifndef GLX_SGIX_fbconfig
#define GLX_SGIX_fbconfig 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
#endif
#ifndef GLX_SGIX_pbuffer
#define GLX_SGIX_pbuffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
#endif
#ifndef GLX_SGI_cushion
#define GLX_SGI_cushion 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCushionSGI (Display *, Window, float);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
#endif
#ifndef GLX_SGIX_video_resize
#define GLX_SGIX_video_resize 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
#endif
#ifndef GLX_SGIX_dmbuffer
#define GLX_SGIX_dmbuffer 1
#ifdef _DM_BUFFER_H_
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
#endif /* _DM_BUFFER_H_ */
#endif
#ifndef GLX_SGIX_swap_group
#define GLX_SGIX_swap_group 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif
#ifndef GLX_SGIX_swap_barrier
#define GLX_SGIX_swap_barrier 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
#endif
#ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
#endif
#ifndef GLX_MESA_copy_sub_buffer
#define GLX_MESA_copy_sub_buffer 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
#endif
#ifndef GLX_MESA_pixmap_colormap
#define GLX_MESA_pixmap_colormap 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
#endif
#ifndef GLX_MESA_release_buffers
#define GLX_MESA_release_buffers 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
#endif
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_MESA_set_3dfx_mode 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXSet3DfxModeMESA (int);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#endif
#ifndef GLX_SGIX_visual_select_group
#define GLX_SGIX_visual_select_group 1
#endif
#ifndef GLX_OML_swap_method
#define GLX_OML_swap_method 1
#endif
#ifndef GLX_OML_sync_control
#define GLX_OML_sync_control 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
#endif
#ifndef GLX_SGIX_hyperpipe_group
#define GLX_SGIX_hyperpipe_group 1
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
int networkId;
} GLXHyperpipeNetworkSGIX;
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
int channel;
unsigned int
participationType;
int timeSlice;
} GLXHyperpipeConfigSGIX;
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
int destXOrigin, destYOrigin, destWidth, destHeight;
} GLXPipeRect;
typedef struct {
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
int XOrigin, YOrigin, maxHeight, maxWidth;
} GLXPipeRectLimits;
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
extern int glXBindHyperpipeSGIX (Display *, int);
extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
#endif
#ifndef GLX_MESA_agp_offset
#define GLX_MESA_agp_offset 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern unsigned int glXGetAGPOffsetMESA (const void *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
#endif
#ifdef __cplusplus
}
#endif
#endif
@@ -1,478 +0,0 @@
/*
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file dri_interface.h
*
* This file contains all the types and functions that define the interface
* between a DRI driver and driver loader. Currently, the most common driver
* loader is the XFree86 libGL.so. However, other loaders do exist, and in
* the future the server-side libglx.a will also be a loader.
*
* \author Kevin E. Martin <[email protected]>
* \author Ian Romanick <[email protected]>
*/
#ifndef DRI_INTERFACE_H
#define DRI_INTERFACE_H
#include <GL/internal/glcore.h>
#include <xf86drm.h>
#include <drm.h>
/**
* \name DRI interface structures
*
* The following structures define the interface between the GLX client
* side library and the DRI (direct rendering infrastructure).
*/
/*@{*/
typedef struct __DRIdisplayRec __DRIdisplay;
typedef struct __DRIscreenRec __DRIscreen;
typedef struct __DRIcontextRec __DRIcontext;
typedef struct __DRIdrawableRec __DRIdrawable;
typedef struct __DRIdriverRec __DRIdriver;
typedef struct __DRIframebufferRec __DRIframebuffer;
typedef struct __DRIversionRec __DRIversion;
typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods;
typedef unsigned long __DRIid;
typedef void __DRInativeDisplay;
/*@}*/
/**
* \name Functions provided by the driver loader.
*/
/*@{*/
/**
* Type of a pointer to \c glXGetScreenDriver, as returned by
* \c glXGetProcAddress. This function is used to get the name of the DRI
* driver for the specified screen of the specified display. The driver
* name is typically used with \c glXGetDriverConfig.
*
* \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig
*/
typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum);
/**
* Type of a pointer to \c glXGetDriverConfig, as returned by
* \c glXGetProcAddress. This function is used to get the XML document
* describing the configuration options available for the specified driver.
*
* \sa glXGetDriverConfig, glXGetProcAddress, glXGetScreenDriver
*/
typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName);
/**
* Type of a pointer to \c glxEnableExtension, as returned by
* \c __DRIinterfaceMethods::getProcAddress. This function is used to enable
* a GLX extension on the specified screen.
*/
typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name );
/*@}*/
/**
* \name Functions and data provided by the driver.
*/
/*@{*/
typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn,
__DRIscreen *psc, const __GLcontextModes * modes,
const __DRIversion * ddx_version, const __DRIversion * dri_version,
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
void * pSAREA, int fd, int internal_api_version,
const __DRIinterfaceMethods * interface,
__GLcontextModes ** driver_modes);
typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC;
extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727;
/**
* XML document describing the configuration options supported by the
* driver.
*/
extern const char __driConfigOptions[];
/*@}*/
/**
* Stored version of some component (i.e., server-side DRI module, kernel-side
* DRM, etc.).
*
* \todo
* There are several data structures that explicitly store a major version,
* minor version, and patch level. These structures should be modified to
* have a \c __DRIversionRec instead.
*/
struct __DRIversionRec {
int major; /**< Major version number. */
int minor; /**< Minor version number. */
int patch; /**< Patch-level. */
};
typedef void (*__DRIfuncPtr)(void);
struct __DRIinterfaceMethodsRec {
/**
* Get pointer to named function.
*/
__DRIfuncPtr (*getProcAddress)( const char * proc_name );
/**
* Create a list of \c __GLcontextModes structures.
*/
__GLcontextModes * (*createContextModes)(unsigned count,
size_t minimum_bytes_per_struct);
/**
* Destroy a list of \c __GLcontextModes structures.
*
* \todo
* Determine if the drivers actually need to call this.
*/
void (*destroyContextModes)( __GLcontextModes * modes );
/**
* Get the \c __DRIscreen for a given display and screen number.
*/
__DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum);
/**
* \name Client/server protocol functions.
*
* These functions implement the DRI client/server protocol for
* context and drawable operations. Platforms that do not implement
* the wire protocol (e.g., EGL) will implement glorified no-op functions.
*/
/*@{*/
/**
* Determine if the specified window ID still exists.
*
* \note
* Implementations may assume that the driver will only pass an ID into
* this function that actually corresponds to a window. On
* implementations where windows can only be destroyed by the DRI driver
* (e.g., EGL), this function is allowed to always return \c GL_TRUE.
*/
GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw);
/**
* Create the server-side portion of the GL context.
*/
GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum,
int configID, void * contextID, drm_context_t * hw_context );
/**
* Destroy the server-side portion of the GL context.
*/
GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum,
__DRIid context );
/**
* Create the server-side portion of the drawable.
*/
GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable, drm_drawable_t * hHWDrawable );
/**
* Destroy the server-side portion of the drawable.
*/
GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable );
/**
* This function is used to get information about the position, size, and
* clip rects of a drawable.
*/
GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn,
__DRIid draw, unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
int * numClipRects, drm_clip_rect_t ** pClipRects,
int * backX, int * backY,
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
/*@}*/
/**
* \name Timing related functions.
*/
/*@{*/
/**
* Get the 64-bit unadjusted system time (UST).
*/
int (*getUST)(int64_t * ust);
/**
* Get the media stream counter (MSC) rate.
*
* Matching the definition in GLX_OML_sync_control, this function returns
* the rate of the "media stream counter". In practical terms, this is
* the frame refresh rate of the display.
*/
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator);
/*@}*/
};
/**
* Framebuffer information record. Used by libGL to communicate information
* about the framebuffer to the driver's \c __driCreateNewScreen function.
*
* In XFree86, most of this information is derrived from data returned by
* calling \c XF86DRIGetDeviceInfo.
*
* \sa XF86DRIGetDeviceInfo __DRIdisplayRec::createNewScreen
* __driUtilCreateNewScreen CallCreateNewScreen
*
* \bug This structure could be better named.
*/
struct __DRIframebufferRec {
unsigned char *base; /**< Framebuffer base address in the CPU's
* address space. This value is calculated by
* calling \c drmMap on the framebuffer handle
* returned by \c XF86DRIGetDeviceInfo (or a
* similar function).
*/
int size; /**< Framebuffer size, in bytes. */
int stride; /**< Number of bytes from one line to the next. */
int width; /**< Pixel width of the framebuffer. */
int height; /**< Pixel height of the framebuffer. */
int dev_priv_size; /**< Size of the driver's dev-priv structure. */
void *dev_priv; /**< Pointer to the driver's dev-priv structure. */
};
/**
* Screen dependent methods. This structure is initialized during the
* \c __DRIdisplayRec::createScreen call.
*/
struct __DRIscreenRec {
/**
* Method to destroy the private DRI screen data.
*/
void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate);
/**
* Method to create the private DRI drawable data and initialize the
* drawable dependent methods.
*/
void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
__DRIid draw, __DRIdrawable *pdraw,
int renderType, const int *attrs);
/**
* Method to return a pointer to the DRI drawable data.
*/
__DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw,
void *drawablePrivate);
/**
* Opaque pointer to private per screen direct rendering data. \c NULL
* if direct rendering is not supported on this screen. Never
* dereferenced in libGL.
*/
void *private;
/**
* Get the number of vertical refreshes since some point in time before
* this function was first called (i.e., system start up).
*
* \since Internal API version 20030317.
*/
int (*getMSC)( void *screenPrivate, int64_t *msc );
/**
* Opaque pointer that points back to the containing
* \c __GLXscreenConfigs. This data structure is shared with DRI drivers
* but \c __GLXscreenConfigs is not. However, they are needed by some GLX
* functions called by DRI drivers.
*
* \since Internal API version 20030813.
*/
void *screenConfigs;
/**
* Functions associated with MESA_allocate_memory.
*
* \since Internal API version 20030815.
*/
/*@{*/
void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size,
GLfloat readfreq, GLfloat writefreq,
GLfloat priority);
void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer);
GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer);
/*@}*/
/**
* Method to create the private DRI context data and initialize the
* context dependent methods.
*
* \since Internal API version 20031201.
*/
void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
int render_type,
void *sharedPrivate, __DRIcontext *pctx);
};
/**
* Context dependent methods. This structure is initialized during the
* \c __DRIscreenRec::createContext call.
*/
struct __DRIcontextRec {
/**
* Method to destroy the private DRI context data.
*/
void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate);
/**
* Opaque pointer to private per context direct rendering data.
* \c NULL if direct rendering is not supported on the display or
* screen used to create this context. Never dereferenced in libGL.
*/
void *private;
/**
* Pointer to the mode used to create this context.
*
* \since Internal API version 20040317.
*/
const __GLcontextModes * mode;
/**
* Method to bind a DRI drawable to a DRI graphics context.
*
* \since Internal API version 20050727.
*/
GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
__DRIid read, __DRIcontext *ctx);
/**
* Method to unbind a DRI drawable from a DRI graphics context.
*
* \since Internal API version 20050727.
*/
GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
__DRIid read, __DRIcontext *ctx);
};
/**
* Drawable dependent methods. This structure is initialized during the
* \c __DRIscreenRec::createDrawable call. \c createDrawable is not called
* by libGL at this time. It's currently used via the dri_util.c utility code
* instead.
*/
struct __DRIdrawableRec {
/**
* Method to destroy the private DRI drawable data.
*/
void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate);
/**
* Method to swap the front and back buffers.
*/
void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate);
/**
* Opaque pointer to private per drawable direct rendering data.
* \c NULL if direct rendering is not supported on the display or
* screen used to create this drawable. Never dereferenced in libGL.
*/
void *private;
/**
* Get the number of completed swap buffers for this drawable.
*
* \since Internal API version 20030317.
*/
int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc );
/**
* Wait for the SBC to be greater than or equal target_sbc.
*
* \since Internal API version 20030317.
*/
int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv,
int64_t target_sbc,
int64_t * msc, int64_t * sbc );
/**
* Wait for the MSC to equal target_msc, or, if that has already passed,
* the next time (MSC % divisor) is equal to remainder. If divisor is
* zero, the function will return as soon as MSC is greater than or equal
* to target_msc.
*
* \since Internal API version 20030317.
*/
int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv,
int64_t target_msc, int64_t divisor, int64_t remainder,
int64_t * msc, int64_t * sbc );
/**
* Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once
* rendering is complete, waits until MSC is equal to target_msc, or
* if that has already passed, waits until (MSC % divisor) is equal
* to remainder. If divisor is zero, the swap will happen as soon as
* MSC is greater than or equal to target_msc.
*
* \since Internal API version 20030317.
*/
int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate,
int64_t target_msc,
int64_t divisor, int64_t remainder);
/**
* Enable or disable frame usage tracking.
*
* \since Internal API version 20030317.
*/
int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable);
/**
* Retrieve frame usage information.
*
* \since Internal API version 20030317.
*/
int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate,
int64_t * sbc, int64_t * missedFrames,
float * lastMissedUsage, float * usage );
/**
* Used by drivers that implement the GLX_SGI_swap_control or
* GLX_MESA_swap_control extension.
*
* \since Internal API version 20030317.
*/
unsigned swap_interval;
};
#endif
@@ -1,498 +0,0 @@
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */
#ifndef __gl_core_h_
#define __gl_core_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
*/
#ifndef XFree86LOADER
#include <sys/types.h>
#endif
#ifdef CAPI
#undef CAPI
#endif
#define CAPI
#define GL_CORE_SGI 1
#define GL_CORE_MESA 2
#define GL_CORE_APPLE 4
typedef struct __GLcontextRec __GLcontext;
typedef struct __GLinterfaceRec __GLinterface;
/*
** This file defines the interface between the GL core and the surrounding
** "operating system" that supports it (currently the GLX or WGL extensions).
**
** Members (data and function pointers) are documented as imported or
** exported according to how they are used by the core rendering functions.
** Imported members are initialized by the "operating system" and used by
** the core functions. Exported members are initialized by the core functions
** and used by the "operating system".
*/
/*
** Mode and limit information for a context. This information is
** kept around in the context so that values can be used during
** command execution, and for returning information about the
** context to the application.
*/
typedef struct __GLcontextModesRec {
struct __GLcontextModesRec * next;
GLboolean rgbMode;
GLboolean floatMode;
GLboolean colorIndexMode;
GLuint doubleBufferMode;
GLuint stereoMode;
GLboolean haveAccumBuffer;
GLboolean haveDepthBuffer;
GLboolean haveStencilBuffer;
GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
GLuint redMask, greenMask, blueMask, alphaMask;
GLint rgbBits; /* total bits for rgb */
GLint indexBits; /* total bits for colorindex */
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
GLint depthBits;
GLint stencilBits;
GLint numAuxBuffers;
GLint level;
GLint pixmapMode;
/* GLX */
GLint visualID;
GLint visualType; /**< One of the GLX X visual types. (i.e.,
* \c GLX_TRUE_COLOR, etc.)
*/
/* EXT_visual_rating / GLX 1.2 */
GLint visualRating;
/* EXT_visual_info / GLX 1.2 */
GLint transparentPixel;
/* colors are floats scaled to ints */
GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
GLint transparentIndex;
/* ARB_multisample / SGIS_multisample */
GLint sampleBuffers;
GLint samples;
/* SGIX_fbconfig / GLX 1.3 */
GLint drawableType;
GLint renderType;
GLint xRenderable;
GLint fbconfigID;
/* SGIX_pbuffer / GLX 1.3 */
GLint maxPbufferWidth;
GLint maxPbufferHeight;
GLint maxPbufferPixels;
GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
/* SGIX_visual_select_group */
GLint visualSelectGroup;
/* OML_swap_method */
GLint swapMethod;
GLint screen;
} __GLcontextModes;
/* Several fields of __GLcontextModes can take these as values. Since
* GLX header files may not be available everywhere they need to be used,
* redefine them here.
*/
#define GLX_NONE 0x8000
#define GLX_SLOW_CONFIG 0x8001
#define GLX_TRUE_COLOR 0x8002
#define GLX_DIRECT_COLOR 0x8003
#define GLX_PSEUDO_COLOR 0x8004
#define GLX_STATIC_COLOR 0x8005
#define GLX_GRAY_SCALE 0x8006
#define GLX_STATIC_GRAY 0x8007
#define GLX_TRANSPARENT_RGB 0x8008
#define GLX_TRANSPARENT_INDEX 0x8009
#define GLX_NON_CONFORMANT_CONFIG 0x800D
#define GLX_SWAP_EXCHANGE_OML 0x8061
#define GLX_SWAP_COPY_OML 0x8062
#define GLX_SWAP_UNDEFINED_OML 0x8063
#define GLX_DONT_CARE 0xFFFFFFFF
#define GLX_RGBA_BIT 0x00000001
#define GLX_COLOR_INDEX_BIT 0x00000002
#define GLX_WINDOW_BIT 0x00000001
#define GLX_PIXMAP_BIT 0x00000002
#define GLX_PBUFFER_BIT 0x00000004
/************************************************************************/
/*
** Structure used for allocating and freeing drawable private memory.
** (like software buffers, for example).
**
** The memory allocation routines are provided by the surrounding
** "operating system" code, and they are to be used for allocating
** software buffers and things which are associated with the drawable,
** and used by any context which draws to that drawable. There are
** separate memory allocation functions for drawables and contexts
** since drawables and contexts can be created and destroyed independently
** of one another, and the "operating system" may want to use separate
** allocation arenas for each.
**
** The freePrivate function is filled in by the core routines when they
** allocates software buffers, and stick them in "private". The freePrivate
** function will destroy anything allocated to this drawable (to be called
** when the drawable is destroyed).
*/
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
typedef struct __GLregionRectRec {
/* lower left (inside the rectangle) */
GLint x0, y0;
/* upper right (outside the rectangle) */
GLint x1, y1;
} __GLregionRect;
struct __GLdrawableRegionRec {
GLint numRects;
__GLregionRect *rects;
__GLregionRect boundingRect;
};
/************************************************************************/
/* masks for the buffers */
#define __GL_FRONT_BUFFER_MASK 0x00000001
#define __GL_FRONT_LEFT_BUFFER_MASK 0x00000001
#define __GL_FRONT_RIGHT_BUFFER_MASK 0x00000002
#define __GL_BACK_BUFFER_MASK 0x00000004
#define __GL_BACK_LEFT_BUFFER_MASK 0x00000004
#define __GL_BACK_RIGHT_BUFFER_MASK 0x00000008
#define __GL_ACCUM_BUFFER_MASK 0x00000010
#define __GL_DEPTH_BUFFER_MASK 0x00000020
#define __GL_STENCIL_BUFFER_MASK 0x00000040
#define __GL_AUX_BUFFER_MASK(i) (0x0000080 << (i))
#define __GL_ALL_BUFFER_MASK 0xffffffff
/* what Resize routines return if resize resorted to fallback case */
#define __GL_BUFFER_FALLBACK 0x10
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits);
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf,
__GLdrawablePrivate *glPriv, GLint bits,
__GLbufFallbackInitFn back);
/*
** A drawable buffer
**
** This data structure describes the context side of a drawable.
**
** According to the spec there could be multiple contexts bound to the same
** drawable at the same time (from different threads). In order to avoid
** multiple-access conflicts, locks are used to serialize access. When a
** thread needs to access (read or write) a member of the drawable, it takes
** a lock first. Some of the entries in the drawable are treated "mostly
** constant", so we take the freedom of allowing access to them without
** taking a lock (for optimization reasons).
**
** For more details regarding locking, see buffers.h in the GL core
*/
struct __GLdrawableBufferRec {
/*
** Buffer dimensions
*/
GLint width, height, depth;
/*
** Framebuffer base address
*/
void *base;
/*
** Framebuffer size (in bytes)
*/
GLuint size;
/*
** Size (in bytes) of each element in the framebuffer
*/
GLuint elementSize;
GLuint elementSizeLog2;
/*
** Element skip from one scanline to the next.
** If the buffer is part of another buffer (for example, fullscreen
** front buffer), outerWidth is the width of that buffer.
*/
GLint outerWidth;
/*
** outerWidth * elementSize
*/
GLint byteWidth;
/*
** Allocation/deallocation is done based on this handle. A handle
** is conceptually different from the framebuffer 'base'.
*/
void *handle;
/* imported */
GLboolean (*resize)(__GLdrawableBuffer *buf,
GLint x, GLint y, GLuint width, GLuint height,
__GLdrawablePrivate *glPriv, GLuint bufferMask);
void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
GLuint val, GLint x, GLint y, GLint w, GLint h);
void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
/* exported */
void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
/* private */
void *other; /* implementation private data */
__GLbufMainInitFn mainInit;
__GLbufFallbackInitFn fallbackInit;
};
/*
** The context side of the drawable private
*/
struct __GLdrawablePrivateRec {
/*
** Drawable Modes
*/
__GLcontextModes *modes;
/*
** Drawable size
*/
GLuint width, height;
/*
** Origin in screen coordinates of the drawable
*/
GLint xOrigin, yOrigin;
#ifdef __GL_ALIGNED_BUFFERS
/*
** Drawable offset from screen origin
*/
GLint xOffset, yOffset;
/*
** Alignment restriction
*/
GLint xAlignment, yAlignment;
#endif
/*
** Should we invert the y axis?
*/
GLint yInverted;
/*
** Mask specifying which buffers are renderable by the hw
*/
GLuint accelBufferMask;
/*
** the buffers themselves
*/
__GLdrawableBuffer frontBuffer;
__GLdrawableBuffer backBuffer;
__GLdrawableBuffer accumBuffer;
__GLdrawableBuffer depthBuffer;
__GLdrawableBuffer stencilBuffer;
#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0)
__GLdrawableBuffer *auxBuffer;
#endif
__GLdrawableRegion ownershipRegion;
/*
** Lock for the drawable private structure
*/
void *lock;
#ifdef DEBUG
/* lock debugging info */
int lockRefCount;
int lockLine[10];
char *lockFile[10];
#endif
/* imported */
void *(*malloc)(size_t size);
void *(*calloc)(size_t numElem, size_t elemSize);
void *(*realloc)(void *oldAddr, size_t newSize);
void (*free)(void *addr);
GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*setClipRect)(__GLdrawablePrivate *glPriv,
GLint x, GLint y, GLsizei width, GLsizei height);
void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
GLboolean (*resize)(__GLdrawablePrivate *glPriv);
void (*getDrawableSize)(__GLdrawablePrivate *glPriv,
GLint *x, GLint *y, GLuint *width, GLuint *height);
void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
void (*unlockDP)(__GLdrawablePrivate *glPriv);
/* exported */
#ifdef __cplusplus
void *privatePtr;
#else
void *private;
#endif
void (*freePrivate)(__GLdrawablePrivate *);
/* client data */
void *other;
};
/*
** Macros to lock/unlock the drawable private
*/
#if defined(DEBUG)
#define __GL_LOCK_DP(glPriv,gc) \
(*(glPriv)->lockDP)(glPriv,gc); \
(glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
(glPriv)->lockRefCount++
#define __GL_UNLOCK_DP(glPriv) \
(glPriv)->lockRefCount--; \
(glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
(glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
(*(glPriv)->unlockDP)(glPriv)
#else /* DEBUG */
#define __GL_LOCK_DP(glPriv,gc) (*(glPriv)->lockDP)(glPriv,gc)
#define __GL_UNLOCK_DP(glPriv) (*(glPriv)->unlockDP)(glPriv)
#endif /* DEBUG */
/*
** Procedures which are imported by the GL from the surrounding
** "operating system". Math functions are not considered part of the
** "operating system".
*/
typedef struct __GLimportsRec {
/* Memory management */
void * (*malloc)(__GLcontext *gc, size_t size);
void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
void (*free)(__GLcontext *gc, void *addr);
/* Error handling */
void (*warning)(__GLcontext *gc, char *fmt);
void (*fatal)(__GLcontext *gc, char *fmt);
/* other system calls */
char *(CAPI *getenv)(__GLcontext *gc, const char *var);
int (CAPI *atoi)(__GLcontext *gc, const char *str);
int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
int (CAPI *fclose)(__GLcontext *gc, void *stream);
int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
/* Drawing surface management */
__GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
__GLdrawablePrivate *(*getReadablePrivate)(__GLcontext *gc);
/* Operating system dependent data goes here */
void *other;
} __GLimports;
/************************************************************************/
/*
** Procedures which are exported by the GL to the surrounding "operating
** system" so that it can manage multiple GL context's.
*/
typedef struct __GLexportsRec {
/* Context management (return GL_FALSE on failure) */
GLboolean (*destroyContext)(__GLcontext *gc);
GLboolean (*loseCurrent)(__GLcontext *gc);
/* oldglPriv isn't used anymore, kept for backwards compatibility */
GLboolean (*makeCurrent)(__GLcontext *gc);
GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
GLboolean (*forceCurrent)(__GLcontext *gc);
/* Drawing surface notification callbacks */
GLboolean (*notifyResize)(__GLcontext *gc);
void (*notifyDestroy)(__GLcontext *gc);
void (*notifySwapBuffers)(__GLcontext *gc);
/* Dispatch table override control for external agents like libGLS */
struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
void (*beginDispatchOverride)(__GLcontext *gc);
void (*endDispatchOverride)(__GLcontext *gc);
} __GLexports;
/************************************************************************/
/*
** This must be the first member of a __GLcontext structure. This is the
** only part of a context that is exposed to the outside world; everything
** else is opaque.
*/
struct __GLinterfaceRec {
__GLimports imports;
__GLexports exports;
};
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
extern void __glCoreNopDispatch(void);
#endif /* __gl_core_h_ */
@@ -1,94 +0,0 @@
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
/**
* \file sarea.h
* SAREA definitions.
*
* \author Kevin E. Martin <[email protected]>
* \author Jens Owen <[email protected]>
* \author Rickard E. (Rik) Faith <[email protected]>
*/
/*
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
#ifndef _SAREA_H_
#define _SAREA_H_
#include "xf86drm.h"
/* SAREA area needs to be at least a page */
#if defined(__alpha__)
#define SAREA_MAX 0x2000
#elif defined(__ia64__)
#define SAREA_MAX 0x10000 /* 64kB */
#else
/* Intel 830M driver needs at least 8k SAREA */
#define SAREA_MAX 0x2000
#endif
#define SAREA_MAX_DRAWABLES 256
#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
/**
* SAREA per drawable information.
*
* \sa _XF86DRISAREA.
*/
typedef struct _XF86DRISAREADrawable {
unsigned int stamp;
unsigned int flags;
} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
/**
* SAREA frame information.
*
* \sa _XF86DRISAREA.
*/
typedef struct _XF86DRISAREAFrame {
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int height;
unsigned int fullscreen;
} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
/**
* SAREA definition.
*/
typedef struct _XF86DRISAREA {
/** first thing is always the DRM locking structure */
drmLock lock;
/** \todo Use readers/writer lock for drawable_lock */
drmLock drawable_lock;
XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
XF86DRISAREAFrameRec frame;
drm_context_t dummy_context;
} XF86DRISAREARec, *XF86DRISAREAPtr;
#endif
-123
View File
@@ -1,123 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 3.1
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* prototypes for the Mesa WGL functions */
/* relocated here so that I could make GLUT get them properly */
#define _mesa_wgl_h_
#ifndef _mesa_wgl_h_
#define _mesa_wgl_h_
#include <GL/gl.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
#endif /* WIN32 / CYGWIN32 bracket */
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
# ifdef UNICODE
# define wglUseFontBitmaps wglUseFontBitmapsW
# define wglUseFontOutlines wglUseFontOutlinesW
# else
# define wglUseFontBitmaps wglUseFontBitmapsA
# define wglUseFontOutlines wglUseFontOutlinesA
# endif /* !UNICODE */
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
#endif
#ifdef _MSC_VER
# pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
# pragma warning( push )
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
#endif
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
#ifdef _MSC_VER
# pragma warning( pop )
#endif
#ifdef __cplusplus
}
#endif
#endif /* _mesa_wgl_h_ */
-79
View File
@@ -1,79 +0,0 @@
/****************************************************************************
*
* Mesa bindings for SciTech MGL
*
* Copyright (C) 1996 SciTech Software.
* All rights reserved.
*
* Filename: mglmesa.h
* Version: Revision: 1.1.1.1
*
* Language: ANSI C
* Environment: Any
*
* Description: Header file for the Mesa/OpenGL interface bindings for the
* SciTech MGL graphics library. Uses the MGL internal
* device context structures to get direct access to the
* high performance MGL rasterization functions for maximum
* performance. Utilizes the VESA VBE/AF Accelerator Functions
* via the MGL's accelerated device driver functions, as well
* as basic DirectDraw accelerated functions provided by the
* MGL.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
****************************************************************************/
#ifndef __MGLMESA_H
#define __MGLMESA_H
#include "mgraph.h"
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" { /* Use "C" linkage when in C++ mode */
#endif
#ifndef __WINDOWS__
#define GLAPIENTRY
#endif
#ifdef __WINDOWS__
bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
#endif
void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
/* Palette manipulation support. The reason we provide palette manipulation
* routines is so that when rendering in double buffered modes with a
* software backbuffer, the palette for the backbuffer is kept consistent
* with the hardware front buffer.
*/
void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
#ifdef __cplusplus
} /* End of "C" linkage for C++ */
#endif /* __cplusplus */
#endif /* __MGLMESA_H */
-280
View File
@@ -1,280 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.3
*
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* Mesa Off-Screen rendering interface.
*
* This is an operating system and window system independent interface to
* Mesa which allows one to render images into a client-supplied buffer in
* main memory. Such images may manipulated or saved in whatever way the
* client wants.
*
* These are the API functions:
* OSMesaCreateContext - create a new Off-Screen Mesa rendering context
* OSMesaMakeCurrent - bind an OSMesaContext to a client's image buffer
* and make the specified context the current one.
* OSMesaDestroyContext - destroy an OSMesaContext
* OSMesaGetCurrentContext - return thread's current context ID
* OSMesaPixelStore - controls how pixels are stored in image buffer
* OSMesaGetIntegerv - return OSMesa state parameters
*
*
* The limits on the width and height of an image buffer are MAX_WIDTH and
* MAX_HEIGHT as defined in Mesa/src/config.h. Defaults are 1280 and 1024.
* You can increase them as needed but beware that many temporary arrays in
* Mesa are dimensioned by MAX_WIDTH or MAX_HEIGHT.
*/
#ifndef OSMESA_H
#define OSMESA_H
#ifdef __cplusplus
extern "C" {
#endif
#include <GL/gl.h>
#define OSMESA_MAJOR_VERSION 6
#define OSMESA_MINOR_VERSION 3
#define OSMESA_PATCH_VERSION 0
/*
* Values for the format parameter of OSMesaCreateContext()
* New in version 2.0.
*/
#define OSMESA_COLOR_INDEX GL_COLOR_INDEX
#define OSMESA_RGBA GL_RGBA
#define OSMESA_BGRA 0x1
#define OSMESA_ARGB 0x2
#define OSMESA_RGB GL_RGB
#define OSMESA_BGR 0x4
#define OSMESA_RGB_565 0x5
/*
* OSMesaPixelStore() parameters:
* New in version 2.0.
*/
#define OSMESA_ROW_LENGTH 0x10
#define OSMESA_Y_UP 0x11
/*
* Accepted by OSMesaGetIntegerv:
*/
#define OSMESA_WIDTH 0x20
#define OSMESA_HEIGHT 0x21
#define OSMESA_FORMAT 0x22
#define OSMESA_TYPE 0x23
#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */
#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */
typedef struct osmesa_context *OSMesaContext;
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export on
#endif
/*
* Create an Off-Screen Mesa rendering context. The only attribute needed is
* an RGBA vs Color-Index mode flag.
*
* Input: format - one of OSMESA_COLOR_INDEX, OSMESA_RGBA, OSMESA_BGRA,
* OSMESA_ARGB, OSMESA_RGB, or OSMESA_BGR.
* sharelist - specifies another OSMesaContext with which to share
* display lists. NULL indicates no sharing.
* Return: an OSMesaContext or 0 if error
*/
GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContext( GLenum format, OSMesaContext sharelist );
/*
* Create an Off-Screen Mesa rendering context and specify desired
* size of depth buffer, stencil buffer and accumulation buffer.
* If you specify zero for depthBits, stencilBits, accumBits you
* can save some memory.
*
* New in Mesa 3.5
*/
GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
GLint accumBits, OSMesaContext sharelist);
/*
* Destroy an Off-Screen Mesa rendering context.
*
* Input: ctx - the context to destroy
*/
GLAPI void GLAPIENTRY
OSMesaDestroyContext( OSMesaContext ctx );
/*
* Bind an OSMesaContext to an image buffer. The image buffer is just a
* block of memory which the client provides. Its size must be at least
* as large as width*height*sizeof(type). Its address should be a multiple
* of 4 if using RGBA mode.
*
* Image data is stored in the order of glDrawPixels: row-major order
* with the lower-left image pixel stored in the first array position
* (ie. bottom-to-top).
*
* Since the only type initially supported is GL_UNSIGNED_BYTE, if the
* context is in RGBA mode, each pixel will be stored as a 4-byte RGBA
* value. If the context is in color indexed mode, each pixel will be
* stored as a 1-byte value.
*
* If the context's viewport hasn't been initialized yet, it will now be
* initialized to (0,0,width,height).
*
* Input: ctx - the rendering context
* buffer - the image buffer memory
* type - data type for pixel components, only GL_UNSIGNED_BYTE
* supported now
* width, height - size of image buffer in pixels, at least 1
* Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx,
* invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
* width>internal limit or height>internal limit.
*/
GLAPI GLboolean GLAPIENTRY
OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
GLsizei width, GLsizei height );
/*
* Return the current Off-Screen Mesa rendering context handle.
*/
GLAPI OSMesaContext GLAPIENTRY
OSMesaGetCurrentContext( void );
/*
* Set pixel store/packing parameters for the current context.
* This is similar to glPixelStore.
* Input: pname - OSMESA_ROW_LENGTH
* specify actual pixels per row in image buffer
* 0 = same as image width (default)
* OSMESA_Y_UP
* zero = Y coordinates increase downward
* non-zero = Y coordinates increase upward (default)
* value - the value for the parameter pname
*
* New in version 2.0.
*/
GLAPI void GLAPIENTRY
OSMesaPixelStore( GLint pname, GLint value );
/*
* Return an integer value like glGetIntegerv.
* Input: pname -
* OSMESA_WIDTH return current image width
* OSMESA_HEIGHT return current image height
* OSMESA_FORMAT return image format
* OSMESA_TYPE return color component data type
* OSMESA_ROW_LENGTH return row length in pixels
* OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
* value - pointer to integer in which to return result.
*/
GLAPI void GLAPIENTRY
OSMesaGetIntegerv( GLint pname, GLint *value );
/*
* Return the depth buffer associated with an OSMesa context.
* Input: c - the OSMesa context
* Output: width, height - size of buffer in pixels
* bytesPerValue - bytes per depth value (2 or 4)
* buffer - pointer to depth buffer values
* Return: GL_TRUE or GL_FALSE to indicate success or failure.
*
* New in Mesa 2.4.
*/
GLAPI GLboolean GLAPIENTRY
OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
GLint *bytesPerValue, void **buffer );
/*
* Return the color buffer associated with an OSMesa context.
* Input: c - the OSMesa context
* Output: width, height - size of buffer in pixels
* format - buffer format (OSMESA_FORMAT)
* buffer - pointer to depth buffer values
* Return: GL_TRUE or GL_FALSE to indicate success or failure.
*
* New in Mesa 3.3.
*/
GLAPI GLboolean GLAPIENTRY
OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height,
GLint *format, void **buffer );
/**
* This typedef is new in Mesa 6.3.
*/
typedef void (*OSMESAproc)();
/*
* Return pointer to the named function.
* New in Mesa 4.1
* Return OSMESAproc in 6.3.
*/
GLAPI OSMESAproc GLAPIENTRY
OSMesaGetProcAddress( const char *funcName );
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off
#endif
#ifdef __cplusplus
}
#endif
#endif
-97
View File
@@ -1,97 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.0
* Copyright (C) 1995-2001 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* SVGA/Mesa interface for Linux.
*/
/*
* Intro to using the VGA/Mesa interface
*
* 1. #include the <vga.h> file
* 2. Call vga_init() to initialize the SVGA library.
* 3. Call vga_setmode() to specify the screen size and color depth.
* 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit
* color Mesa assumes color index mode, if using 16-bit or deeper color
* Mesa assumes RGB mode.
* 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
* 6. You can now use the Mesa API functions.
* 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
* to restore the original text screen.
*
* Notes
* 1. You must run your executable as root (or use the set UID-bit) because
* the SVGA library requires it.
* 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what
* has to be done yet.
*/
#ifndef SVGAMESA_H
#define SVGAMESA_H
#define SVGAMESA_MAJOR_VERSION 4
#define SVGAMESA_MINOR_VERSION 0
#ifdef __cplusplus
extern "C" {
#endif
#include "GL/gl.h"
/*
* This is the SVGAMesa context 'handle':
*/
typedef struct svgamesa_context *SVGAMesaContext;
/*
* doubleBuffer flag new in version 2.4
*/
extern int SVGAMesaInit( int GraphMode );
extern int SVGAMesaClose( void );
extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
extern void SVGAMesaSwapBuffers( void );
extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
#ifdef __cplusplus
}
#endif
#endif
@@ -1,45 +0,0 @@
/* uglglutshapes.h - Public header GLUT Shapes */
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
/* This program is freely distributable without licensing fees and is
provided without guarantee or warrantee expressed or implied. This
program is -not- in the public domain. */
#ifndef GLUTSHAPES_H
#define GLUTSHAPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <GL/gl.h>
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
void glutWireCone (GLdouble base, GLdouble height,
GLint slices, GLint stacks);
void glutSolidCone (GLdouble base, GLdouble height,
GLint slices, GLint stacks);
void glutWireCube (GLdouble size);
void glutSolidCube (GLdouble size);
void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
GLint sides, GLint rings);
void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
GLint sides, GLint rings);
void glutWireDodecahedron (void);
void glutSolidDodecahedron (void);
void glutWireOctahedron (void);
void glutSolidOctahedron (void);
void glutWireTetrahedron (void);
void glutSolidTetrahedron (void);
void glutWireIcosahedron (void);
void glutSolidIcosahedron (void);
void glutWireTeapot (GLdouble size);
void glutSolidTeapot (GLdouble size);
#ifdef __cplusplus
}
#endif
#endif
-155
View File
@@ -1,155 +0,0 @@
/* uglmesa.h - Public header UGL/Mesa */
/* Copyright (C) 2001 by Wind River Systems, Inc */
/*
* Mesa 3-D graphics library
* Version: 4.0
*
* The MIT License
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* Author:
* Stephane Raimbault <[email protected]>
*/
#ifndef UGLMESA_H
#define UGLMESA_H
#ifdef __cplusplus
extern "C" {
#endif
#define UGL_MESA_MAJOR_VERSION 4
#define UGL_MESA_MINOR_VERSION 0
#include <GL/gl.h>
#include <ugl/ugl.h>
/*
* Values for display mode of uglMesaCreateContext ()
*/
/*
* With these mask values, it's possible to test double buffer mode
* with UGL_MESA_DOUBLE mask
*
* SINGLE 0000 0001
* DOUBLE 0000 0110
* - SOFT 0000 0010
* - HARD 0000 0100
* WINDML 0001 0000
*
*
*/
#define UGL_MESA_SINGLE 0x01
#define UGL_MESA_DOUBLE 0x06
#define UGL_MESA_DOUBLE_SOFTWARE 0x02
#define UGL_MESA_DOUBLE_HARDWARE 0x04
#define UGL_MESA_WINDML_EXCLUSIVE 0x10
#define UGL_MESA_FULLSCREEN_WIDTH 0x0
#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
/*
* uglMesaPixelStore() parameters:
*/
#define UGL_MESA_ROW_LENGTH 0x20
#define UGL_MESA_Y_UP 0x21
/*
* Accepted by uglMesaGetIntegerv:
*/
#define UGL_MESA_LEFT_X 0x01
#define UGL_MESA_TOP_Y 0x02
#define UGL_MESA_WIDTH 0x03
#define UGL_MESA_HEIGHT 0x04
#define UGL_MESA_DISPLAY_WIDTH 0x05
#define UGL_MESA_DISPLAY_HEIGHT 0x06
#define UGL_MESA_COLOR_FORMAT 0x07
#define UGL_MESA_COLOR_MODEL 0x08
#define UGL_MESA_PIXEL_FORMAT 0x09
#define UGL_MESA_TYPE 0x0A
#define UGL_MESA_RGB 0x0B
#define UGL_MESA_COLOR_INDEXED 0x0C
#define UGL_MESA_SINGLE_BUFFER 0x0D
#define UGL_MESA_DOUBLE_BUFFER 0x0E
#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
/*
* typedefs
*/
typedef struct uglMesaContext * UGL_MESA_CONTEXT;
UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
UGL_MESA_CONTEXT share_list);
UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode,
GLint depth_bits,
GLint stencil_bits,
GLint accum_red_bits,
GLint accum_green_bits,
GLint accum_blue_bits,
GLint accum_alpha_bits,
UGL_MESA_CONTEXT share_list);
GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
GLsizei left, GLsizei top,
GLsizei width, GLsizei height);
GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
void uglMesaDestroyContext (void);
UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
void uglMesaSwapBuffers (void);
void uglMesaPixelStore (GLint pname, GLint value);
void uglMesaGetIntegerv (GLint pname, GLint *value);
GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
GLint *bytesPerValue, void **buffer);
GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
GLint *format, void **buffer);
GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
GLfloat green, GLfloat blue);
#ifdef __cplusplus
}
#endif
#endif
-880
View File
@@ -1,880 +0,0 @@
/***************************************************************************
* *
* Repair definitions of Xlib when compileing with /name=(as_is) on VMS *
* *
* Author : Jouk Jansen ([email protected]) *
* *
* Last revision : 22 August 2000 *
* *
***************************************************************************/
#ifndef VMS_X_FIX
#define VMS_X_FIX
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
#define XAllocClassHint XALLOCCLASSHINT
#define XAllocColor XALLOCCOLOR
#define XAllocColorCells XALLOCCOLORCELLS
#define XAllocSizeHints XALLOCSIZEHINTS
#define XAllocWMHints XALLOCWMHINTS
#define XAutoRepeatOff XAUTOREPEATOFF
#define XAutoRepeatOn XAUTOREPEATON
#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET
#define XBell XBELL
#define XBitmapPad XBITMAPPAD
#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB
#define XChangeGC XCHANGEGC
#define XChangeProperty XCHANGEPROPERTY
#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES
#define XCheckIfEvent XCHECKIFEVENT
#define XCheckMaskEvent XCHECKMASKEVENT
#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT
#define XCheckWindowEvent XCHECKWINDOWEVENT
#define XClearArea XCLEARAREA
#define XClearWindow XCLEARWINDOW
#define XClipBox XCLIPBOX
#define XCloseDisplay XCLOSEDISPLAY
#define XCloseIM XCLOSEIM
#define XConfigureWindow XCONFIGUREWINDOW
#define XConvertSelection XCONVERTSELECTION
#define XCopyArea XCOPYAREA
#define XCopyGC XCOPYGC
#define XCopyPlane XCOPYPLANE
#define XCreateBitmapFromData XCREATEBITMAPFROMDATA
#define XCreateColormap XCREATECOLORMAP
#define XCreateFontCursor XCREATEFONTCURSOR
#define XCreateFontSet XCREATEFONTSET
#define XCreateGC XCREATEGC
#define XCreateIC XCREATEIC
#define XCreateImage XCREATEIMAGE
#define XCreatePixmap XCREATEPIXMAP
#define XCreatePixmapCursor XCREATEPIXMAPCURSOR
#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA
#define XCreateRegion XCREATEREGION
#define XCreateSimpleWindow XCREATESIMPLEWINDOW
#define XCreateWindow XCREATEWINDOW
#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY
#define XDefineCursor XDEFINECURSOR
#define XDeleteProperty XDELETEPROPERTY
#define XDestroyIC XDESTROYIC
#define XDestroyRegion XDESTROYREGION
#define XDestroyWindow XDESTROYWINDOW
#define XDisplayName XDISPLAYNAME
#define XDisplayOfScreen XDISPLAYOFSCREEN
#define XDrawArc XDRAWARC
#define XDrawImageString XDRAWIMAGESTRING
#define XDrawImageString16 XDRAWIMAGESTRING16
#define XDrawLine XDRAWLINE
#define XDrawLines XDRAWLINES
#define XDrawPoint XDRAWPOINT
#define XDrawPoints XDRAWPOINTS
#define XDrawRectangle XDRAWRECTANGLE
#define XDrawSegments XDRAWSEGMENTS
#define XDrawString XDRAWSTRING
#define XDrawString16 XDRAWSTRING16
#define XEmptyRegion XEMPTYREGION
#define XEqualRegion XEQUALREGION
#define XEventsQueued XEVENTSQUEUED
#define XExtentsOfFontSet XEXTENTSOFFONTSET
#define XFillArc XFILLARC
#define XFillPolygon XFILLPOLYGON
#define XFillRectangle XFILLRECTANGLE
#define XFillRectangles XFILLRECTANGLES
#define XFilterEvent XFILTEREVENT
#define XFlush XFLUSH
#define XFontsOfFontSet XFONTSOFFONTSET
#define XFree XFREE
#define XFreeColormap XFREECOLORMAP
#define XFreeColors XFREECOLORS
#define XFreeCursor XFREECURSOR
#define XFreeFont XFREEFONT
#define XFreeFontInfo XFREEFONTINFO
#define XFreeFontNames XFREEFONTNAMES
#define XFreeFontSet XFREEFONTSET
#define XFreeGC XFREEGC
#define XFreeModifiermap XFREEMODIFIERMAP
#define XFreePixmap XFREEPIXMAP
#define XFreeStringList XFREESTRINGLIST
#define XGetAtomName XGETATOMNAME
#define XGetDefault XGETDEFAULT
#define XGetErrorDatabaseText XGETERRORDATABASETEXT
#define XGetErrorText XGETERRORTEXT
#define XGetFontProperty XGETFONTPROPERTY
#define XGetGCValues XGETGCVALUES
#define XGetGeometry XGETGEOMETRY
#define XGetICValues XGETICVALUES
#define XGetIMValues XGETIMVALUES
#define XGetImage XGETIMAGE
#define XGetKeyboardControl XGETKEYBOARDCONTROL
#define XGetModifierMapping XGETMODIFIERMAPPING
#define XGetMotionEvents XGETMOTIONEVENTS
#define XGetNormalHints XGETNORMALHINTS
#define XGetSelectionOwner XGETSELECTIONOWNER
#define XGetSubImage XGETSUBIMAGE
#define XGetVisualInfo XGETVISUALINFO
#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS
#define XGetWMHints XGETWMHINTS
#define XGetWMName XGETWMNAME
#define XGetWMNormalHints XGETWMNORMALHINTS
#define XGetWindowAttributes XGETWINDOWATTRIBUTES
#define XGetWindowProperty XGETWINDOWPROPERTY
#define XGrabKeyboard XGRABKEYBOARD
#define XGrabPointer XGRABPOINTER
#define XGrabServer XGRABSERVER
#define XHeightOfScreen XHEIGHTOFSCREEN
#define XIfEvent XIFEVENT
#define XInternAtom XINTERNATOM
#define XIntersectRegion XINTERSECTREGION
#define XKeycodeToKeysym XKEYCODETOKEYSYM
#define XKeysymToKeycode XKEYSYMTOKEYCODE
#define XKeysymToString XKEYSYMTOSTRING
#define XListFonts XLISTFONTS
#define XListFontsWithInfo XLISTFONTSWITHINFO
#define XListPixmapFormats XLISTPIXMAPFORMATS
#define XListProperties XLISTPROPERTIES
#define XLoadQueryFont XLOADQUERYFONT
#define XLookupString XLOOKUPSTRING
#define XLowerWindow XLOWERWINDOW
#define XMapRaised XMAPRAISED
#define XMapWindow XMAPWINDOW
#define XMatchVisualInfo XMATCHVISUALINFO
#define XMoveResizeWindow XMOVERESIZEWINDOW
#define XMoveWindow XMOVEWINDOW
#define XNextEvent XNEXTEVENT
#define XOffsetRegion XOFFSETREGION
#define XOpenDisplay XOPENDISPLAY
#define XOpenIM XOPENIM
#define XParseColor XPARSECOLOR
#define XParseGeometry XPARSEGEOMETRY
#define XPeekEvent XPEEKEVENT
#define XPending XPENDING
#define XPointInRegion XPOINTINREGION
#define XPolygonRegion XPOLYGONREGION
#define XPutBackEvent XPUTBACKEVENT
#define XPutImage XPUTIMAGE
#define XQueryColor XQUERYCOLOR
#define XQueryColors XQUERYCOLORS
#define XQueryExtension XQUERYEXTENSION
#define XQueryPointer XQUERYPOINTER
#define XQueryTree XQUERYTREE
#define XRaiseWindow XRAISEWINDOW
#define XReconfigureWMWindow XRECONFIGUREWMWINDOW
#define XRectInRegion XRECTINREGION
#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING
#define XReparentWindow XREPARENTWINDOW
#define XResizeWindow XRESIZEWINDOW
#define XRestackWindows XRESTACKWINDOWS
#define XRootWindowOfScreen XROOTWINDOWOFSCREEN
#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN
#define XSelectAsyncEvent XSELECTASYNCEVENT
#define XSelectAsyncInput XSELECTASYNCINPUT
#define XSelectInput XSELECTINPUT
#define XSendEvent XSENDEVENT
#define XServerVendor XSERVERVENDOR
#define XSetBackground XSETBACKGROUND
#define XSetClassHint XSETCLASSHINT
#define XSetClipMask XSETCLIPMASK
#define XSetClipOrigin XSETCLIPORIGIN
#define XSetClipRectangles XSETCLIPRECTANGLES
#define XSetCloseDownMode XSETCLOSEDOWNMODE
#define XSetCommand XSETCOMMAND
#define XSetDashes XSETDASHES
#define XSetErrorHandler XSETERRORHANDLER
#define XSetFillStyle XSETFILLSTYLE
#define XSetFont XSETFONT
#define XSetForeground XSETFOREGROUND
#define XSetFunction XSETFUNCTION
#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES
#define XSetICFocus XSETICFOCUS
#define XSetICValues XSETICVALUES
#define XSetIOErrorHandler XSETIOERRORHANDLER
#define XSetInputFocus XSETINPUTFOCUS
#define XSetLineAttributes XSETLINEATTRIBUTES
#define XSetLocaleModifiers XSETLOCALEMODIFIERS
#define XSetNormalHints XSETNORMALHINTS
#define XSetRegion XSETREGION
#define XSetSelectionOwner XSETSELECTIONOWNER
#define XSetStipple XSETSTIPPLE
#define XSetSubwindowMode XSETSUBWINDOWMODE
#define XSetTSOrigin XSETTSORIGIN
#define XSetTile XSETTILE
#define XSetTransientForHint XSETTRANSIENTFORHINT
#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS
#define XSetWMHints XSETWMHINTS
#define XSetWMIconName XSETWMICONNAME
#define XSetWMName XSETWMNAME
#define XSetWMNormalHints XSETWMNORMALHINTS
#define XSetWMProperties XSETWMPROPERTIES
#define XSetWMProtocols XSETWMPROTOCOLS
#define XSetWindowBackground XSETWINDOWBACKGROUND
#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP
#define XSetWindowColormap XSETWINDOWCOLORMAP
#define XShapeCombineMask XSHAPECOMBINEMASK
#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES
#define XShapeGetRectangles XSHAPEGETRECTANGLES
#define XShrinkRegion XSHRINKREGION
#define XStoreColor XSTORECOLOR
#define XStoreColors XSTORECOLORS
#define XStoreName XSTORENAME
#define XStringToKeysym XSTRINGTOKEYSYM
#define XSubtractRegion XSUBTRACTREGION
#define XSupportsLocale XSUPPORTSLOCALE
#define XSync XSYNC
#define XSynchronize XSYNCHRONIZE
#define XTextExtents XTEXTEXTENTS
#define XTextExtents16 XTEXTEXTENTS16
#define XTextWidth XTEXTWIDTH
#define XTextWidth16 XTEXTWIDTH16
#define XTranslateCoordinates XTRANSLATECOORDINATES
#define XUndefineCursor XUNDEFINECURSOR
#define XUngrabKeyboard XUNGRABKEYBOARD
#define XUngrabPointer XUNGRABPOINTER
#define XUngrabServer XUNGRABSERVER
#define XUnionRectWithRegion XUNIONRECTWITHREGION
#define XUnionRegion XUNIONREGION
#define XUnmapWindow XUNMAPWINDOW
#define _XUnregisterFilter _XUNREGISTERFILTER
#define XUnsetICFocus XUNSETICFOCUS
#define XVaCreateNestedList XVACREATENESTEDLIST
#define XVisualIDFromVisual XVISUALIDFROMVISUAL
#define XWidthOfScreen XWIDTHOFSCREEN
#define XWindowEvent XWINDOWEVENT
#define XWithdrawWindow XWITHDRAWWINDOW
#define XXorRegion XXORREGION
#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK
#define XmAddProtocols XMADDPROTOCOLS
#define XmChangeColor XMCHANGECOLOR
#define XmClipboardCopy XMCLIPBOARDCOPY
#define XmClipboardEndCopy XMCLIPBOARDENDCOPY
#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH
#define XmClipboardLock XMCLIPBOARDLOCK
#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE
#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY
#define XmClipboardUnlock XMCLIPBOARDUNLOCK
#define XmCreateArrowButton XMCREATEARROWBUTTON
#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET
#define XmCreateCascadeButton XMCREATECASCADEBUTTON
#define XmCreateDialogShell XMCREATEDIALOGSHELL
#define XmCreateDragIcon XMCREATEDRAGICON
#define XmCreateDrawingArea XMCREATEDRAWINGAREA
#define XmCreateDrawnButton XMCREATEDRAWNBUTTON
#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX
#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG
#define XmCreateForm XMCREATEFORM
#define XmCreateFormDialog XMCREATEFORMDIALOG
#define XmCreateFrame XMCREATEFRAME
#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG
#define XmCreateLabelGadget XMCREATELABELGADGET
#define XmCreateMainWindow XMCREATEMAINWINDOW
#define XmCreateMenuBar XMCREATEMENUBAR
#define XmCreateMessageBox XMCREATEMESSAGEBOX
#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG
#define XmCreateOptionMenu XMCREATEOPTIONMENU
#define XmCreatePanedWindow XMCREATEPANEDWINDOW
#define XmCreatePopupMenu XMCREATEPOPUPMENU
#define XmCreatePromptDialog XMCREATEPROMPTDIALOG
#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU
#define XmCreatePushButton XMCREATEPUSHBUTTON
#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET
#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG
#define XmCreateRadioBox XMCREATERADIOBOX
#define XmCreateRowColumn XMCREATEROWCOLUMN
#define XmCreateScale XMCREATESCALE
#define XmCreateScrollBar XMCREATESCROLLBAR
#define XmCreateScrolledList XMCREATESCROLLEDLIST
#define XmCreateScrolledText XMCREATESCROLLEDTEXT
#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW
#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG
#define XmCreateSeparator XMCREATESEPARATOR
#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET
#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG
#define XmCreateText XMCREATETEXT
#define XmCreateTextField XMCREATETEXTFIELD
#define XmCreateToggleButton XMCREATETOGGLEBUTTON
#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET
#define XmDragStart XMDRAGSTART
#define XmDropSiteRegister XMDROPSITEREGISTER
#define XmDropSiteUnregister XMDROPSITEUNREGISTER
#define XmDropSiteUpdate XMDROPSITEUPDATE
#define XmDropTransferStart XMDROPTRANSFERSTART
#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD
#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH
#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY
#define XmFontListCopy XMFONTLISTCOPY
#define XmFontListCreate XMFONTLISTCREATE
#define XmFontListEntryCreate XMFONTLISTENTRYCREATE
#define XmFontListEntryFree XMFONTLISTENTRYFREE
#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT
#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG
#define XmFontListEntryLoad XMFONTLISTENTRYLOAD
#define XmFontListFree XMFONTLISTFREE
#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT
#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT
#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT
#define XmFontListNextEntry XMFONTLISTNEXTENTRY
#define XmGetColors XMGETCOLORS
#define XmGetFocusWidget XMGETFOCUSWIDGET
#define XmGetMenuCursor XMGETMENUCURSOR
#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH
#define XmGetTearOffControl XMGETTEAROFFCONTROL
#define XmGetXmDisplay XMGETXMDISPLAY
#define XmImMbLookupString XMIMMBLOOKUPSTRING
#define XmImRegister XMIMREGISTER
#define XmImSetFocusValues XMIMSETFOCUSVALUES
#define XmImSetValues XMIMSETVALUES
#define XmImUnregister XMIMUNREGISTER
#define XmImUnsetFocus XMIMUNSETFOCUS
#define XmInternAtom XMINTERNATOM
#define XmIsMotifWMRunning XMISMOTIFWMRUNNING
#define XmListAddItem XMLISTADDITEM
#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED
#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED
#define XmListDeleteAllItems XMLISTDELETEALLITEMS
#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS
#define XmListDeletePos XMLISTDELETEPOS
#define XmListDeselectAllItems XMLISTDESELECTALLITEMS
#define XmListDeselectPos XMLISTDESELECTPOS
#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS
#define XmListGetMatchPos XMLISTGETMATCHPOS
#define XmListGetSelectedPos XMLISTGETSELECTEDPOS
#define XmListPosSelected XMLISTPOSSELECTED
#define XmListSelectItem XMLISTSELECTITEM
#define XmListSelectPos XMLISTSELECTPOS
#define XmListSetBottomPos XMLISTSETBOTTOMPOS
#define XmListSetItem XMLISTSETITEM
#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS
#define XmListSetPos XMLISTSETPOS
#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS
#define XmMenuPosition XMMENUPOSITION
#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD
#define XmOptionButtonGadget XMOPTIONBUTTONGADGET
#define XmOptionLabelGadget XMOPTIONLABELGADGET
#define XmProcessTraversal XMPROCESSTRAVERSAL
#define XmQmotif XMQMOTIF
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
#define XmRepTypeGetId XMREPTYPEGETID
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
#define XmRepTypeRegister XMREPTYPEREGISTER
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS
#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD
#define XmStringByteCompare XMSTRINGBYTECOMPARE
#define XmStringCompare XMSTRINGCOMPARE
#define XmStringConcat XMSTRINGCONCAT
#define XmStringCopy XMSTRINGCOPY
#define XmStringCreate XMSTRINGCREATE
#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED
#define XmStringCreateLtoR XMSTRINGCREATELTOR
#define XmStringCreateSimple XMSTRINGCREATESIMPLE
#define XmStringDraw XMSTRINGDRAW
#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE
#define XmStringExtent XMSTRINGEXTENT
#define XmStringFree XMSTRINGFREE
#define XmStringFreeContext XMSTRINGFREECONTEXT
#define XmStringGetLtoR XMSTRINGGETLTOR
#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT
#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT
#define XmStringInitContext XMSTRINGINITCONTEXT
#define XmStringLength XMSTRINGLENGTH
#define XmStringLtoRCreate XMSTRINGLTORCREATE
#define XmStringNConcat XMSTRINGNCONCAT
#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE
#define XmStringWidth XMSTRINGWIDTH
#define XmTextClearSelection XMTEXTCLEARSELECTION
#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE
#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION
#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION
#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION
#define XmTextFieldGetString XMTEXTFIELDGETSTRING
#define XmTextFieldInsert XMTEXTFIELDINSERT
#define XmTextFieldRemove XMTEXTFIELDREMOVE
#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION
#define XmTextFieldSetString XMTEXTFIELDSETSTRING
#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION
#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION
#define XmTextGetLastPosition XMTEXTGETLASTPOSITION
#define XmTextGetMaxLength XMTEXTGETMAXLENGTH
#define XmTextGetSelection XMTEXTGETSELECTION
#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION
#define XmTextGetString XMTEXTGETSTRING
#define XmTextInsert XMTEXTINSERT
#define XmTextRemove XMTEXTREMOVE
#define XmTextReplace XMTEXTREPLACE
#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION
#define XmTextSetHighlight XMTEXTSETHIGHLIGHT
#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION
#define XmTextSetSelection XMTEXTSETSELECTION
#define XmTextSetString XMTEXTSETSTRING
#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE
#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE
#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE
#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE
#define XmUpdateDisplay XMUPDATEDISPLAY
#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX
#define XmbDrawString XMBDRAWSTRING
#define XmbLookupString XMBLOOKUPSTRING
#define XmbResetIC XMBRESETIC
#define XmbSetWMProperties XMBSETWMPROPERTIES
#define XmbTextEscapement XMBTEXTESCAPEMENT
#define XmbTextExtents XMBTEXTEXTENTS
#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY
#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST
#define XmuClientWindow XMUCLIENTWINDOW
#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE
#define XrmGetDatabase XRMGETDATABASE
#define XrmGetResource XRMGETRESOURCE
#define XrmPutStringResource XRMPUTSTRINGRESOURCE
#define XrmQuarkToString XRMQUARKTOSTRING
#define XrmStringToQuark XRMSTRINGTOQUARK
#define XtAddCallback XTADDCALLBACK
#define XtAddCallbacks XTADDCALLBACKS
#define XtAddEventHandler XTADDEVENTHANDLER
#define XtAddGrab XTADDGRAB
#define XtAllocateGC XTALLOCATEGC
#define XtAppAddActions XTAPPADDACTIONS
#define XtAppAddInput XTAPPADDINPUT
#define XtAppAddTimeOut XTAPPADDTIMEOUT
#define XtAppCreateShell XTAPPCREATESHELL
#define XtAppInitialize XTAPPINITIALIZE
#define XtAppNextEvent XTAPPNEXTEVENT
#define XtAppPeekEvent XTAPPPEEKEVENT
#define XtAppPending XTAPPPENDING
#define XtAppProcessEvent XTAPPPROCESSEVENT
#define XtAppSetErrorHandler XTAPPSETERRORHANDLER
#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES
#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER
#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER
#define XtAppWarning XTAPPWARNING
#define XtCallActionProc XTCALLACTIONPROC
#define XtCallCallbackList XTCALLCALLBACKLIST
#define XtCallCallbacks XTCALLCALLBACKS
#define XtConfigureWidget XTCONFIGUREWIDGET
#define XtConvertAndStore XTCONVERTANDSTORE
#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT
#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET
#define XtCreatePopupShell XTCREATEPOPUPSHELL
#define XtCreateWidget XTCREATEWIDGET
#define XtDatabase XTDATABASE
#define XtDestroyWidget XTDESTROYWIDGET
#define XtDisownSelection XTDISOWNSELECTION
#define XtDispatchEvent XTDISPATCHEVENT
#define XtDisplayOfObject XTDISPLAYOFOBJECT
#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING
#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT
#define XtAppAddWorkProc XTAPPADDWORKPROC
#define XtRemoveWorkProc XTREMOVEWORKPROC
#define XtFree XTFREE
#define XtGetActionKeysym XTGETACTIONKEYSYM
#define XtGetActionList XTGETACTIONLIST
#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS
#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES
#define XtGetGC XTGETGC
#define XtGetMultiClickTime XTGETMULTICLICKTIME
#define XtGetSelectionValue XTGETSELECTIONVALUE
#define XtGetSelectionValues XTGETSELECTIONVALUES
#define XtGetSubresources XTGETSUBRESOURCES
#define XtGetValues XTGETVALUES
#define XtGrabKeyboard XTGRABKEYBOARD
#define XtGrabPointer XTGRABPOINTER
#define XtHasCallbacks XTHASCALLBACKS
#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS
#define XtInsertEventHandler XTINSERTEVENTHANDLER
#define XtIsManaged XTISMANAGED
#define XtIsObject XTISOBJECT
#define XtIsSensitive XTISSENSITIVE
#define XtIsSubclass XTISSUBCLASS
#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED
#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST
#define XtMakeResizeRequest XTMAKERESIZEREQUEST
#define XtMalloc XTMALLOC
#define XtManageChild XTMANAGECHILD
#define XtManageChildren XTMANAGECHILDREN
#define XtMergeArgLists XTMERGEARGLISTS
#define XtMoveWidget XTMOVEWIDGET
#define XtName XTNAME
#define XtNameToWidget XTNAMETOWIDGET
#define XtOpenDisplay XTOPENDISPLAY
#define XtOverrideTranslations XTOVERRIDETRANSLATIONS
#define XtOwnSelection XTOWNSELECTION
#define XtParseTranslationTable XTPARSETRANSLATIONTABLE
#define XtPopdown XTPOPDOWN
#define XtPopup XTPOPUP
#define XtQueryGeometry XTQUERYGEOMETRY
#define XtRealizeWidget XTREALIZEWIDGET
#define XtRealloc XTREALLOC
#define XtReleaseGC XTRELEASEGC
#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS
#define XtRemoveCallback XTREMOVECALLBACK
#define XtRemoveEventHandler XTREMOVEEVENTHANDLER
#define XtRemoveGrab XTREMOVEGRAB
#define XtRemoveInput XTREMOVEINPUT
#define XtRemoveTimeOut XTREMOVETIMEOUT
#define XtResizeWidget XTRESIZEWIDGET
#define XtResolvePathname XTRESOLVEPATHNAME
#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS
#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED
#define XtSetSensitive XTSETSENSITIVE
#define XtSetTypeConverter XTSETTYPECONVERTER
#define XtSetValues XTSETVALUES
#define XtShellStrings XTSHELLSTRINGS
#define XtStrings XTSTRINGS
#define XtToolkitInitialize XTTOOLKITINITIALIZE
#define XtTranslateCoords XTTRANSLATECOORDS
#define XtTranslateKeycode XTTRANSLATEKEYCODE
#define XtUngrabKeyboard XTUNGRABKEYBOARD
#define XtUngrabPointer XTUNGRABPOINTER
#define XtUnmanageChild XTUNMANAGECHILD
#define XtUnmanageChildren XTUNMANAGECHILDREN
#define XtUnrealizeWidget XTUNREALIZEWIDGET
#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET
#define XtVaCreateWidget XTVACREATEWIDGET
#define XtVaGetValues XTVAGETVALUES
#define XtVaSetValues XTVASETVALUES
#define XtWarning XTWARNING
#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT
#define XtWindowOfObject XTWINDOWOFOBJECT
#define XtWindowToWidget XTWINDOWTOWIDGET
#define XwcDrawString XWCDRAWSTRING
#define XwcFreeStringList XWCFREESTRINGLIST
#define XwcTextEscapement XWCTEXTESCAPEMENT
#define XwcTextExtents XWCTEXTEXTENTS
#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY
#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST
#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT
#define _XmClearBorder _XMCLEARBORDER
#define _XmConfigureObject _XMCONFIGUREOBJECT
#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK
#define _XmDrawArrow _XMDRAWARROW
#define _XmDrawShadows _XMDRAWSHADOWS
#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT
#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS
#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS
#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR
#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST
#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON
#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA
#define _XmGrabKeyboard _XMGRABKEYBOARD
#define _XmGrabPointer _XMGRABPOINTER
#define _XmInheritClass _XMINHERITCLASS
#define _XmInputInGadget _XMINPUTINGADGET
#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST
#define _XmMenuPopDown _XMMENUPOPDOWN
#define _XmMoveObject _XMMOVEOBJECT
#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED
#define _XmOSBuildFileList _XMOSBUILDFILELIST
#define _XmOSFileCompare _XMOSFILECOMPARE
#define _XmOSFindPatternPart _XMOSFINDPATTERNPART
#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC
#define _XmPostPopupMenu _XMPOSTPOPUPMENU
#define _XmPrimitiveEnter _XMPRIMITIVEENTER
#define _XmPrimitiveLeave _XMPRIMITIVELEAVE
#define _XmRedisplayGadgets _XMREDISPLAYGADGETS
#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE
#define _XmStringDraw _XMSTRINGDRAW
#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT
#define _XmStrings _XMSTRINGS
#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS
#define _XmToVerticalPixels _XMTOVERTICALPIXELS
#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT
#define _Xm_fastPtr _XM_FASTPTR
#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG
#define _XtInherit _XTINHERIT
#define _XtInheritTranslations _XTINHERITTRANSLATIONS
#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS
#define compositeWidgetClass COMPOSITEWIDGETCLASS
#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS
#define shellWidgetClass SHELLWIDGETCLASS
#define topLevelShellClassRec TOPLEVELSHELLCLASSREC
#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS
#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS
#define vendorShellClassRec VENDORSHELLCLASSREC
#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS
#define wmShellWidgetClass WMSHELLWIDGETCLASS
#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS
#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC
#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS
#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS
#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS
#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS
#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS
#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS
#define xmFormWidgetClass XMFORMWIDGETCLASS
#define xmFrameWidgetClass XMFRAMEWIDGETCLASS
#define xmGadgetClass XMGADGETCLASS
#define xmLabelGadgetClass XMLABELGADGETCLASS
#define xmLabelWidgetClass XMLABELWIDGETCLASS
#define xmListWidgetClass XMLISTWIDGETCLASS
#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS
#define xmManagerClassRec XMMANAGERCLASSREC
#define xmManagerWidgetClass XMMANAGERWIDGETCLASS
#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS
#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS
#define xmPrimitiveClassRec XMPRIMITIVECLASSREC
#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS
#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC
#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS
#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS
#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS
#define xmSashWidgetClass XMSASHWIDGETCLASS
#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS
#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC
#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS
#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS
#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS
#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS
#define xmTextWidgetClass XMTEXTWIDGETCLASS
#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS
#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS
#define XtRegisterDrawable _XTREGISTERWINDOW
#define XtUnregisterDrawable _XTUNREGISTERWINDOW
#define XQueryFont XQUERYFONT
#define XSetPlaneMask XSETPLANEMASK
#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL
#define XDestroySubwindows XDESTROYSUBWINDOWS
#define XFreeDeviceList XFREEDEVICELIST
#define XFreeDeviceState XFREEDEVICESTATE
#define XGetExtensionVersion XGETEXTENSIONVERSION
#define XGetRGBColormaps XGETRGBCOLORMAPS
#define XIconifyWindow XICONIFYWINDOW
#define XInstallColormap XINSTALLCOLORMAP
#define XListInputDevices XLISTINPUTDEVICES
#define XLookupKeysym XLOOKUPKEYSYM
#define XOpenDevice XOPENDEVICE
#define XQueryDeviceState XQUERYDEVICESTATE
#define XSelectExtensionEvent XSELECTEXTENSIONEVENT
#define XWarpPointer XWARPPOINTER
#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP
#define XAllocNamedColor XALLOCNAMEDCOLOR
#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN
#define XDefaultColormap XDEFAULTCOLORMAP
#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN
#define XDefaultDepth XDEFAULTDEPTH
#define XDefaultScreen XDEFAULTSCREEN
#define XDefaultVisual XDEFAULTVISUAL
#define XSetIconName XSETICONNAME
#define XtInitialize XTINITIALIZE
#define XtMainLoop XTMAINLOOP
#define DtSaverGetWindows DTSAVERGETWINDOWS
#define XAddHosts XADDHOSTS
#define XDisableAccessControl XDISABLEACCESSCONTROL
#define XEnableAccessControl XENABLEACCESSCONTROL
#define XFillArcs XFILLARCS
#define XForceScreenSaver XFORCESCREENSAVER
#define XGetScreenSaver XGETSCREENSAVER
#define XListHosts XLISTHOSTS
#define XReadBitmapFile XREADBITMAPFILE
#define XRemoveHosts XREMOVEHOSTS
#define XResetScreenSaver XRESETSCREENSAVER
#define XResourceManagerString XRESOURCEMANAGERSTRING
#define XSetScreenSaver XSETSCREENSAVER
#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY
#define XrmDestroyDatabase XRMDESTROYDATABASE
#define XrmGetFileDatabase XRMGETFILEDATABASE
#define XrmGetStringDatabase XRMGETSTRINGDATABASE
#define XrmInitialize XRMINITIALIZE
#define XrmMergeDatabases XRMMERGEDATABASES
#define XrmParseCommand XRMPARSECOMMAND
#define XrmPutLineResource XRMPUTLINERESOURCE
#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE
#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST
#define XrmStringToQuark XRMSTRINGTOQUARK
#define XmCreateLabel XMCREATELABEL
#ifdef __cplusplus
extern "C" {
#endif
extern void XtFree(char*);
#ifdef __cplusplus
}
#endif
#define pthread_attr_create PTHREAD_ATTR_CREATE
#define pthread_attr_delete PTHREAD_ATTR_DELETE
#define pthread_attr_destroy PTHREAD_ATTR_DESTROY
#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP
#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP
#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED
#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO
#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED
#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM
#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE
#define pthread_attr_init PTHREAD_ATTR_INIT
#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP
#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE
#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP
#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED
#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO
#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED
#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM
#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY
#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE
#define pthread_cancel PTHREAD_CANCEL
#define pthread_cancel_e PTHREAD_CANCEL_E
#define pthread_cond_broadcast PTHREAD_COND_BROADCAST
#define pthread_cond_destroy PTHREAD_COND_DESTROY
#define pthread_cond_init PTHREAD_COND_INIT
#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP
#define pthread_cond_signal PTHREAD_COND_SIGNAL
#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP
#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT
#define pthread_cond_wait PTHREAD_COND_WAIT
#define pthread_condattr_create PTHREAD_CONDATTR_CREATE
#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE
#define pthread_condattr_init PTHREAD_CONDATTR_INIT
#define pthread_create PTHREAD_CREATE
#define pthread_delay_np PTHREAD_DELAY_NP
#define pthread_detach PTHREAD_DETACH
#define pthread_equal PTHREAD_EQUAL
#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP
#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP
#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP
#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP
#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP
#define pthread_exit PTHREAD_EXIT
#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP
#define pthread_getprio PTHREAD_GETPRIO
#define pthread_getschedparam PTHREAD_GETSCHEDPARAM
#define pthread_getscheduler PTHREAD_GETSCHEDULER
#define pthread_getspecific PTHREAD_GETSPECIFIC
#define pthread_getunique_np PTHREAD_GETUNIQUE_NP
#define pthread_join PTHREAD_JOIN
#define pthread_join32 PTHREAD_JOIN32
#define pthread_keycreate PTHREAD_KEYCREATE
#define pthread_key_create PTHREAD_KEY_CREATE
#define pthread_kill PTHREAD_KILL
#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP
#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY
#define pthread_mutex_init PTHREAD_MUTEX_INIT
#define pthread_mutex_lock PTHREAD_MUTEX_LOCK
#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK
#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK
#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE
#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE
#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY
#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP
#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT
#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP
#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP
#define pthread_once PTHREAD_ONCE
#define pthread_resume_np PTHREAD_RESUME_NP
#define pthread_self PTHREAD_SELF
#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL
#define pthread_setcancel PTHREAD_SETCANCEL
#define pthread_setcancelstate PTHREAD_SETCANCELSTATE
#define pthread_setprio PTHREAD_SETPRIO
#define pthread_setschedparam PTHREAD_SETSCHEDPARAM
#define pthread_setscheduler PTHREAD_SETSCHEDULER
#define pthread_setspecific PTHREAD_SETSPECIFIC
#define pthread_suspend_np PTHREAD_SUSPEND_NP
#define pthread_testcancel PTHREAD_TESTCANCEL
#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP
#define pthread_yield PTHREAD_YIELD
#define pthread_yield_np PTHREAD_YIELD_NP
#define XDefaultRootWindow XDEFAULTROOTWINDOW
#define XDisplayCells XDISPLAYCELLS
#define XMaxRequestSize XMAXREQUESTSIZE
#define XScreenOfDisplay XSCREENOFDISPLAY
#define XSetFillRule XSETFILLRULE
#define XmActivateProtocol XMACTIVATEPROTOCOL
#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG
#define XmCreateErrorDialog XMCREATEERRORDIALOG
#define XmCreateWarningDialog XMCREATEWARNINGDIALOG
#define XmCvtCTToXmString XMCVTCTTOXMSTRING
#define XmDestroyPixmap XMDESTROYPIXMAP
#define XmGetPixmap XMGETPIXMAP
#define XmInstallImage XMINSTALLIMAGE
#define XmListAddItems XMLISTADDITEMS
#define XmListDeleteItem XMLISTDELETEITEM
#define XmListItemExists XMLISTITEMEXISTS
#define XmListItemPos XMLISTITEMPOS
#define XmListReplaceItems XMLISTREPLACEITEMS
#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS
#define XmRemoveProtocols XMREMOVEPROTOCOLS
#define XmRemoveTabGroup XMREMOVETABGROUP
#define XmSetColorCalculation XMSETCOLORCALCULATION
#define XmTextCopy XMTEXTCOPY
#define XmTextCut XMTEXTCUT
#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION
#define XmTextFieldCopy XMTEXTFIELDCOPY
#define XmTextFieldCut XMTEXTFIELDCUT
#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH
#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION
#define XmTextFieldPaste XMTEXTFIELDPASTE
#define XmTextFieldReplace XMTEXTFIELDREPLACE
#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE
#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT
#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION
#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH
#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION
#define XmTextGetEditable XMTEXTGETEDITABLE
#define XmTextPaste XMTEXTPASTE
#define XmTextPosToXY XMTEXTPOSTOXY
#define XmTextSetEditable XMTEXTSETEDITABLE
#define XmTextShowPosition XMTEXTSHOWPOSITION
#define XmUninstallImage XMUNINSTALLIMAGE
#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP
#define XrmPutFileDatabase XRMPUTFILEDATABASE
#define XtAddConverter XTADDCONVERTER
#define XtError XTERROR
#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL
#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY
#define pthread_key_delete PTHREAD_KEY_DELETE
#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS
#define xmScaleWidgetClass XMSCALEWIDGETCLASS
#define XtDisplay XTDISPLAY
#define XtScreen XTSCREEN
#define XAllocIconSize XALLOCICONSIZE
#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP
#define XAllowEvents XALLOWEVENTS
#define XBlackPixel XBLACKPIXEL
#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE
#define XDefaultGC XDEFAULTGC
#define XDisplayHeight XDISPLAYHEIGHT
#define XDisplayWidth XDISPLAYWIDTH
#define XGetCommand XGETCOMMAND
#define XGetIconSizes XGETICONSIZES
#define XKillClient XKILLCLIENT
#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS
#define XRootWindow XROOTWINDOW
#define XWMGeometry XWMGEOMETRY
#define XWhitePixel XWHITEPIXEL
#define XrmCombineDatabase XRMCOMBINEDATABASE
#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE
#define XSetStandardProperties XSETSTANDARDPROPERTIES
#define XSetState XSETSTATE
#define XDrawRectangles XDRAWRECTANGLES
#define XGrabButton XGRABBUTTON
#define XLookupColor XLOOKUPCOLOR
#define XMapSubwindows XMAPSUBWINDOWS
#define XRecolorCursor XRECOLORCURSOR
#define XStoreBytes XSTOREBYTES
#define XUngrabButton XUNGRABBUTTON
#define XUninstallColormap XUNINSTALLCOLORMAP
#define lib$wait LIB$WAIT
#define lib$find_file LIB$FIND_FILE
#define lib$find_file_end LIB$FIND_FILE_END
#define lib$set_symbol LIB$SET_SYMBOL
#define lib$sfree1_dd LIB$SFREE1_DD
#define lib$spawn LIB$SPAWN
#define sys$assign SYS$ASSIGN
#define sys$crembx SYS$CREMBX
#define sys$dassgn SYS$DASSGN
#define sys$dclexh SYS$DCLEXH
#define sys$getdviw SYS$GETDVIW
#define sys$getsyiw SYS$GETSYIW
#define sys$qio SYS$QIO
#define sys$qiow SYS$QIOW
#define sys$setef SYS$SETEF
#define sys$synch SYS$SYNCH
#define XDrawText XDRAWTEXT
#define XtCloseDisplay XTCLOSEDISPLAY
#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT
#define lib$ediv LIB$EDIV
#define lib$subx LIB$SUBX
#define sys$bintim SYS$BINTIM
#define sys$gettim SYS$GETTIM
#define XFetchName XFETCHNAME
#define XPeekIfEvent XPEEKIFEVENT
#define XQueryKeymap XQUERYKEYMAP
#endif
-142
View File
@@ -1,142 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/*
* Windows driver by: Mark E. Peterson ([email protected])
* Updated by Li Wei ([email protected])
*
*
***************************************************************
* WMesa *
* version 2.3 *
* *
* By *
* Li Wei *
* Institute of Artificial Intelligence & Robotics *
* Xi'an Jiaotong University *
* Email: [email protected] *
* Web page: http://sun.aiar.xjtu.edu.cn *
* *
* July 7th, 1997 *
***************************************************************
*/
#ifndef WMESA_H
#define WMESA_H
#ifdef __cplusplus
extern "C" {
#endif
#include "GL/gl.h"
#if defined(_MSV_VER) && !defined(__GNUC__)
# pragma warning (disable:4273)
# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
# pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
# pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
# if (MESA_WARNQUIET>1)
# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
# endif
#endif
/*
* This is the WMesa context 'handle':
*/
typedef struct wmesa_context *WMesaContext;
/*
* Create a new WMesaContext for rendering into a window. You must
* have already created the window of correct visual type and with an
* appropriate colormap.
*
* Input:
* hWnd - Window handle
* Pal - Palette to use
* rgb_flag - GL_TRUE = RGB mode,
* GL_FALSE = color index mode
* db_flag - GL_TRUE = double-buffered,
* GL_FALSE = single buffered
* alpha_flag - GL_TRUE = create software alpha buffer,
* GL_FALSE = no software alpha buffer
*
* Note: Indexed mode requires double buffering under Windows.
*
* Return: a WMesa_context or NULL if error.
*/
extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
GLboolean rgb_flag,
GLboolean db_flag,
GLboolean alpha_flag);
/*
* Destroy a rendering context as returned by WMesaCreateContext()
*/
/*extern void WMesaDestroyContext( WMesaContext ctx );*/
extern void WMesaDestroyContext( void );
/*
* Make the specified context the current one.
*/
extern void WMesaMakeCurrent( WMesaContext ctx );
/*
* Return a handle to the current context.
*/
extern WMesaContext WMesaGetCurrentContext( void );
/*
* Swap the front and back buffers for the current context. No action
* taken if the context is not double buffered.
*/
extern void WMesaSwapBuffers(void);
/*
* In indexed color mode we need to know when the palette changes.
*/
extern void WMesaPaletteChange(HPALETTE Pal);
extern void WMesaMove(void);
#ifdef __cplusplus
}
#endif
#endif
-390
View File
@@ -1,390 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* Mesa/X11 interface. This header file serves as the documentation for
* the Mesa/X11 interface functions.
*
* Note: this interface isn't intended for user programs. It's primarily
* just for implementing the pseudo-GLX interface.
*/
/* Sample Usage:
In addition to the usual X calls to select a visual, create a colormap
and create a window, you must do the following to use the X/Mesa interface:
1. Call XMesaCreateVisual() to make an XMesaVisual from an XVisualInfo.
2. Call XMesaCreateContext() to create an X/Mesa rendering context, given
the XMesaVisual.
3. Call XMesaCreateWindowBuffer() to create an XMesaBuffer from an X window
and XMesaVisual.
4. Call XMesaMakeCurrent() to bind the XMesaBuffer to an XMesaContext and
to make the context the current one.
5. Make gl* calls to render your graphics.
6. Use XMesaSwapBuffers() when double buffering to swap front/back buffers.
7. Before the X window is destroyed, call XMesaDestroyBuffer().
8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext.
*/
#ifndef XMESA_H
#define XMESA_H
#ifdef __VMS
#include <GL/vms_x_fix.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XFree86Server
#include "xmesa_xf86.h"
#else
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "xmesa_x.h"
#endif
#include "GL/gl.h"
#ifdef AMIWIN
#include <pragmas/xlib_pragmas.h>
extern struct Library *XLibBase;
#endif
#define XMESA_MAJOR_VERSION 6
#define XMESA_MINOR_VERSION 3
/*
* Values passed to XMesaGetString:
*/
#define XMESA_VERSION 1
#define XMESA_EXTENSIONS 2
/*
* Values passed to XMesaSetFXmode:
*/
#define XMESA_FX_WINDOW 1
#define XMESA_FX_FULLSCREEN 2
typedef struct xmesa_context *XMesaContext;
typedef struct xmesa_visual *XMesaVisual;
typedef struct xmesa_buffer *XMesaBuffer;
/*
* Create a new X/Mesa visual.
* Input: display - X11 display
* visinfo - an XVisualInfo pointer
* rgb_flag - GL_TRUE = RGB mode,
* GL_FALSE = color index mode
* alpha_flag - alpha buffer requested?
* db_flag - GL_TRUE = double-buffered,
* GL_FALSE = single buffered
* stereo_flag - stereo visual?
* ximage_flag - GL_TRUE = use an XImage for back buffer,
* GL_FALSE = use an off-screen pixmap for back buffer
* depth_size - requested bits/depth values, or zero
* stencil_size - requested bits/stencil values, or zero
* accum_red_size - requested bits/red accum values, or zero
* accum_green_size - requested bits/green accum values, or zero
* accum_blue_size - requested bits/blue accum values, or zero
* accum_alpha_size - requested bits/alpha accum values, or zero
* num_samples - number of samples/pixel if multisampling, or zero
* level - visual level, usually 0
* visualCaveat - ala the GLX extension, usually GLX_NONE_EXT
* Return; a new XMesaVisual or 0 if error.
*/
extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
XMesaVisualInfo visinfo,
GLboolean rgb_flag,
GLboolean alpha_flag,
GLboolean db_flag,
GLboolean stereo_flag,
GLboolean ximage_flag,
GLint depth_size,
GLint stencil_size,
GLint accum_red_size,
GLint accum_green_size,
GLint accum_blue_size,
GLint accum_alpha_size,
GLint num_samples,
GLint level,
GLint visualCaveat );
/*
* Destroy an XMesaVisual, but not the associated XVisualInfo.
*/
extern void XMesaDestroyVisual( XMesaVisual v );
/*
* Create a new XMesaContext for rendering into an X11 window.
*
* Input: visual - an XMesaVisual
* share_list - another XMesaContext with which to share display
* lists or NULL if no sharing is wanted.
* Return: an XMesaContext or NULL if error.
*/
extern XMesaContext XMesaCreateContext( XMesaVisual v,
XMesaContext share_list );
/*
* Destroy a rendering context as returned by XMesaCreateContext()
*/
extern void XMesaDestroyContext( XMesaContext c );
/*
* Create an XMesaBuffer from an X window.
*/
extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w );
/*
* Create an XMesaBuffer from an X pixmap.
*/
extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v,
XMesaPixmap p,
XMesaColormap cmap );
/*
* Destroy an XMesaBuffer, but not the corresponding window or pixmap.
*/
extern void XMesaDestroyBuffer( XMesaBuffer b );
/*
* Return the XMesaBuffer handle which corresponds to an X drawable, if any.
*
* New in Mesa 2.3.
*/
extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy,
XMesaDrawable d );
/*
* Bind a buffer to a context and make the context the current one.
*/
extern GLboolean XMesaMakeCurrent( XMesaContext c,
XMesaBuffer b );
/*
* Bind two buffers (read and draw) to a context and make the
* context the current one.
* New in Mesa 3.3
*/
extern GLboolean XMesaMakeCurrent2( XMesaContext c,
XMesaBuffer drawBuffer,
XMesaBuffer readBuffer );
/*
* Unbind the current context from its buffer.
*/
extern GLboolean XMesaUnbindContext( XMesaContext c );
/*
* Return a handle to the current context.
*/
extern XMesaContext XMesaGetCurrentContext( void );
/*
* Return handle to the current (draw) buffer.
*/
extern XMesaBuffer XMesaGetCurrentBuffer( void );
/*
* Return handle to the current read buffer.
* New in Mesa 3.3
*/
extern XMesaBuffer XMesaGetCurrentReadBuffer( void );
/*
* Swap the front and back buffers for the given buffer. No action is
* taken if the buffer is not double buffered.
*/
extern void XMesaSwapBuffers( XMesaBuffer b );
/*
* Copy a sub-region of the back buffer to the front buffer.
*
* New in Mesa 2.6
*/
extern void XMesaCopySubBuffer( XMesaBuffer b,
int x,
int y,
int width,
int height );
/*
* Return a pointer to the the Pixmap or XImage being used as the back
* color buffer of an XMesaBuffer. This function is a way to get "under
* the hood" of X/Mesa so one can manipulate the back buffer directly.
* Input: b - the XMesaBuffer
* Output: pixmap - pointer to back buffer's Pixmap, or 0
* ximage - pointer to back buffer's XImage, or NULL
* Return: GL_TRUE = context is double buffered
* GL_FALSE = context is single buffered
*/
extern GLboolean XMesaGetBackBuffer( XMesaBuffer b,
XMesaPixmap *pixmap,
XMesaImage **ximage );
/*
* Return the depth buffer associated with an XMesaBuffer.
* Input: b - the XMesa buffer handle
* Output: width, height - size of buffer in pixels
* bytesPerValue - bytes per depth value (2 or 4)
* buffer - pointer to depth buffer values
* Return: GL_TRUE or GL_FALSE to indicate success or failure.
*
* New in Mesa 2.4.
*/
extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b,
GLint *width,
GLint *height,
GLint *bytesPerValue,
void **buffer );
/*
* Flush/sync a context
*/
extern void XMesaFlush( XMesaContext c );
/*
* Get an X/Mesa-specific string.
* Input: name - either XMESA_VERSION or XMESA_EXTENSIONS
*/
extern const char *XMesaGetString( XMesaContext c, int name );
/*
* Scan for XMesaBuffers whose window/pixmap has been destroyed, then free
* any memory used by that buffer.
*
* New in Mesa 2.3.
*/
extern void XMesaGarbageCollect( void );
/*
* Return a dithered pixel value.
* Input: c - XMesaContext
* x, y - window coordinate
* red, green, blue, alpha - color components in [0,1]
* Return: pixel value
*
* New in Mesa 2.3.
*/
extern unsigned long XMesaDitherColor( XMesaContext xmesa,
GLint x,
GLint y,
GLfloat red,
GLfloat green,
GLfloat blue,
GLfloat alpha );
/*
* 3Dfx Glide driver only!
* Set 3Dfx/Glide full-screen or window rendering mode.
* Input: mode - either XMESA_FX_WINDOW (window rendering mode) or
* XMESA_FX_FULLSCREEN (full-screen rendering mode)
* Return: GL_TRUE if success
* GL_FALSE if invalid mode or if not using 3Dfx driver
*
* New in Mesa 2.6.
*/
extern GLboolean XMesaSetFXmode( GLint mode );
/*
* Reallocate the back/depth/stencil/accum/etc/ buffers associated with
* buffer <b> if its size has changed.
*
* New in Mesa 4.0.2
*/
extern void XMesaResizeBuffers( XMesaBuffer b );
/*
* Create a pbuffer.
* New in Mesa 4.1
*/
extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
unsigned int width, unsigned int height);
#ifdef __cplusplus
}
#endif
#endif
-84
View File
@@ -1,84 +0,0 @@
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/*
* Authors:
* Kevin E. Martin <[email protected]>
*
* When we're building the XMesa driver for stand-alone Mesa we
* include this file when building the xm_*.c files.
* We need to define some types and macros differently when building
* in the Xserver vs. stand-alone Mesa.
*/
#ifndef _XMESA_X_H_
#define _XMESA_X_H_
typedef Display XMesaDisplay;
typedef Pixmap XMesaPixmap;
typedef Colormap XMesaColormap;
typedef Drawable XMesaDrawable;
typedef Window XMesaWindow;
typedef GC XMesaGC;
typedef XVisualInfo *XMesaVisualInfo;
typedef XImage XMesaImage;
typedef XPoint XMesaPoint;
typedef XColor XMesaColor;
#define XMesaDestroyImage XDestroyImage
#define XMesaPutPixel XPutPixel
#define XMesaGetPixel XGetPixel
#define XMesaSetForeground XSetForeground
#define XMesaSetBackground XSetBackground
#define XMesaSetPlaneMask XSetPlaneMask
#define XMesaSetFunction XSetFunction
#define XMesaSetFillStyle XSetFillStyle
#define XMesaSetTile XSetTile
#define XMesaDrawPoint XDrawPoint
#define XMesaDrawPoints XDrawPoints
#define XMesaFillRectangle XFillRectangle
#define XMesaPutImage XPutImage
#define XMesaCopyArea XCopyArea
#define XMesaCreatePixmap XCreatePixmap
#define XMesaFreePixmap XFreePixmap
#define XMesaFreeGC XFreeGC
#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size
#define GET_REDMASK(__v) __v->mesa_visual.redMask
#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen)
#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
#endif
-153
View File
@@ -1,153 +0,0 @@
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/*
* Authors:
* Kevin E. Martin <[email protected]>
*
* When we're building the XMesa driver for use in the X server (as the
* indirect render) we include this file when building the xm_*.c files.
* We need to define some types and macros differently when building
* in the Xserver vs. stand-alone Mesa.
*/
#ifndef _XMESA_XF86_H_
#define _XMESA_XF86_H_
#include "scrnintstr.h"
#include "pixmapstr.h"
typedef struct _XMesaImageRec XMesaImage;
typedef ScreenRec XMesaDisplay;
typedef PixmapPtr XMesaPixmap;
typedef ColormapPtr XMesaColormap;
typedef DrawablePtr XMesaDrawable;
typedef WindowPtr XMesaWindow;
typedef GCPtr XMesaGC;
typedef VisualPtr XMesaVisualInfo;
typedef DDXPointRec XMesaPoint;
typedef xColorItem XMesaColor;
#define XMesaSetGeneric(__d,__gc,__val,__mask) \
do { \
CARD32 __v[1]; \
(void) __d; \
__v[0] = __val; \
dixChangeGC(NullClient, __gc, __mask, __v, NULL); \
} while (0)
#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \
do { \
ChangeGCVal __v[1]; \
(void) __d; \
__v[0].ptr = __pval; \
dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
} while (0)
#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask)
#define XMesaSetFunction(d,gc,v) XMesaSetGeneric(d,gc,v,GCFunction)
#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle)
#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile)
#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
do { \
XMesaPoint __p[1]; \
(void) __d; \
__p[0].x = __x; \
__p[0].y = __y; \
ValidateGC(__b, __gc); \
(*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \
} while (0)
#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \
do { \
(void) __d; \
ValidateGC(__b, __gc); \
(*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
} while (0)
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
do { \
xRectangle __r[1]; \
(void) __d; \
ValidateGC((DrawablePtr)__b, __gc); \
__r[0].x = __x; \
__r[0].y = __y; \
__r[0].width = __w; \
__r[0].height = __h; \
(*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
} while (0)
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
do { \
/* Assumes: Images are always in ZPixmap format */ \
(void) __d; \
if (__sx || __sy) /* The non-trivial case */ \
XMesaPutImageHelper(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h); \
ValidateGC(__b, __gc); \
(*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
__x, __y, __w, __h, 0, ZPixmap, \
((XMesaImage *)(__i))->data); \
} while (0)
#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \
do { \
(void) __d; \
ValidateGC(__db, __gc); \
(*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \
__sx, __sy, __w, __h, __x, __y); \
} while (0)
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
(*__d->CreatePixmap)(__d, __w, __h, __depth)
#define XMesaFreePixmap(__d,__b) \
(*__d->DestroyPixmap)(__b)
#define XMesaFreeGC(__d,__gc) \
do { \
(void) __d; \
FreeScratchGC(__gc); \
} while (0)
#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries
#define GET_REDMASK(__v) __v->mesa_visual.redMask
#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
#define GET_VISUAL_DEPTH(__v) __v->nplanes
#define GET_BLACK_PIXEL(__v) __v->display->blackPixel
#define CHECK_BYTE_ORDER(__v) GL_TRUE
#define CHECK_FOR_HPCR(__v) GL_FALSE
#endif
-192
View File
@@ -1,192 +0,0 @@
/*******************************************************************************
/
/ File: GLView.h
/
/ Copyright 1993-98, Be Incorporated, All Rights Reserved.
/
*******************************************************************************/
#ifndef BGLVIEW_H
#define BGLVIEW_H
#include <GL/gl.h>
#define BGL_RGB 0
#define BGL_INDEX 1
#define BGL_SINGLE 0
#define BGL_DOUBLE 2
#define BGL_DIRECT 0
#define BGL_INDIRECT 4
#define BGL_ACCUM 8
#define BGL_ALPHA 16
#define BGL_DEPTH 32
#define BGL_OVERLAY 64
#define BGL_UNDERLAY 128
#define BGL_STENCIL 512
#ifdef __cplusplus
#include <AppKit.h>
#include <interface/Window.h>
#include <interface/View.h>
#include <interface/Bitmap.h>
#include <game/WindowScreen.h>
#include <game/DirectWindow.h>
class BGLView : public BView {
public:
BGLView(BRect rect, char *name,
ulong resizingMode, ulong mode,
ulong options);
virtual ~BGLView();
void LockGL();
void UnlockGL();
void SwapBuffers();
void SwapBuffers( bool vSync );
BView * EmbeddedView();
status_t CopyPixelsOut(BPoint source, BBitmap *dest);
status_t CopyPixelsIn(BBitmap *source, BPoint dest);
virtual void ErrorCallback(unsigned long errorCode); // Mesa's GLenum is uint where Be's ones was ulong!
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow();
virtual void AllAttached();
virtual void DetachedFromWindow();
virtual void AllDetached();
virtual void FrameResized(float width, float height);
virtual status_t Perform(perform_code d, void *arg);
/* The public methods below, for the moment,
are just pass-throughs to BView */
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void MessageReceived(BMessage *msg);
virtual void SetResizingMode(uint32 mode);
virtual void Show();
virtual void Hide();
virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index,
BMessage *specifier, int32 form,
const char *property);
virtual status_t GetSupportedSuites(BMessage *data);
/* New public functions */
void DirectConnected( direct_buffer_info *info );
void EnableDirectMode( bool enabled );
void * getGC() { return m_gc; }
private:
virtual void _ReservedGLView1();
virtual void _ReservedGLView2();
virtual void _ReservedGLView3();
virtual void _ReservedGLView4();
virtual void _ReservedGLView5();
virtual void _ReservedGLView6();
virtual void _ReservedGLView7();
virtual void _ReservedGLView8();
BGLView(const BGLView &);
BGLView &operator=(const BGLView &);
void dither_front();
bool confirm_dither();
void draw(BRect r);
void * m_gc;
uint32 m_options;
uint32 m_ditherCount;
BLocker m_drawLock;
BLocker m_displayLock;
void * m_clip_info;
void * _Unused1;
BBitmap * m_ditherMap;
BRect m_bounds;
int16 * m_errorBuffer[2];
uint64 _reserved[8];
/* Direct Window stuff */
private:
void drawScanline( int x1, int x2, int y, void *data );
static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2);
void lock_draw();
void unlock_draw();
bool validateView();
};
class BGLScreen : public BWindowScreen {
public:
BGLScreen(char *name,
ulong screenMode, ulong options,
status_t *error, bool debug=false);
~BGLScreen();
void LockGL();
void UnlockGL();
void SwapBuffers();
virtual void ErrorCallback(GLenum errorCode);
virtual void ScreenConnected(bool connected);
virtual void FrameResized(float width, float height);
virtual status_t Perform(perform_code d, void *arg);
/* The public methods below, for the moment,
are just pass-throughs to BWindowScreen */
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void MessageReceived(BMessage *msg);
virtual void Show();
virtual void Hide();
virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);
virtual status_t GetSupportedSuites(BMessage *data);
private:
virtual void _ReservedGLScreen1();
virtual void _ReservedGLScreen2();
virtual void _ReservedGLScreen3();
virtual void _ReservedGLScreen4();
virtual void _ReservedGLScreen5();
virtual void _ReservedGLScreen6();
virtual void _ReservedGLScreen7();
virtual void _ReservedGLScreen8();
BGLScreen(const BGLScreen &);
BGLScreen &operator=(const BGLScreen &);
void * m_gc;
long m_options;
BLocker m_drawLock;
int32 m_colorSpace;
uint32 m_screen_mode;
uint64 _reserved[7];
};
#endif // __cplusplus
#endif // BGLVIEW_H
-213
View File
@@ -1,213 +0,0 @@
<!-- Autogeneratd by Makefile.ReactOS -->
<module name="mesa32" type="win32dll" baseaddress="${BASEADDRESS_MESA32}" installbase="system32" installname="mesa32.dll" allowwarnings="true">
<importlibrary definition="src/drivers/windows/icd/mesa.def" />
<linkerflag>-Wl,--enable-stdcall-fixup</linkerflag>
<library>ntdll</library>
<library>kernel32</library>
<define name="__USE_W32API" />
<define name="USE_EXTERNAL_DXTN_LIB" />
<!-- The following is autogenrated by Makefile.ReactOS -->
<library>gdi32</library>
<define name="BUILD_GL32" />
<define name="_OPENGL32_" />
<define name="USE_EXTERNAL_DXTN_LIB=1" />
<define name="USE_MGL_NAMESPACE" />
<define name="USE_X86_ASM" />
<define name="USE_MMX_ASM" />
<define name="USE_SSE_ASM" />
<define name="USE_3DNOW_ASM" />
<include base="mesa32">include</include>
<include base="mesa32">src</include>
<include base="mesa32">src/main</include>
<include base="mesa32">src/glapi</include>
<include base="mesa32">src/math</include>
<include base="mesa32">src/tnl</include>
<include base="mesa32">src/shader</include>
<include base="mesa32">src/shader/grammar</include>
<include base="mesa32">src/shader/slang</include>
<include base="mesa32">src/shader/slang/OSDependent/Linux</include>
<include base="mesa32">src/shader/slang/OGLCompilersDLL</include>
<file>src/main/api_arrayelt.c</file>
<file>src/main/api_loopback.c</file>
<file>src/main/api_noop.c</file>
<file>src/main/api_validate.c</file>
<file>src/main/accum.c</file>
<file>src/main/attrib.c</file>
<file>src/main/blend.c</file>
<file>src/main/bufferobj.c</file>
<file>src/main/buffers.c</file>
<file>src/main/clip.c</file>
<file>src/main/colortab.c</file>
<file>src/main/context.c</file>
<file>src/main/convolve.c</file>
<file>src/main/debug.c</file>
<file>src/main/depth.c</file>
<file>src/main/dispatch.c</file>
<file>src/main/dlist.c</file>
<file>src/main/drawpix.c</file>
<file>src/main/enable.c</file>
<file>src/main/enums.c</file>
<file>src/main/eval.c</file>
<file>src/main/execmem.c</file>
<file>src/main/extensions.c</file>
<file>src/main/fbobject.c</file>
<file>src/main/feedback.c</file>
<file>src/main/fog.c</file>
<file>src/main/framebuffer.c</file>
<file>src/main/get.c</file>
<file>src/main/getstring.c</file>
<file>src/main/hash.c</file>
<file>src/main/hint.c</file>
<file>src/main/histogram.c</file>
<file>src/main/image.c</file>
<file>src/main/imports.c</file>
<file>src/main/light.c</file>
<file>src/main/lines.c</file>
<file>src/main/matrix.c</file>
<file>src/main/mm.c</file>
<file>src/main/occlude.c</file>
<file>src/main/pixel.c</file>
<file>src/main/points.c</file>
<file>src/main/polygon.c</file>
<file>src/main/rastpos.c</file>
<file>src/main/renderbuffer.c</file>
<file>src/main/state.c</file>
<file>src/main/stencil.c</file>
<file>src/main/texcompress.c</file>
<file>src/main/texcompress_s3tc.c</file>
<file>src/main/texcompress_fxt1.c</file>
<file>src/main/texenvprogram.c</file>
<file>src/main/texformat.c</file>
<file>src/main/teximage.c</file>
<file>src/main/texrender.c</file>
<file>src/main/texobj.c</file>
<file>src/main/texstate.c</file>
<file>src/main/texstore.c</file>
<file>src/main/varray.c</file>
<file>src/main/vtxfmt.c</file>
<file>src/glapi/glapi.c</file>
<file>src/glapi/glthread.c</file>
<file>src/math/m_debug_clip.c</file>
<file>src/math/m_debug_norm.c</file>
<file>src/math/m_debug_xform.c</file>
<file>src/math/m_eval.c</file>
<file>src/math/m_matrix.c</file>
<file>src/math/m_translate.c</file>
<file>src/math/m_vector.c</file>
<file>src/math/m_xform.c</file>
<file>src/array_cache/ac_context.c</file>
<file>src/array_cache/ac_import.c</file>
<file>src/tnl/t_array_api.c</file>
<file>src/tnl/t_array_import.c</file>
<file>src/tnl/t_context.c</file>
<file>src/tnl/t_pipeline.c</file>
<file>src/tnl/t_save_api.c</file>
<file>src/tnl/t_save_loopback.c</file>
<file>src/tnl/t_save_playback.c</file>
<file>src/tnl/t_vb_arbprogram.c</file>
<file>src/tnl/t_vb_arbprogram_sse.c</file>
<file>src/tnl/t_vb_program.c</file>
<file>src/tnl/t_vb_render.c</file>
<file>src/tnl/t_vb_texgen.c</file>
<file>src/tnl/t_vb_texmat.c</file>
<file>src/tnl/t_vb_vertex.c</file>
<file>src/tnl/t_vb_cull.c</file>
<file>src/tnl/t_vb_fog.c</file>
<file>src/tnl/t_vb_light.c</file>
<file>src/tnl/t_vb_normals.c</file>
<file>src/tnl/t_vb_points.c</file>
<file>src/tnl/t_vp_build.c</file>
<file>src/tnl/t_vertex.c</file>
<file>src/tnl/t_vertex_sse.c</file>
<file>src/tnl/t_vertex_generic.c</file>
<file>src/tnl/t_vtx_api.c</file>
<file>src/tnl/t_vtx_generic.c</file>
<file>src/tnl/t_vtx_x86.c</file>
<file>src/tnl/t_vtx_eval.c</file>
<file>src/tnl/t_vtx_exec.c</file>
<file>src/shader/arbfragparse.c</file>
<file>src/shader/arbprogparse.c</file>
<file>src/shader/arbprogram.c</file>
<file>src/shader/arbvertparse.c</file>
<file>src/shader/atifragshader.c</file>
<file>src/shader/grammar/grammar_mesa.c</file>
<file>src/shader/nvfragparse.c</file>
<file>src/shader/nvprogram.c</file>
<file>src/shader/nvvertexec.c</file>
<file>src/shader/nvvertparse.c</file>
<file>src/shader/program.c</file>
<file>src/shader/shaderobjects.c</file>
<file>src/shader/shaderobjects_3dlabs.c</file>
<file>src/swrast/s_fragprog_to_c.c</file>
<file>src/swrast/s_aaline.c</file>
<file>src/swrast/s_aatriangle.c</file>
<file>src/swrast/s_accum.c</file>
<file>src/swrast/s_alpha.c</file>
<file>src/swrast/s_atifragshader.c</file>
<file>src/swrast/s_bitmap.c</file>
<file>src/swrast/s_blend.c</file>
<file>src/swrast/s_buffers.c</file>
<file>src/swrast/s_copypix.c</file>
<file>src/swrast/s_context.c</file>
<file>src/swrast/s_depth.c</file>
<file>src/swrast/s_drawpix.c</file>
<file>src/swrast/s_feedback.c</file>
<file>src/swrast/s_fog.c</file>
<file>src/swrast/s_imaging.c</file>
<file>src/swrast/s_lines.c</file>
<file>src/swrast/s_logic.c</file>
<file>src/swrast/s_masking.c</file>
<file>src/swrast/s_nvfragprog.c</file>
<file>src/swrast/s_pixeltex.c</file>
<file>src/swrast/s_points.c</file>
<file>src/swrast/s_readpix.c</file>
<file>src/swrast/s_span.c</file>
<file>src/swrast/s_stencil.c</file>
<file>src/swrast/s_tcc.c</file>
<file>src/swrast/s_texture.c</file>
<file>src/swrast/s_texstore.c</file>
<file>src/swrast/s_triangle.c</file>
<file>src/swrast/s_zoom.c</file>
<file>src/swrast_setup/ss_context.c</file>
<file>src/swrast_setup/ss_triangle.c</file>
<file>src/x86/common_x86.c</file>
<file>src/x86/x86.c</file>
<file>src/x86/3dnow.c</file>
<file>src/x86/sse.c</file>
<file>src/x86/rtasm/x86sse.c</file>
<file>src/sparc/sparc.c</file>
<file>src/ppc/common_ppc.c</file>
<file>src/x86-64/x86-64.c</file>
<file>src/shader/slang/slang_assemble.c</file>
<file>src/shader/slang/slang_assemble_assignment.c</file>
<file>src/shader/slang/slang_assemble_conditional.c</file>
<file>src/shader/slang/slang_assemble_constructor.c</file>
<file>src/shader/slang/slang_assemble_typeinfo.c</file>
<file>src/shader/slang/slang_compile.c</file>
<file>src/shader/slang/slang_execute.c</file>
<file>src/shader/slang/slang_preprocess.c</file>
<file>src/shader/slang/slang_storage.c</file>
<file>src/shader/slang/slang_utility.c</file>
<file>src/x86/common_x86_asm.S</file>
<file>src/x86/x86_xform2.S</file>
<file>src/x86/x86_xform3.S</file>
<file>src/x86/x86_xform4.S</file>
<file>src/x86/x86_cliptest.S</file>
<file>src/x86/mmx_blend.S</file>
<file>src/x86/3dnow_xform1.S</file>
<file>src/x86/3dnow_xform2.S</file>
<file>src/x86/3dnow_xform3.S</file>
<file>src/x86/3dnow_xform4.S</file>
<file>src/x86/3dnow_normal.S</file>
<file>src/x86/sse_xform1.S</file>
<file>src/x86/sse_xform2.S</file>
<file>src/x86/sse_xform3.S</file>
<file>src/x86/sse_xform4.S</file>
<file>src/x86/sse_normal.S</file>
<file>src/x86/read_rgba_span_x86.S</file>
<file>src/tnl/t_vtx_x86_gcc.S</file>
<file>src/x86/glapi_x86.S</file>
<file>src/drivers/common/driverfuncs.c</file>
<file>src/drivers/windows/gdi/wmesa.c</file>
<file>src/drivers/windows/icd/icd.c</file>
</module>
-230
View File
@@ -1,230 +0,0 @@
# src/mesa/Makefile
TOP = ../..
include $(TOP)/configs/current
include sources
GL_MAJOR = 1
GL_MINOR = 5
GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
.SUFFIXES : .cpp
.c.o:
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
.cpp.o:
$(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
.S.o:
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
# Figure out what to make here
default:
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
$(MAKE) linux-solo ; \
elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
$(MAKE) osmesa-only ; \
elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
$(MAKE) beos ; \
elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
$(MAKE) directfb; \
else \
$(MAKE) stand-alone ; \
fi
# BeOS driver target
beos: depend subdirs mesa.a
cd drivers/beos; $(MAKE)
install: default
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
cd drivers/dri ; $(MAKE) install ; \
fi
######################################################################
# Linux solo DRI drivers
SOLO_C_SOURCES = \
$(MAIN_SOURCES) \
$(MATH_SOURCES) \
$(ARRAY_CACHE_SOURCES) \
$(TNL_SOURCES) \
$(SWRAST_SOURCES) \
$(SWRAST_SETUP_SOURCES) \
$(SHADER_SOURCES) \
$(SLANG_SOURCES) \
$(ASM_C_SOURCES)
SOLO_OBJECTS = $(SOLO_C_SOURCES:.c=.o) \
$(ASM_SOURCES:.S=.o)
linux-solo: depend subdirs mesa.a drivers-dri
# Make archive of core object files
mesa.a: $(SOLO_OBJECTS)
rm -f $@
ar rcv $@ $(SOLO_OBJECTS)
ranlib $@
@if [ "${CONFIG_NAME}" = "beos" ] ; then \
mimeset -f "$@" ; \
fi
# note: cannot use the name of the directory ("drivers") as the
# target, otherwise make will look & see that the "drivers" directory
# already exists, so not try to rebuild it...
drivers-dri:
cd drivers/dri ; $(MAKE)
#####################################################################
# Stand-alone Mesa libGL, no built-in drivers (DirectFB)
LIBGL_CORE_SOURCES = \
$(CORE_SOURCES) \
$(ASM_SOURCES)
LIBGL_CORE_OBJECTS = \
$(CORE_OBJECTS) \
$(ASM_SOURCES:.S=.o)
# Make libGL from core object files
libgl-core: $(LIBGL_CORE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(LIB_DIR) $(MKLIB_OPTIONS) $(LIBGL_CORE_OBJECTS) $(GL_LIB_DEPS)
# DirectFB driver target
directfb: depend subdirs libgl-core
cd drivers/directfb; $(MAKE)
######################################################################
# Stand-alone Mesa libGL and libOSMesa
STAND_ALONE_DRIVER_SOURCES = \
$(COMMON_DRIVER_SOURCES) \
$(X11_DRIVER_SOURCES) \
$(GLIDE_DRIVER_SOURCES) \
$(SVGA_DRIVER_SOURCES) \
$(FBDEV_DRIVER_SOURCES)
STAND_ALONE_SOURCES = \
$(CORE_SOURCES) \
$(ASM_SOURCES) \
$(STAND_ALONE_DRIVER_SOURCES)
# ASM_SOURCES is defined in the config file
ASM_OBJECTS = $(ASM_SOURCES:.S=.o)
STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o)
STAND_ALONE_OBJECTS = \
$(CORE_OBJECTS) \
$(ASM_OBJECTS) \
$(STAND_ALONE_DRIVER_OBJECTS)
# For libOSMesa16 or libOSMesa32 we link _all_ the objects into the library,
# not just the osmesa.o object (i.e. we don't have a libGL).
OSMESA16_OBJECTS = \
$(CORE_OBJECTS) \
$(ASM_OBJECTS) \
$(COMMON_DRIVER_OBJECTS) \
$(OSMESA_DRIVER_OBJECTS)
stand-alone: depend subdirs $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(OSMESA_LIB_NAME)
osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME)
subdirs:
@ (cd x86 ; $(MAKE))
@ (cd x86-64 ; $(MAKE))
# Make the GL library
$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
-install $(LIB_DIR) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
# Make the OSMesa library
$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
else \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(GL_TINY) \
-install $(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
fi
######################################################################
# 16 (or 32) bit/channel OSMesa
# $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA16_OBJECTS)
# $(TOP)/bin/mklib -o $(OSMESA_LIB) \
# -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
# -install $(LIB_DIR) \
# $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OSMESA16_OBJECTS)
######################################################################
# Generic stuff
ALL_SOURCES = \
$(GLAPI_SOURCES) \
$(MAIN_SOURCES) \
$(MATH_SOURCES) \
$(ARRAY_CACHE_SOURCES) \
$(TNL_SOURCES) \
$(SHADER_SOURCES) \
$(SWRAST_SOURCES) \
$(SWRAST_SETUP_SOURCES) \
$(ASM_C_SOURCES) \
$(X86_SOURCES) \
$(COMMON_DRIVER_SOURCES)\
$(X11_DRIVER_SOURCES) \
$(OSMESA_DRIVER_SOURCES)
SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \
tnl tnl_dd
# Update dependencies
depend: $(ALL_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
> /dev/null
# Emacs tags
tags:
etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
clean:
-rm -f */*.o
-rm -f */*/*.o
-rm -f depend depend.bak mesa.a
-rm -f drivers/*/*.o
(cd drivers/dri ; $(MAKE) clean)
(cd x86 ; $(MAKE) clean)
(cd x86-64 ; $(MAKE) clean)
include depend
-168
View File
@@ -1,168 +0,0 @@
# Mesa 3-D graphics library
# Version: 5.1
#
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# DOS/DJGPP core makefile v1.7 for Mesa
#
# Copyright (C) 2002 - Daniel Borca
# Email : [email protected]
# Web : http://www.geocities.com/dborca
#
# Available options:
#
# Environment variables:
# CFLAGS
#
# GLIDE path to Glide3 SDK; used with FX.
# default = $(TOP)/glide3
# FX=1 build for 3dfx Glide3. Note that this disables
# compilation of most DMesa code and requires fxMesa.
# As a consequence, you'll need the DJGPP Glide3
# library to build any application.
# default = no
# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
# default = no
#
# Targets:
# all: build GL
# clean: remove object files
#
.PHONY: all clean
.INTERMEDIATE: x86/gen_matypes.exe
TOP = ../..
GLIDE ?= $(TOP)/glide3
LIBDIR = $(TOP)/lib
GL_LIB = libgl.a
GL_DXE = gl.dxe
GL_IMP = libigl.a
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib
CC = gcc
CFLAGS += $(INCLUDE_DIRS)
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
ifeq ($(FX),1)
CFLAGS += -D__DOS__
CFLAGS += -I$(GLIDE)/include -DFX
LIBNAME = "Mesa/FX DJGPP"
else
LIBNAME = "Mesa DJGPP"
endif
AR = ar
ARFLAGS = crus
HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe)
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
include sources
ifeq ($(X86),1)
CFLAGS += -DUSE_X86_ASM
CFLAGS += -DUSE_MMX_ASM
CFLAGS += -DUSE_SSE_ASM
CFLAGS += -DUSE_3DNOW_ASM
X86_SOURCES += $(X86_API)
else
X86_SOURCES =
endif
DRIVER_SOURCES = \
drivers/dos/dmesa.c
ifeq ($(FX),1)
DRIVER_SOURCES += \
$(GLIDE_DRIVER_SOURCES)
else
DRIVER_SOURCES += \
drivers/dos/video.c \
drivers/dos/virtual.S \
drivers/dos/vesa.c \
drivers/dos/blit.S \
drivers/dos/vga.c \
drivers/dos/null.c \
drivers/dos/dpmi.c
endif
#DRIVER_SOURCES += $(OSMESA_DRIVER_SOURCES)
SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES)
OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES)))
.c.o:
$(CC) -o $@ $(CFLAGS) -c $<
.S.o:
$(CC) -o $@ $(CFLAGS) -c $<
.s.o:
$(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $<
all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $^
$(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
ifeq ($(HAVEDXE3),)
$(warning Missing DXE3 package... Skipping $(GL_DXE))
else
ifeq ($(FX),1)
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glide3x.dxe -U $^
else
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $^
endif
endif
$(X86_OBJECTS): x86/matypes.h
x86/matypes.h: x86/gen_matypes.exe
$< > $@
x86/gen_matypes.exe: x86/gen_matypes.c
$(CC) -o $@ $(CFLAGS) -s $<
clean:
-$(call UNLINK,array_cache/*.o)
-$(call UNLINK,glapi/*.o)
-$(call UNLINK,main/*.o)
-$(call UNLINK,math/*.o)
-$(call UNLINK,shader/*.o)
-$(call UNLINK,sparc/*.o)
-$(call UNLINK,ppc/*.o)
-$(call UNLINK,swrast/*.o)
-$(call UNLINK,swrast_setup/*.o)
-$(call UNLINK,tnl/*.o)
-$(call UNLINK,x86/*.o)
-$(call UNLINK,drivers/common/*.o)
-$(call UNLINK,drivers/dos/*.o)
-$(call UNLINK,drivers/glide/*.o)
-206
View File
@@ -1,206 +0,0 @@
# Mesa 3-D graphics library
# Version: 5.1
#
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# MinGW core makefile v1.4 for Mesa
#
# Copyright (C) 2002 - Daniel Borca
# Email : [email protected]
# Web : http://www.geocities.com/dborca
#
# Available options:
#
# Environment variables:
# CFLAGS
#
# GLIDE path to Glide3 SDK; used with FX.
# default = $(TOP)/glide3
# FX=1 build for 3dfx Glide3. Note that this disables
# compilation of most WMesa code and requires fxMesa.
# As a consequence, you'll need the Win32 Glide3
# library to build any application.
# default = no
# ICD=1 build the installable client driver interface
# (windows opengl driver interface)
# default = no
# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
# default = no
#
# Targets:
# all: build GL
# clean: remove object files
#
.PHONY: all clean
.INTERMEDIATE: x86/gen_matypes.exe
.SUFFIXES: .rc .res
# Set this to the prefix of your build tools, i.e. mingw32-
TOOLS_PREFIX = mingw32-
TOP = ../..
GLIDE ?= $(TOP)/glide3
LIBDIR = $(TOP)/lib
ifeq ($(ICD),1)
GL_DLL = mesa32.dll
GL_IMP = libmesa32.a
else
GL_DLL = opengl32.dll
GL_IMP = libopengl32.a
endif
LDLIBS = -lgdi32
CC = $(TOOLS_PREFIX)gcc
CFLAGS += -DBUILD_GL32 -D_OPENGL32_
CFLAGS += $(INCLUDE_DIRS)
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
ifeq ($(FX),1)
CFLAGS += -I$(GLIDE)/include -DFX
LDLIBS += -L$(GLIDE)/lib -lglide3x
GL_DEF = drivers/windows/fx/fxopengl.def
GL_RES = drivers/windows/fx/fx.rc
else
ifeq ($(ICD),1)
CFLAGS += -DUSE_MGL_NAMESPACE
GL_DEF = drivers/windows/icd/mesa.def
else
GL_DEF = drivers/windows/gdi/mesa.def
endif
endif
AR = ar
ARFLAGS = crus
UNLINK = del $(subst /,\,$(1))
ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = $(RM) $(1)
endif
ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
UNLINK = $(RM) $(1)
endif
include sources
ifeq ($(X86),1)
CFLAGS += -DUSE_X86_ASM
CFLAGS += -DUSE_MMX_ASM
CFLAGS += -DUSE_SSE_ASM
CFLAGS += -DUSE_3DNOW_ASM
X86_SOURCES += $(X86_API)
else
X86_SOURCES =
endif
ifeq ($(FX),1)
DRIVER_SOURCES = \
$(GLIDE_DRIVER_SOURCES) \
drivers/windows/fx/fxwgl.c
else
ifeq ($(ICD),1)
DRIVER_SOURCES = \
drivers/windows/gdi/wmesa.c \
drivers/windows/icd/icd.c
else
DRIVER_SOURCES = \
drivers/windows/gdi/wmesa.c \
drivers/windows/gdi/wgl.c
endif
endif
SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES)
OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES)))
RESOURCE = $(GL_RES:.rc=.res)
.c.o:
$(CC) -o $@ $(CFLAGS) -c $<
.S.o:
$(CC) -o $@ $(CFLAGS) -c $<
.s.o:
$(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $<
.rc.res:
windres -o $@ -Irc -Ocoff $<
all: $(LIBDIR) $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP)
$(LIBDIR):
mkdir -p $(LIBDIR)
$(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP): $(OBJECTS) $(RESOURCE)
$(TOOLS_PREFIX)dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) \
--target i386-mingw32 --def $(GL_DEF) -Wl,-enable-stdcall-fixup \
$^ $(LDLIBS)
$(X86_OBJECTS): x86/matypes.h
x86/matypes.h: x86/gen_matypes.exe
$(subst /,\,$< > $@)
x86/gen_matypes.exe: x86/gen_matypes.c
$(CC) -o $@ $(CFLAGS) -s $<
# [dBorca]
# glapi_x86.S needs some adjustments
# in order to generate correct entrypoints
# Trick: change the following condition to
# be always false if you need C entrypoints
# with USE_X86_ASM (useful for trace/debug)
ifeq (1,1)
x86/glapi_x86.o: x86/glapi_x86.S
$(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $<
else
main/dispatch.o: main/dispatch.c
$(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<
glapi/glapi.o: glapi/glapi.c
$(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<
endif
# [dBorca]
# if we want codegen, we have to stdcall
tnl/t_vtx_x86_gcc.o: tnl/t_vtx_x86_gcc.S
$(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $<
clean:
-$(call UNLINK,array_cache/*.o)
-$(call UNLINK,glapi/*.o)
-$(call UNLINK,main/*.o)
-$(call UNLINK,math/*.o)
-$(call UNLINK,shader/*.o)
-$(call UNLINK,sparc/*.o)
-$(call UNLINK,ppc/*.o)
-$(call UNLINK,swrast/*.o)
-$(call UNLINK,swrast_setup/*.o)
-$(call UNLINK,tnl/*.o)
-$(call UNLINK,x86/*.o)
-$(call UNLINK,drivers/common/*.o)
-$(call UNLINK,drivers/glide/*.o)
-$(call UNLINK,drivers/windows/fx/*.o)
-$(call UNLINK,drivers/windows/fx/*.res)
-$(call UNLINK,drivers/windows/gdi/*.o)
-$(call UNLINK,drivers/windows/icd/*.o)
@@ -1,375 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <[email protected]>
*/
#include "glheader.h"
#include "macros.h"
#include "imports.h"
#include "mtypes.h"
#include "array_cache/ac_context.h"
/*
* Initialize the array fallbacks. That is, by default the fallback arrays
* point into the current vertex attribute values in ctx->Current.Attrib[]
*/
static void _ac_fallbacks_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
struct gl_client_array *cl;
GLuint i;
cl = &ac->Fallback.Normal;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.Color;
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.SecondaryColor;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.FogCoord;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_FOG];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Fallback.Index;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) &ctx->Current.Index;
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) {
cl = &ac->Fallback.TexCoord[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
cl = &ac->Fallback.EdgeFlag;
cl->Size = 1;
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) &ctx->Current.EdgeFlag;
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
cl = &ac->Fallback.Attrib[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
cl->Ptr = (GLubyte *) ctx->Current.Attrib[i];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
}
/*
* Initialize the array cache pointers, types, strides, etc.
*/
static void _ac_cache_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
struct gl_client_array *cl;
GLuint size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES;
GLuint i;
cl = &ac->Cache.Vertex;
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.Normal;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 3 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.Color;
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.SecondaryColor;
cl->Size = 3;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.FogCoord;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
cl = &ac->Cache.Index;
cl->Size = 1;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
cl = &ac->Cache.TexCoord[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
cl = &ac->Cache.EdgeFlag;
cl->Size = 1;
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = sizeof(GLubyte);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
for (i = 0 ; i < VERT_ATTRIB_MAX; i++) {
cl = &ac->Cache.Attrib[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->BufferObj = ctx->Array.NullBufferObj;
#endif
}
}
/* This storage used to hold translated client data if type or stride
* need to be fixed.
*/
static void _ac_elts_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
GLuint size = 1000;
ac->Elts = (GLuint *)MALLOC( sizeof(GLuint) * size );
ac->elt_size = size;
}
static void _ac_raw_init( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
GLuint i;
ac->Raw.Color = ac->Fallback.Color;
ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag;
ac->Raw.FogCoord = ac->Fallback.FogCoord;
ac->Raw.Index = ac->Fallback.Index;
ac->Raw.Normal = ac->Fallback.Normal;
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
ac->Raw.Vertex = ctx->Array.Vertex;
ac->IsCached.Color = GL_FALSE;
ac->IsCached.EdgeFlag = GL_FALSE;
ac->IsCached.FogCoord = GL_FALSE;
ac->IsCached.Index = GL_FALSE;
ac->IsCached.Normal = GL_FALSE;
ac->IsCached.SecondaryColor = GL_FALSE;
ac->IsCached.Vertex = GL_FALSE;
for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) {
ac->Raw.TexCoord[i] = ac->Fallback.TexCoord[i];
ac->IsCached.TexCoord[i] = GL_FALSE;
}
for (i = 0 ; i < VERT_ATTRIB_MAX ; i++) {
ac->Raw.Attrib[i] = ac->Fallback.Attrib[i];
ac->IsCached.Attrib[i] = GL_FALSE;
}
}
GLboolean _ac_CreateContext( GLcontext *ctx )
{
ctx->acache_context = CALLOC(sizeof(ACcontext));
if (ctx->acache_context) {
_ac_cache_init( ctx );
_ac_fallbacks_init( ctx );
_ac_raw_init( ctx );
_ac_elts_init( ctx );
return GL_TRUE;
}
return GL_FALSE;
}
void _ac_DestroyContext( GLcontext *ctx )
{
struct gl_buffer_object *nullObj = ctx->Array.NullBufferObj;
ACcontext *ac = AC_CONTEXT(ctx);
GLint i;
/* only free vertex data if it's really a pointer to vertex data and
* not an offset into a buffer object.
*/
if (ac->Cache.Vertex.Ptr && ac->Cache.Vertex.BufferObj == nullObj)
FREE( (void *) ac->Cache.Vertex.Ptr );
if (ac->Cache.Normal.Ptr && ac->Cache.Normal.BufferObj == nullObj)
FREE( (void *) ac->Cache.Normal.Ptr );
if (ac->Cache.Color.Ptr && ac->Cache.Color.BufferObj == nullObj)
FREE( (void *) ac->Cache.Color.Ptr );
if (ac->Cache.SecondaryColor.Ptr && ac->Cache.SecondaryColor.BufferObj == nullObj)
FREE( (void *) ac->Cache.SecondaryColor.Ptr );
if (ac->Cache.EdgeFlag.Ptr && ac->Cache.EdgeFlag.BufferObj == nullObj)
FREE( (void *) ac->Cache.EdgeFlag.Ptr );
if (ac->Cache.Index.Ptr && ac->Cache.Index.BufferObj == nullObj)
FREE( (void *) ac->Cache.Index.Ptr );
if (ac->Cache.FogCoord.Ptr && ac->Cache.FogCoord.BufferObj == nullObj)
FREE( (void *) ac->Cache.FogCoord.Ptr );
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
if (ac->Cache.TexCoord[i].Ptr && ac->Cache.TexCoord[i].BufferObj == nullObj)
FREE( (void *) ac->Cache.TexCoord[i].Ptr );
}
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
if (ac->Cache.Attrib[i].Ptr && ac->Cache.Attrib[i].BufferObj == nullObj)
FREE( (void *) ac->Cache.Attrib[i].Ptr );
}
if (ac->Elts)
FREE( ac->Elts );
/* Free the context structure itself */
FREE(ac);
ctx->acache_context = NULL;
}
void _ac_InvalidateState( GLcontext *ctx, GLuint new_state )
{
AC_CONTEXT(ctx)->NewState |= new_state;
AC_CONTEXT(ctx)->NewArrayState |= ctx->Array.NewState;
}
@@ -1,99 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <[email protected]>
*/
#ifndef _AC_CONTEXT_H
#define _AC_CONTEXT_H
#include "glheader.h"
#include "mtypes.h"
#include "array_cache/acache.h"
/* These are used to make the ctx->Current values look like
* arrays (with zero StrideB).
*/
struct ac_arrays {
struct gl_client_array Vertex;
struct gl_client_array Normal;
struct gl_client_array Color;
struct gl_client_array SecondaryColor;
struct gl_client_array FogCoord;
struct gl_client_array Index;
struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS];
struct gl_client_array EdgeFlag;
struct gl_client_array Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
struct ac_array_pointers {
struct gl_client_array *Vertex;
struct gl_client_array *Normal;
struct gl_client_array *Color;
struct gl_client_array *SecondaryColor;
struct gl_client_array *FogCoord;
struct gl_client_array *Index;
struct gl_client_array *TexCoord[MAX_TEXTURE_COORD_UNITS];
struct gl_client_array *EdgeFlag;
struct gl_client_array *Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
struct ac_array_flags {
GLboolean Vertex;
GLboolean Normal;
GLboolean Color;
GLboolean SecondaryColor;
GLboolean FogCoord;
GLboolean Index;
GLboolean TexCoord[MAX_TEXTURE_COORD_UNITS];
GLboolean EdgeFlag;
GLboolean Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
typedef struct {
GLuint NewState; /* not needed? */
GLuint NewArrayState;
/* Facility for importing and caching array data:
*/
struct ac_arrays Fallback;
struct ac_arrays Cache;
struct ac_arrays Raw;
struct ac_array_flags IsCached;
GLuint start;
GLuint count;
/* Facility for importing element lists:
*/
GLuint *Elts;
GLuint elt_size;
} ACcontext;
#define AC_CONTEXT(ctx) ((ACcontext *)ctx->acache_context)
#endif
@@ -1,902 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <[email protected]>
*/
#include "glheader.h"
#include "macros.h"
#include "imports.h"
#include "mtypes.h"
#include "math/m_translate.h"
#include "array_cache/ac_context.h"
#include "math/m_translate.h"
#define STRIDE_ARRAY( array, offset ) \
do { \
GLubyte *tmp = ADD_POINTERS( (array).BufferObj->Data, (array).Ptr ) \
+ (offset) * (array).StrideB; \
(array).Ptr = tmp; \
} while (0)
/* Set the array pointer back to its source when the cached data is
* invalidated:
*/
static void
reset_texcoord( GLcontext *ctx, GLuint unit )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.TexCoord[unit].Enabled) {
ac->Raw.TexCoord[unit] = ctx->Array.TexCoord[unit];
STRIDE_ARRAY(ac->Raw.TexCoord[unit], ac->start);
}
else {
ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit];
if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3] != 1.0)
ac->Raw.TexCoord[unit].Size = 4;
else if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2] != 0.0)
ac->Raw.TexCoord[unit].Size = 3;
else
ac->Raw.TexCoord[unit].Size = 2;
}
ac->IsCached.TexCoord[unit] = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_TEXCOORD(unit);
}
static void
reset_vertex( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
ASSERT(ctx->Array.Vertex.Enabled
|| (ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled));
ac->Raw.Vertex = ctx->Array.Vertex;
STRIDE_ARRAY(ac->Raw.Vertex, ac->start);
ac->IsCached.Vertex = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_VERTEX;
}
static void
reset_normal( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.Normal.Enabled) {
ac->Raw.Normal = ctx->Array.Normal;
STRIDE_ARRAY(ac->Raw.Normal, ac->start);
}
else {
ac->Raw.Normal = ac->Fallback.Normal;
}
ac->IsCached.Normal = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_NORMAL;
}
static void
reset_color( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.Color.Enabled) {
ac->Raw.Color = ctx->Array.Color;
STRIDE_ARRAY(ac->Raw.Color, ac->start);
}
else
ac->Raw.Color = ac->Fallback.Color;
ac->IsCached.Color = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_COLOR0;
}
static void
reset_secondarycolor( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.SecondaryColor.Enabled) {
ac->Raw.SecondaryColor = ctx->Array.SecondaryColor;
STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start);
}
else
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
ac->IsCached.SecondaryColor = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_COLOR1;
}
static void
reset_index( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.Index.Enabled) {
ac->Raw.Index = ctx->Array.Index;
STRIDE_ARRAY(ac->Raw.Index, ac->start);
}
else
ac->Raw.Index = ac->Fallback.Index;
ac->IsCached.Index = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_INDEX;
}
static void
reset_fogcoord( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.FogCoord.Enabled) {
ac->Raw.FogCoord = ctx->Array.FogCoord;
STRIDE_ARRAY(ac->Raw.FogCoord, ac->start);
}
else
ac->Raw.FogCoord = ac->Fallback.FogCoord;
ac->IsCached.FogCoord = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_FOGCOORD;
}
static void
reset_edgeflag( GLcontext *ctx )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.EdgeFlag.Enabled) {
ac->Raw.EdgeFlag = ctx->Array.EdgeFlag;
STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start);
}
else
ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag;
ac->IsCached.EdgeFlag = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_EDGEFLAG;
}
static void
reset_attrib( GLcontext *ctx, GLuint index )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (ctx->Array.VertexAttrib[index].Enabled) {
ac->Raw.Attrib[index] = ctx->Array.VertexAttrib[index];
STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start);
}
else
ac->Raw.Attrib[index] = ac->Fallback.Attrib[index];
ac->IsCached.Attrib[index] = GL_FALSE;
ac->NewArrayState &= ~_NEW_ARRAY_ATTRIB(index);
}
/**
* Generic import function for color data
*/
static void
import( const GLcontext *ctx,
GLenum destType,
struct gl_client_array *to,
const struct gl_client_array *from )
{
const ACcontext *ac = AC_CONTEXT(ctx);
if (destType == 0)
destType = from->Type;
switch (destType) {
case GL_FLOAT:
_math_trans_4fc( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
break;
case GL_UNSIGNED_BYTE:
_math_trans_4ub( (GLubyte (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLubyte);
to->Type = GL_UNSIGNED_BYTE;
break;
case GL_UNSIGNED_SHORT:
_math_trans_4us( (GLushort (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLushort);
to->Type = GL_UNSIGNED_SHORT;
break;
default:
_mesa_problem(ctx, "Unexpected dest format in import()");
break;
}
}
/*
* Functions to import array ranges with specified types and strides.
* For example, if the vertex data is GLshort[2] and we want GLfloat[3]
* we'll use an import function to do the data conversion.
*/
static void
import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.TexCoord[unit];
struct gl_client_array *to = &ac->Cache.TexCoord[unit];
(void) type; (void) stride;
ASSERT(unit < ctx->Const.MaxTextureCoordUnits);
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->Size = from->Size;
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.TexCoord[unit] = GL_TRUE;
}
static void
import_vertex( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Vertex;
struct gl_client_array *to = &ac->Cache.Vertex;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->Size = from->Size;
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.Vertex = GL_TRUE;
}
static void
import_normal( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Normal;
struct gl_client_array *to = &ac->Cache.Normal;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 3*sizeof(GLfloat) || stride == 0);
_math_trans_3f( (GLfloat (*)[3]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = 3 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.Normal = GL_TRUE;
}
static void
import_color( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Color;
struct gl_client_array *to = &ac->Cache.Color;
(void) stride;
import( ctx, type, to, from );
ac->IsCached.Color = GL_TRUE;
}
static void
import_index( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Index;
struct gl_client_array *to = &ac->Cache.Index;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_UNSIGNED_INT);
ASSERT(stride == sizeof(GLuint) || stride == 0);
_math_trans_1ui( (GLuint *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = sizeof(GLuint);
to->Type = GL_UNSIGNED_INT;
ac->IsCached.Index = GL_TRUE;
}
static void
import_secondarycolor( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.SecondaryColor;
struct gl_client_array *to = &ac->Cache.SecondaryColor;
(void) stride;
import( ctx, type, to, from );
ac->IsCached.SecondaryColor = GL_TRUE;
}
static void
import_fogcoord( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.FogCoord;
struct gl_client_array *to = &ac->Cache.FogCoord;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == sizeof(GLfloat) || stride == 0);
_math_trans_1f( (GLfloat *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.FogCoord = GL_TRUE;
}
static void
import_edgeflag( GLcontext *ctx, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.EdgeFlag;
struct gl_client_array *to = &ac->Cache.EdgeFlag;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
ASSERT(type == GL_UNSIGNED_BYTE);
ASSERT(stride == sizeof(GLubyte) || stride == 0);
_math_trans_1ub( (GLubyte *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
0,
ac->count - ac->start);
to->StrideB = sizeof(GLubyte);
to->Type = GL_UNSIGNED_BYTE;
ac->IsCached.EdgeFlag = GL_TRUE;
}
static void
import_attrib( GLcontext *ctx, GLuint index, GLenum type, GLuint stride )
{
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Attrib[index];
struct gl_client_array *to = &ac->Cache.Attrib[index];
(void) type; (void) stride;
ASSERT(index < MAX_VERTEX_PROGRAM_ATTRIBS);
/* Limited choices at this stage:
*/
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
0,
ac->count - ac->start);
to->Size = from->Size;
to->StrideB = 4 * sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.Attrib[index] = GL_TRUE;
}
/*
* Externals to request arrays with specific properties:
*/
struct gl_client_array *
_ac_import_texcoord( GLcontext *ctx,
GLuint unit,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
ASSERT(unit < ctx->Const.MaxTextureCoordUnits);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_TEXCOORD(unit))
reset_texcoord( ctx, unit );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.TexCoord[unit].Type != type ||
(reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint)reqstride) ||
reqwriteable)
{
if (!ac->IsCached.TexCoord[unit])
import_texcoord(ctx, unit, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.TexCoord[unit];
}
else {
*writeable = GL_FALSE;
return &ac->Raw.TexCoord[unit];
}
}
struct gl_client_array *
_ac_import_vertex( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_VERTEX)
reset_vertex( ctx );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.Vertex.Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Vertex.Type != type ||
(reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Vertex)
import_vertex(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Vertex;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Vertex;
}
}
struct gl_client_array *
_ac_import_normal( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_NORMAL)
reset_normal( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Normal.Type != type ||
(reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Normal)
import_normal(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Normal;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Normal;
}
}
struct gl_client_array *
_ac_import_color( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_COLOR0)
reset_color( ctx );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.Color.Size > (GLint) reqsize) {
return NULL;
}
/* Do we need to pull in a copy of the client data:
*/
if ((type != 0 && ac->Raw.Color.Type != type) ||
(reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Color) {
import_color(ctx, type, reqstride );
}
*writeable = GL_TRUE;
return &ac->Cache.Color;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Color;
}
}
struct gl_client_array *
_ac_import_index( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_INDEX)
reset_index( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Index.Type != type ||
(reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Index)
import_index(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Index;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Index;
}
}
struct gl_client_array *
_ac_import_secondarycolor( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_COLOR1)
reset_secondarycolor( ctx );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.SecondaryColor.Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if ((type != 0 && ac->Raw.SecondaryColor.Type != type) ||
(reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint)reqstride) ||
reqwriteable)
{
if (!ac->IsCached.SecondaryColor)
import_secondarycolor(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.SecondaryColor;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.SecondaryColor;
}
}
struct gl_client_array *
_ac_import_fogcoord( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD)
reset_fogcoord( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.FogCoord.Type != type ||
(reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.FogCoord)
import_fogcoord(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.FogCoord;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.FogCoord;
}
}
struct gl_client_array *
_ac_import_edgeflag( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG)
reset_edgeflag( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.EdgeFlag.Type != type ||
(reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.EdgeFlag)
import_edgeflag(ctx, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.EdgeFlag;
}
else {
*writeable = GL_FALSE;
return &ac->Raw.EdgeFlag;
}
}
/* GL_NV_vertex_program */
struct gl_client_array *
_ac_import_attrib( GLcontext *ctx,
GLuint index,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
{
ACcontext *ac = AC_CONTEXT(ctx);
ASSERT(index < VERT_ATTRIB_MAX);
/* Can we keep the existing version?
*/
if (ac->NewArrayState & _NEW_ARRAY_ATTRIB(index))
reset_attrib( ctx, index );
/* Is the request impossible?
*/
if (reqsize != 0 && ac->Raw.Attrib[index].Size > (GLint) reqsize)
return NULL;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Attrib[index].Type != type ||
(reqstride != 0 && ac->Raw.Attrib[index].StrideB != (GLint)reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Attrib[index])
import_attrib(ctx, index, type, reqstride );
*writeable = GL_TRUE;
return &ac->Cache.Attrib[index];
}
else {
*writeable = GL_FALSE;
return &ac->Raw.Attrib[index];
}
}
/* Clients must call this function to validate state and set bounds
* before importing any data:
*/
void
_ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (!ctx->Array.LockCount) {
/* Not locked, discard cached data. Changes to lock
* status are caught via. _ac_invalidate_state().
*/
ac->NewArrayState = _NEW_ARRAY_ALL;
ac->start = start;
ac->count = count;
}
else {
/* Locked, discard data for any disabled arrays. Require that
* the whole locked range always be dealt with, otherwise hard to
* maintain cached data in the face of clipping.
*/
ac->NewArrayState |= ~ctx->Array._Enabled;
ac->start = ctx->Array.LockFirst;
ac->count = ctx->Array.LockCount;
ASSERT(ac->start == start); /* hmm? */
ASSERT(ac->count == count);
}
}
/* Additional convienence function for importing the element list
* for glDrawElements() and glDrawRangeElements().
*/
CONST void *
_ac_import_elements( GLcontext *ctx,
GLenum new_type,
GLuint count,
GLenum old_type,
CONST void *indices )
{
ACcontext *ac = AC_CONTEXT(ctx);
if (old_type == new_type)
return indices;
if (ac->elt_size < count * sizeof(GLuint)) {
if (ac->Elts) FREE(ac->Elts);
while (ac->elt_size < count * sizeof(GLuint))
ac->elt_size *= 2;
ac->Elts = (GLuint *) MALLOC(ac->elt_size);
}
switch (new_type) {
case GL_UNSIGNED_BYTE:
ASSERT(0);
return NULL;
case GL_UNSIGNED_SHORT:
ASSERT(0);
return NULL;
case GL_UNSIGNED_INT: {
GLuint *out = (GLuint *)ac->Elts;
GLuint i;
switch (old_type) {
case GL_UNSIGNED_BYTE: {
CONST GLubyte *in = (CONST GLubyte *)indices;
for (i = 0 ; i < count ; i++)
out[i] = in[i];
break;
}
case GL_UNSIGNED_SHORT: {
CONST GLushort *in = (CONST GLushort *)indices;
for (i = 0 ; i < count ; i++)
out[i] = in[i];
break;
}
default:
ASSERT(0);
}
return (CONST void *)out;
}
default:
ASSERT(0);
break;
}
return NULL;
}
-132
View File
@@ -1,132 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Keith Whitwell <[email protected]>
*/
#ifndef _ARRAYCACHE_H
#define _ARRAYCACHE_H
#include "mtypes.h"
extern GLboolean
_ac_CreateContext( GLcontext *ctx );
extern void
_ac_DestroyContext( GLcontext *ctx );
extern void
_ac_InvalidateState( GLcontext *ctx, GLuint new_state );
extern struct gl_client_array *
_ac_import_vertex( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_normal( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_color( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_index( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_secondarycolor( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_fogcoord( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_edgeflag( GLcontext *ctx,
GLenum type,
GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_texcoord( GLcontext *ctx,
GLuint unit,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
_ac_import_attrib( GLcontext *ctx,
GLuint index,
GLenum type,
GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
/* Clients must call this function to validate state and set bounds
* before importing any data:
*/
extern void
_ac_import_range( GLcontext *ctx, GLuint start, GLuint count );
/* Additional convenience function:
*/
extern CONST void *
_ac_import_elements( GLcontext *ctx,
GLenum new_type,
GLuint count,
GLenum old_type,
CONST void *indices );
#endif
@@ -1,37 +0,0 @@
# Makefile for core library for VMS
# contributed by Jouk Jansen [email protected]
# Last revision : 16 June 2003
.first
define gl [---.include.gl]
define math [-.math]
define array_cache [-.array_cache]
.include [---]mms-config.
##### MACROS #####
VPATH = RCS
INCDIR = [---.include],[-.main],[-.glapi]
LIBDIR = [---.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)
SOURCES = ac_context.c ac_import.c
OBJECTS = ac_context.obj,ac_import.obj
##### RULES #####
VERSION=Mesa V3.4
##### TARGETS #####
# Make the library
$(LIBDIR)$(GL_LIB) : $(OBJECTS)
@ library $(LIBDIR)$(GL_LIB) $(OBJECTS)
clean :
purge
delete *.obj;*
ac_context.obj : ac_context.c
ac_import.obj : ac_import.c
View File
-26
View File
@@ -1,26 +0,0 @@
# Makefile for Mesa for VMS
# contributed by Jouk Jansen [email protected]
all :
set default [.main]
$(MMS)$(MMSQUALIFIERS)
set default [-.glapi]
$(MMS)$(MMSQUALIFIERS)
set default [-.shader]
$(MMS)$(MMSQUALIFIERS)
set default [-.drivers.common]
$(MMS)$(MMSQUALIFIERS)
set default [-.x11]
$(MMS)$(MMSQUALIFIERS)
set default [-.osmesa]
$(MMS)$(MMSQUALIFIERS)
set default [--.math]
$(MMS)$(MMSQUALIFIERS)
set default [-.tnl]
$(MMS)$(MMSQUALIFIERS)
set default [-.swrast]
$(MMS)$(MMSQUALIFIERS)
set default [-.swrast_setup]
$(MMS)$(MMSQUALIFIERS)
set default [-.array_cache]
$(MMS)$(MMSQUALIFIERS)
@@ -1,37 +0,0 @@
# Makefile for core library for VMS
# contributed by Jouk Jansen [email protected]
# Last revision : 16 June 2003
.first
define gl [----.include.gl]
define math [--.math]
define swrast [--.swrast]
.include [----]mms-config.
##### MACROS #####
VPATH = RCS
INCDIR = [----.include],[--.main],[--.glapi],[--.shader]
LIBDIR = [----.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)
SOURCES = driverfuncs.c
OBJECTS =driverfuncs.obj
##### RULES #####
VERSION=Mesa V3.4
##### TARGETS #####
# Make the library
$(LIBDIR)$(GL_LIB) : $(OBJECTS)
@ library $(LIBDIR)$(GL_LIB) $(OBJECTS)
clean :
purge
delete *.obj;*
driverfuncs.obj : driverfuncs.c
@@ -1,231 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.3
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
#include "imports.h"
#include "buffers.h"
#include "context.h"
#include "framebuffer.h"
#include "program.h"
#include "renderbuffer.h"
#include "texcompress.h"
#include "texformat.h"
#include "teximage.h"
#include "texobj.h"
#include "texstore.h"
#if FEATURE_ARB_vertex_buffer_object
#include "bufferobj.h"
#endif
#if FEATURE_EXT_framebuffer_object
#include "fbobject.h"
#include "texrender.h"
#endif
#include "driverfuncs.h"
#include "swrast/swrast.h"
/**
* Plug in default functions for all pointers in the dd_function_table
* structure.
* Device drivers should call this function and then plug in any
* functions which it wants to override.
* Some functions (pointers) MUST be implemented by all drivers (REQUIRED).
*
* \param table the dd_function_table to initialize
*/
void
_mesa_init_driver_functions(struct dd_function_table *driver)
{
_mesa_bzero(driver, sizeof(*driver));
driver->GetString = NULL; /* REQUIRED! */
driver->UpdateState = NULL; /* REQUIRED! */
driver->GetBufferSize = NULL; /* REQUIRED! */
driver->ResizeBuffers = _mesa_resize_framebuffer;
driver->Error = NULL;
driver->Finish = NULL;
driver->Flush = NULL;
/* framebuffer/image functions */
driver->Clear = _swrast_Clear;
driver->Accum = _swrast_Accum;
driver->DrawPixels = _swrast_DrawPixels;
driver->ReadPixels = _swrast_ReadPixels;
driver->CopyPixels = _swrast_CopyPixels;
driver->Bitmap = _swrast_Bitmap;
/* Texture functions */
driver->ChooseTextureFormat = _mesa_choose_tex_format;
driver->TexImage1D = _mesa_store_teximage1d;
driver->TexImage2D = _mesa_store_teximage2d;
driver->TexImage3D = _mesa_store_teximage3d;
driver->TexSubImage1D = _mesa_store_texsubimage1d;
driver->TexSubImage2D = _mesa_store_texsubimage2d;
driver->TexSubImage3D = _mesa_store_texsubimage3d;
driver->GetTexImage = _mesa_get_teximage;
driver->CopyTexImage1D = _swrast_copy_teximage1d;
driver->CopyTexImage2D = _swrast_copy_teximage2d;
driver->CopyTexSubImage1D = _swrast_copy_texsubimage1d;
driver->CopyTexSubImage2D = _swrast_copy_texsubimage2d;
driver->CopyTexSubImage3D = _swrast_copy_texsubimage3d;
driver->TestProxyTexImage = _mesa_test_proxy_teximage;
driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d;
driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d;
driver->CompressedTexImage3D = _mesa_store_compressed_teximage3d;
driver->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d;
driver->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d;
driver->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d;
driver->GetCompressedTexImage = _mesa_get_compressed_teximage;
driver->CompressedTextureSize = _mesa_compressed_texture_size;
driver->BindTexture = NULL;
driver->NewTextureObject = _mesa_new_texture_object;
driver->DeleteTexture = _mesa_delete_texture_object;
driver->NewTextureImage = _mesa_new_texture_image;
driver->FreeTexImageData = _mesa_free_texture_image_data;
driver->TextureMemCpy = _mesa_memcpy;
driver->IsTextureResident = NULL;
driver->PrioritizeTexture = NULL;
driver->ActiveTexture = NULL;
driver->UpdateTexturePalette = NULL;
/* imaging */
driver->CopyColorTable = _swrast_CopyColorTable;
driver->CopyColorSubTable = _swrast_CopyColorSubTable;
driver->CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
driver->CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
/* Vertex/fragment programs */
driver->BindProgram = NULL;
driver->NewProgram = _mesa_new_program;
driver->DeleteProgram = _mesa_delete_program;
/* simple state commands */
driver->AlphaFunc = NULL;
driver->BlendColor = NULL;
driver->BlendEquationSeparate = NULL;
driver->BlendFuncSeparate = NULL;
driver->ClearColor = NULL;
driver->ClearDepth = NULL;
driver->ClearIndex = NULL;
driver->ClearStencil = NULL;
driver->ClipPlane = NULL;
driver->ColorMask = NULL;
driver->ColorMaterial = NULL;
driver->CullFace = NULL;
driver->DrawBuffer = _swrast_DrawBuffer;
driver->DrawBuffers = NULL; /***_swrast_DrawBuffers;***/
driver->FrontFace = NULL;
driver->DepthFunc = NULL;
driver->DepthMask = NULL;
driver->DepthRange = NULL;
driver->Enable = NULL;
driver->Fogfv = NULL;
driver->Hint = NULL;
driver->IndexMask = NULL;
driver->Lightfv = NULL;
driver->LightModelfv = NULL;
driver->LineStipple = NULL;
driver->LineWidth = NULL;
driver->LogicOpcode = NULL;
driver->PointParameterfv = NULL;
driver->PointSize = NULL;
driver->PolygonMode = NULL;
driver->PolygonOffset = NULL;
driver->PolygonStipple = NULL;
driver->ReadBuffer = NULL;
driver->RenderMode = NULL;
driver->Scissor = NULL;
driver->ShadeModel = NULL;
driver->StencilFunc = NULL;
driver->StencilMask = NULL;
driver->StencilOp = NULL;
driver->ActiveStencilFace = NULL;
driver->TexGen = NULL;
driver->TexEnv = NULL;
driver->TexParameter = NULL;
driver->TextureMatrix = NULL;
driver->Viewport = NULL;
/* vertex arrays */
driver->VertexPointer = NULL;
driver->NormalPointer = NULL;
driver->ColorPointer = NULL;
driver->FogCoordPointer = NULL;
driver->IndexPointer = NULL;
driver->SecondaryColorPointer = NULL;
driver->TexCoordPointer = NULL;
driver->EdgeFlagPointer = NULL;
driver->VertexAttribPointer = NULL;
driver->LockArraysEXT = NULL;
driver->UnlockArraysEXT = NULL;
/* state queries */
driver->GetBooleanv = NULL;
driver->GetDoublev = NULL;
driver->GetFloatv = NULL;
driver->GetIntegerv = NULL;
driver->GetPointerv = NULL;
#if FEATURE_ARB_vertex_buffer_object
driver->NewBufferObject = _mesa_new_buffer_object;
driver->DeleteBuffer = _mesa_delete_buffer_object;
driver->BindBuffer = NULL;
driver->BufferData = _mesa_buffer_data;
driver->BufferSubData = _mesa_buffer_subdata;
driver->GetBufferSubData = _mesa_buffer_get_subdata;
driver->MapBuffer = _mesa_buffer_map;
driver->UnmapBuffer = _mesa_buffer_unmap;
#endif
#if FEATURE_EXT_framebuffer_object
driver->NewFramebuffer = _mesa_new_framebuffer;
driver->NewRenderbuffer = _mesa_new_soft_renderbuffer;
driver->RenderbufferTexture = _mesa_renderbuffer_texture;
driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer;
#endif
/* T&L stuff */
driver->NeedValidate = GL_FALSE;
driver->ValidateTnlModule = NULL;
driver->CurrentExecPrimitive = 0;
driver->CurrentSavePrimitive = 0;
driver->NeedFlush = 0;
driver->SaveNeedFlush = 0;
driver->FlushVertices = NULL;
driver->SaveFlushVertices = NULL;
driver->NotifySaveBegin = NULL;
driver->LightingSpaceChange = NULL;
driver->MakeCurrent = NULL;
/* display list */
driver->NewList = NULL;
driver->EndList = NULL;
driver->BeginCallList = NULL;
driver->EndCallList = NULL;
}
@@ -1,32 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef DRIVERFUNCS_H
#define DRIVERFUNCS_H
extern void
_mesa_init_driver_functions(struct dd_function_table *driver);
#endif
@@ -1,955 +0,0 @@
LIBRARY OpenGL32
DESCRIPTION "Mesa 5.1"
EXPORTS
glAccum
glActiveStencilFaceEXT
glActiveTexture
glActiveTextureARB
glAlphaFunc
glAreProgramsResidentNV
glAreTexturesResident
glAreTexturesResidentEXT
glArrayElement
glArrayElementEXT
glBegin
glBeginQueryARB
glBindBufferARB
glBindProgramARB
glBindProgramNV
glBindTexture
glBindTextureEXT
glBitmap
;glBlendColor
;glBlendColorEXT
glBlendEquation
glBlendEquationEXT
glBlendFunc
glBlendFuncSeparate
glBlendFuncSeparateEXT
glBlendFuncSeparateINGR
glBufferDataARB
glBufferSubDataARB
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClientActiveTexture
glClientActiveTextureARB
glClipPlane
glColorMask
glColorMaterial
glColorPointer
glColorPointerEXT
glColorSubTable
glColorSubTableEXT
glColorTable
glColorTableEXT
glColorTableParameterfv
glColorTableParameterfvSGI
glColorTableParameteriv
glColorTableParameterivSGI
glColorTableSGI
glColor3b
glColor3bv
glColor3d
glColor3dv
glColor3f
glColor3fv
glColor3i
glColor3iv
glColor3s
glColor3sv
glColor3ub
glColor3ubv
glColor3ui
glColor3uiv
glColor3us
glColor3usv
glColor4b
glColor4bv
glColor4d
glColor4dv
glColor4f
glColor4fv
glColor4i
glColor4iv
glColor4s
glColor4sv
glColor4ub
glColor4ubv
glColor4ui
glColor4uiv
glColor4us
glColor4usv
glCombinerInputNV
glCombinerOutputNV
glCombinerParameterfNV
glCombinerParameterfvNV
glCombinerParameteriNV
glCombinerParameterivNV
glCompressedTexImage1D
glCompressedTexImage1DARB
glCompressedTexImage2D
glCompressedTexImage2DARB
glCompressedTexImage3D
glCompressedTexImage3DARB
glCompressedTexSubImage1D
glCompressedTexSubImage1DARB
glCompressedTexSubImage2D
glCompressedTexSubImage2DARB
glCompressedTexSubImage3D
glCompressedTexSubImage3DARB
glConvolutionFilter1D
glConvolutionFilter1DEXT
glConvolutionFilter2D
glConvolutionFilter2DEXT
glConvolutionParameterf
glConvolutionParameterfEXT
glConvolutionParameterfv
glConvolutionParameterfvEXT
glConvolutionParameteri
glConvolutionParameteriEXT
glConvolutionParameteriv
glConvolutionParameterivEXT
glCopyColorSubTable
glCopyColorSubTableEXT
glCopyColorTable
glCopyColorTableSGI
glCopyConvolutionFilter1D
glCopyConvolutionFilter1DEXT
glCopyConvolutionFilter2D
glCopyConvolutionFilter2DEXT
glCopyPixels
glCopyTexImage1D
glCopyTexImage1DEXT
glCopyTexImage2D
glCopyTexImage2DEXT
glCopyTexSubImage1D
glCopyTexSubImage1DEXT
glCopyTexSubImage2D
glCopyTexSubImage2DEXT
glCopyTexSubImage3D
glCopyTexSubImage3DEXT
glCullFace
glCullParameterdvEXT
glCullParameterfvEXT
glDeleteBuffersARB
glDeleteFencesNV
glDeleteLists
glDeleteProgramsARB
glDeleteProgramsNV
glDeleteQueriesARB
glDeleteTextures
glDeleteTexturesEXT
glDepthBoundsEXT
glDepthFunc
glDepthMask
glDepthRange
glDetailTexFuncSGIS
glDisable
glDisableClientState
glDisableVertexAttribArrayARB
glDrawArrays
glDrawArraysEXT
glDrawBuffer
glDrawElements
glDrawPixels
glDrawRangeElements
glDrawRangeElementsEXT
glEdgeFlag
glEdgeFlagPointer
glEdgeFlagPointerEXT
glEdgeFlagv
glEnable
glEnableClientState
glEnableVertexAttribArrayARB
glEnd
glEndList
glEndQueryARB
glEvalCoord1d
glEvalCoord1dv
glEvalCoord1f
glEvalCoord1fv
glEvalCoord2d
glEvalCoord2dv
glEvalCoord2f
glEvalCoord2fv
glEvalMesh1
glEvalMesh2
glEvalPoint1
glEvalPoint2
glExecuteProgramNV
glFeedbackBuffer
glFinalCombinerInputNV
glFinish
glFinishFenceNV
glFlush
glFlushRasterSGIX
glFlushVertexArrayRangeNV
glFogCoordd
glFogCoorddEXT
glFogCoorddv
glFogCoorddvEXT
glFogCoordf
glFogCoordfEXT
glFogCoordfv
glFogCoordfvEXT
glFogCoordPointer
glFogCoordPointerEXT
glFogf
glFogfv
glFogi
glFogiv
glFragmentColorMaterialSGIX
glFragmentLightfSGIX
glFragmentLightfvSGIX
glFragmentLightiSGIX
glFragmentLightivSGIX
glFragmentLightModelfSGIX
glFragmentLightModelfvSGIX
glFragmentLightModeliSGIX
glFragmentLightModelivSGIX
glFragmentMaterialfSGIX
glFragmentMaterialfvSGIX
glFragmentMaterialiSGIX
glFragmentMaterialivSGIX
glFrameZoomSGIX
glFrontFace
glFrustum
glGenBuffersARB
glGenFencesNV
glGenLists
glGenProgramsARB
glGenProgramsNV
glGenQueriesARB
glGenTextures
glGenTexturesEXT
glGetBooleanv
glGetBufferParameterivARB
glGetBufferPointervARB
glGetBufferSubDataARB
glGetClipPlane
glGetColorTable
glGetColorTableEXT
glGetColorTableParameterfv
glGetColorTableParameterfvEXT
glGetColorTableParameterfvSGI
glGetColorTableParameteriv
glGetColorTableParameterivEXT
glGetColorTableParameterivSGI
glGetColorTableSGI
glGetCombinerInputParameterfvNV
glGetCombinerInputParameterivNV
glGetCombinerOutputParameterfvNV
glGetCombinerOutputParameterivNV
glGetCompressedTexImage
glGetCompressedTexImageARB
glGetConvolutionFilter
glGetConvolutionFilterEXT
glGetConvolutionParameterfv
glGetConvolutionParameterfvEXT
glGetConvolutionParameteriv
glGetConvolutionParameterivEXT
glGetDetailTexFuncSGIS
glGetDoublev
glGetError
glGetFenceivNV
glGetFinalCombinerInputParameterfvNV
glGetFinalCombinerInputParameterivNV
glGetFloatv
glGetFragmentLightfvSGIX
glGetFragmentLightivSGIX
glGetFragmentMaterialfvSGIX
glGetFragmentMaterialivSGIX
glGetHistogram
glGetHistogramEXT
glGetHistogramParameterfv
glGetHistogramParameterfvEXT
glGetHistogramParameteriv
glGetHistogramParameterivEXT
glGetInstrumentsSGIX
glGetIntegerv
glGetLightfv
glGetLightiv
glGetListParameterfvSGIX
glGetListParameterivSGIX
glGetMapdv
glGetMapfv
glGetMapiv
glGetMaterialfv
glGetMaterialiv
glGetMinmax
glGetMinmaxEXT
glGetMinmaxParameterfv
glGetMinmaxParameterfvEXT
glGetMinmaxParameteriv
glGetMinmaxParameterivEXT
glGetPixelMapfv
glGetPixelMapuiv
glGetPixelMapusv
glGetPixelTexGenParameterfvSGIS
glGetPixelTexGenParameterivSGIS
glGetPointerv
glGetPointervEXT
glGetPolygonStipple
glGetProgramEnvParameterdvARB
glGetProgramEnvParameterfvARB
glGetProgramivARB
glGetProgramivNV
glGetProgramLocalParameterdvARB
glGetProgramLocalParameterfvARB
glGetProgramNamedParameterdvNV
glGetProgramNamedParameterfvNV
glGetProgramParameterdvNV
glGetProgramParameterfvNV
glGetProgramStringARB
glGetProgramStringNV
glGetQueryivARB
glGetQueryObjectivARB
glGetQueryObjectuivARB
glGetSeparableFilter
glGetSeparableFilterEXT
glGetSharpenTexFuncSGIS
glGetString
glGetTexEnvfv
glGetTexEnviv
glGetTexFilterFuncSGIS
glGetTexGendv
glGetTexGenfv
glGetTexGeniv
glGetTexImage
glGetTexLevelParameterfv
glGetTexLevelParameteriv
glGetTexParameterfv
glGetTexParameteriv
glGetTrackMatrixivNV
glGetVertexAttribdvARB
glGetVertexAttribdvNV
glGetVertexAttribfvARB
glGetVertexAttribfvNV
glGetVertexAttribivARB
glGetVertexAttribivNV
glGetVertexAttribPointervARB
glGetVertexAttribPointervNV
glHint
glHintPGI
glHistogram
glHistogramEXT
glIndexd
glIndexdv
glIndexf
glIndexFuncEXT
glIndexfv
glIndexi
glIndexiv
glIndexMask
glIndexMaterialEXT
glIndexPointer
glIndexPointerEXT
glIndexs
glIndexsv
glIndexub
glIndexubv
glInitNames
glInstrumentsBufferSGIX
glInterleavedArrays
glIsBufferARB
glIsEnabled
glIsFenceNV
glIsList
glIsProgramARB
glIsProgramNV
glIsQueryARB
glIsTexture
glIsTextureEXT
glLightEnviSGIX
glLightf
glLightfv
glLighti
glLightiv
glLightModelf
glLightModelfv
glLightModeli
glLightModeliv
glLineStipple
glLineWidth
glListBase
glListParameterfSGIX
glListParameterfvSGIX
glListParameteriSGIX
glListParameterivSGIX
glLoadIdentity
glLoadMatrixd
glLoadMatrixf
glLoadName
glLoadProgramNV
glLoadTransposeMatrixd
glLoadTransposeMatrixdARB
glLoadTransposeMatrixf
glLoadTransposeMatrixfARB
glLockArraysEXT
glLogicOp
glMapBufferARB
glMapGrid1d
glMapGrid1f
glMapGrid2d
glMapGrid2f
glMap1d
glMap1f
glMap2d
glMap2f
glMaterialf
glMaterialfv
glMateriali
glMaterialiv
glMatrixMode
glMinmax
glMinmaxEXT
glMultiDrawArrays
glMultiDrawArraysEXT
glMultiDrawElements
glMultiDrawElementsEXT
glMultiModeDrawArraysIBM
glMultiModeDrawElementsIBM
glMultiTexCoord1d
glMultiTexCoord1dARB
glMultiTexCoord1dv
glMultiTexCoord1dvARB
glMultiTexCoord1f
glMultiTexCoord1fARB
glMultiTexCoord1fv
glMultiTexCoord1fvARB
glMultiTexCoord1i
glMultiTexCoord1iARB
glMultiTexCoord1iv
glMultiTexCoord1ivARB
glMultiTexCoord1s
glMultiTexCoord1sARB
glMultiTexCoord1sv
glMultiTexCoord1svARB
glMultiTexCoord2d
glMultiTexCoord2dARB
glMultiTexCoord2dv
glMultiTexCoord2dvARB
glMultiTexCoord2f
glMultiTexCoord2fARB
glMultiTexCoord2fv
glMultiTexCoord2fvARB
glMultiTexCoord2i
glMultiTexCoord2iARB
glMultiTexCoord2iv
glMultiTexCoord2ivARB
glMultiTexCoord2s
glMultiTexCoord2sARB
glMultiTexCoord2sv
glMultiTexCoord2svARB
glMultiTexCoord3d
glMultiTexCoord3dARB
glMultiTexCoord3dv
glMultiTexCoord3dvARB
glMultiTexCoord3f
glMultiTexCoord3fARB
glMultiTexCoord3fv
glMultiTexCoord3fvARB
glMultiTexCoord3i
glMultiTexCoord3iARB
glMultiTexCoord3iv
glMultiTexCoord3ivARB
glMultiTexCoord3s
glMultiTexCoord3sARB
glMultiTexCoord3sv
glMultiTexCoord3svARB
glMultiTexCoord4d
glMultiTexCoord4dARB
glMultiTexCoord4dv
glMultiTexCoord4dvARB
glMultiTexCoord4f
glMultiTexCoord4fARB
glMultiTexCoord4fv
glMultiTexCoord4fvARB
glMultiTexCoord4i
glMultiTexCoord4iARB
glMultiTexCoord4iv
glMultiTexCoord4ivARB
glMultiTexCoord4s
glMultiTexCoord4sARB
glMultiTexCoord4sv
glMultiTexCoord4svARB
glMultMatrixd
glMultMatrixf
glMultTransposeMatrixd
glMultTransposeMatrixdARB
glMultTransposeMatrixf
glMultTransposeMatrixfARB
glNewList
glNormalPointer
glNormalPointerEXT
glNormal3b
glNormal3bv
glNormal3d
glNormal3dv
glNormal3f
glNormal3fv
glNormal3i
glNormal3iv
glNormal3s
glNormal3sv
glOrtho
glPassThrough
glPixelMapfv
glPixelMapuiv
glPixelMapusv
glPixelStoref
glPixelStorei
glPixelTexGenParameterfSGIS
glPixelTexGenParameterfvSGIS
glPixelTexGenParameteriSGIS
glPixelTexGenParameterivSGIS
glPixelTexGenSGIX
glPixelTransferf
glPixelTransferi
glPixelZoom
glPointParameterf
glPointParameterfARB
glPointParameterfEXT
glPointParameterfSGIS
glPointParameterfv
glPointParameterfvARB
glPointParameterfvEXT
glPointParameterfvSGIS
glPointParameteri
glPointParameteriNV
glPointParameteriv
glPointParameterivNV
glPointSize
glPollInstrumentsSGIX
glPolygonMode
glPolygonOffset
glPolygonOffsetEXT
glPolygonStipple
glPopAttrib
glPopClientAttrib
glPopMatrix
glPopName
glPrioritizeTextures
glPrioritizeTexturesEXT
glProgramEnvParameter4dARB
glProgramEnvParameter4dvARB
glProgramEnvParameter4fARB
glProgramEnvParameter4fvARB
glProgramLocalParameter4dARB
glProgramLocalParameter4dvARB
glProgramLocalParameter4fARB
glProgramLocalParameter4fvARB
glProgramNamedParameter4dNV
glProgramNamedParameter4dvNV
glProgramNamedParameter4fNV
glProgramNamedParameter4fvNV
glProgramParameters4dvNV
glProgramParameters4fvNV
glProgramParameter4dNV
glProgramParameter4dvNV
glProgramParameter4fNV
glProgramParameter4fvNV
glProgramStringARB
glPushAttrib
glPushClientAttrib
glPushMatrix
glPushName
glRasterPos2d
glRasterPos2dv
glRasterPos2f
glRasterPos2fv
glRasterPos2i
glRasterPos2iv
glRasterPos2s
glRasterPos2sv
glRasterPos3d
glRasterPos3dv
glRasterPos3f
glRasterPos3fv
glRasterPos3i
glRasterPos3iv
glRasterPos3s
glRasterPos3sv
glRasterPos4d
glRasterPos4dv
glRasterPos4f
glRasterPos4fv
glRasterPos4i
glRasterPos4iv
glRasterPos4s
glRasterPos4sv
glReadBuffer
glReadInstrumentsSGIX
glReadPixels
glRectd
glRectdv
glRectf
glRectfv
glRecti
glRectiv
glRects
glRectsv
glReferencePlaneSGIX
glRenderMode
glRequestResidentProgramsNV
glResetHistogram
glResetHistogramEXT
glResetMinmax
glResetMinmaxEXT
glResizeBuffersMESA
glRotated
glRotatef
glSampleCoverage
glSampleCoverageARB
glSampleMaskEXT
glSampleMaskSGIS
glSamplePatternEXT
glSamplePatternSGIS
glScaled
glScalef
glScissor
glSecondaryColorPointer
glSecondaryColorPointerEXT
glSecondaryColor3b
glSecondaryColor3bEXT
glSecondaryColor3bv
glSecondaryColor3bvEXT
glSecondaryColor3d
glSecondaryColor3dEXT
glSecondaryColor3dv
glSecondaryColor3dvEXT
glSecondaryColor3f
glSecondaryColor3fEXT
glSecondaryColor3fv
glSecondaryColor3fvEXT
glSecondaryColor3i
glSecondaryColor3iEXT
glSecondaryColor3iv
glSecondaryColor3ivEXT
glSecondaryColor3s
glSecondaryColor3sEXT
glSecondaryColor3sv
glSecondaryColor3svEXT
glSecondaryColor3ub
glSecondaryColor3ubEXT
glSecondaryColor3ubv
glSecondaryColor3ubvEXT
glSecondaryColor3ui
glSecondaryColor3uiEXT
glSecondaryColor3uiv
glSecondaryColor3uivEXT
glSecondaryColor3us
glSecondaryColor3usEXT
glSecondaryColor3usv
glSecondaryColor3usvEXT
glSelectBuffer
glSeparableFilter2D
glSeparableFilter2DEXT
glSetFenceNV
glShadeModel
glSharpenTexFuncSGIS
glSpriteParameterfSGIX
glSpriteParameterfvSGIX
glSpriteParameteriSGIX
glSpriteParameterivSGIX
glStartInstrumentsSGIX
glStencilFunc
glStencilMask
glStencilOp
glStopInstrumentsSGIX
glTagSampleBufferSGIX
glTbufferMask3DFX
glTestFenceNV
glTexCoordPointer
glTexCoordPointerEXT
glTexCoord1d
glTexCoord1dv
glTexCoord1f
glTexCoord1fv
glTexCoord1i
glTexCoord1iv
glTexCoord1s
glTexCoord1sv
glTexCoord2d
glTexCoord2dv
glTexCoord2f
glTexCoord2fv
glTexCoord2i
glTexCoord2iv
glTexCoord2s
glTexCoord2sv
glTexCoord3d
glTexCoord3dv
glTexCoord3f
glTexCoord3fv
glTexCoord3i
glTexCoord3iv
glTexCoord3s
glTexCoord3sv
glTexCoord4d
glTexCoord4dv
glTexCoord4f
glTexCoord4fv
glTexCoord4i
glTexCoord4iv
glTexCoord4s
glTexCoord4sv
glTexEnvf
glTexEnvfv
glTexEnvi
glTexEnviv
glTexFilterFuncSGIS
glTexGend
glTexGendv
glTexGenf
glTexGenfv
glTexGeni
glTexGeniv
glTexImage1D
glTexImage2D
glTexImage3D
glTexImage3DEXT
glTexImage4DSGIS
glTexParameterf
glTexParameterfv
glTexParameteri
glTexParameteriv
glTexSubImage1D
glTexSubImage1DEXT
glTexSubImage2D
glTexSubImage2DEXT
glTexSubImage3D
glTexSubImage3DEXT
glTexSubImage4DSGIS
glTrackMatrixNV
glTranslated
glTranslatef
glUnlockArraysEXT
glUnmapBufferARB
glVertexArrayRangeNV
glVertexAttribPointerARB
glVertexAttribPointerNV
glVertexAttribs1dvNV
glVertexAttribs1fvNV
glVertexAttribs1svNV
glVertexAttribs2dvNV
glVertexAttribs2fvNV
glVertexAttribs2svNV
glVertexAttribs3dvNV
glVertexAttribs3fvNV
glVertexAttribs3svNV
glVertexAttribs4dvNV
glVertexAttribs4fvNV
glVertexAttribs4svNV
glVertexAttribs4ubvNV
glVertexAttrib1dARB
glVertexAttrib1dNV
glVertexAttrib1dvARB
glVertexAttrib1dvNV
glVertexAttrib1fARB
glVertexAttrib1fNV
glVertexAttrib1fvARB
glVertexAttrib1fvNV
glVertexAttrib1sARB
glVertexAttrib1sNV
glVertexAttrib1svARB
glVertexAttrib1svNV
glVertexAttrib2dARB
glVertexAttrib2dNV
glVertexAttrib2dvARB
glVertexAttrib2dvNV
glVertexAttrib2fARB
glVertexAttrib2fNV
glVertexAttrib2fvARB
glVertexAttrib2fvNV
glVertexAttrib2sARB
glVertexAttrib2sNV
glVertexAttrib2svARB
glVertexAttrib2svNV
glVertexAttrib3dARB
glVertexAttrib3dNV
glVertexAttrib3dvARB
glVertexAttrib3dvNV
glVertexAttrib3fARB
glVertexAttrib3fNV
glVertexAttrib3fvARB
glVertexAttrib3fvNV
glVertexAttrib3sARB
glVertexAttrib3sNV
glVertexAttrib3svARB
glVertexAttrib3svNV
glVertexAttrib4bvARB
glVertexAttrib4dARB
glVertexAttrib4dNV
glVertexAttrib4dvARB
glVertexAttrib4dvNV
glVertexAttrib4fARB
glVertexAttrib4fNV
glVertexAttrib4fvARB
glVertexAttrib4fvNV
glVertexAttrib4ivARB
glVertexAttrib4NbvARB
glVertexAttrib4NivARB
glVertexAttrib4NsvARB
glVertexAttrib4NubARB
glVertexAttrib4NubvARB
glVertexAttrib4NuivARB
glVertexAttrib4NusvARB
glVertexAttrib4sARB
glVertexAttrib4sNV
glVertexAttrib4svARB
glVertexAttrib4svNV
glVertexAttrib4ubNV
glVertexAttrib4ubvARB
glVertexAttrib4ubvNV
glVertexAttrib4uivARB
glVertexAttrib4usvARB
glVertexPointer
glVertexPointerEXT
glVertexWeightfEXT
glVertexWeightfvEXT
glVertexWeightPointerEXT
glVertex2d
glVertex2dv
glVertex2f
glVertex2fv
glVertex2i
glVertex2iv
glVertex2s
glVertex2sv
glVertex3d
glVertex3dv
glVertex3f
glVertex3fv
glVertex3i
glVertex3iv
glVertex3s
glVertex3sv
glVertex4d
glVertex4dv
glVertex4f
glVertex4fv
glVertex4i
glVertex4iv
glVertex4s
glVertex4sv
glViewport
glWindowPos2d
glWindowPos2dARB
glWindowPos2dMESA
glWindowPos2dv
glWindowPos2dvARB
glWindowPos2dvMESA
glWindowPos2f
glWindowPos2fARB
glWindowPos2fMESA
glWindowPos2fv
glWindowPos2fvARB
glWindowPos2fvMESA
glWindowPos2i
glWindowPos2iARB
glWindowPos2iMESA
glWindowPos2iv
glWindowPos2ivARB
glWindowPos2ivMESA
glWindowPos2s
glWindowPos2sARB
glWindowPos2sMESA
glWindowPos2sv
glWindowPos2svARB
glWindowPos2svMESA
glWindowPos3d
glWindowPos3dARB
glWindowPos3dMESA
glWindowPos3dv
glWindowPos3dvARB
glWindowPos3dvMESA
glWindowPos3f
glWindowPos3fARB
glWindowPos3fMESA
glWindowPos3fv
glWindowPos3fvARB
glWindowPos3fvMESA
glWindowPos3i
glWindowPos3iARB
glWindowPos3iMESA
glWindowPos3iv
glWindowPos3ivARB
glWindowPos3ivMESA
glWindowPos3s
glWindowPos3sARB
glWindowPos3sMESA
glWindowPos3sv
glWindowPos3svARB
glWindowPos3svMESA
glWindowPos4dMESA
glWindowPos4dvMESA
glWindowPos4fMESA
glWindowPos4fvMESA
glWindowPos4iMESA
glWindowPos4ivMESA
glWindowPos4sMESA
glWindowPos4svMESA
fxCloseHardware
;fxGetScreenGeometry
fxMesaCreateBestContext
fxMesaCreateContext
fxMesaDestroyContext
fxMesaGetCurrentContext
fxMesaMakeCurrent
fxMesaSelectCurrentBoard
;fxMesaSetNearFar
fxMesaSwapBuffers
fxMesaUpdateScreenSize
wglChoosePixelFormat
wglCopyContext
wglCreateContext
wglCreateLayerContext
wglDeleteContext
wglDescribeLayerPlane
wglDescribePixelFormat
wglGetCurrentContext
wglGetCurrentDC
wglGetDefaultProcAddress
wglGetLayerPaletteEntries
wglGetPixelFormat
wglGetProcAddress
wglMakeCurrent
wglRealizeLayerPalette
wglSetLayerPaletteEntries
wglSetPixelFormat
wglShareLists
wglSwapBuffers
wglSwapLayerBuffers
wglUseFontBitmapsA
wglUseFontBitmapsW
wglUseFontOutlinesA
wglUseFontOutlinesW
ChoosePixelFormat
DescribePixelFormat
GetPixelFormat
SetPixelFormat
SwapBuffers
DrvCopyContext
DrvCreateContext
DrvCreateLayerContext
DrvDeleteContext
DrvDescribeLayerPlane
DrvDescribePixelFormat
DrvGetLayerPaletteEntries
DrvGetProcAddress
DrvReleaseContext
DrvRealizeLayerPalette
DrvSetContext
DrvSetLayerPaletteEntries
DrvSetPixelFormat
DrvShareLists
DrvSwapBuffers
DrvSwapLayerBuffers
DrvValidateVersion
File diff suppressed because it is too large Load Diff
@@ -1,29 +0,0 @@
/* Values for wmesa->pixelformat: */
#define PF_8A8B8G8R 3 /* 32-bit TrueColor: 8-A, 8-B, 8-G, 8-R */
#define PF_8R8G8B 4 /* 32-bit TrueColor: 8-R, 8-G, 8-B */
#define PF_5R6G5B 5 /* 16-bit TrueColor: 5-R, 6-G, 5-B bits */
#define PF_DITHER8 6 /* Dithered RGB using a lookup table */
#define PF_LOOKUP 7 /* Undithered RGB using a lookup table */
#define PF_GRAYSCALE 10 /* Grayscale or StaticGray */
#define PF_BADFORMAT 11
#define PF_INDEX8 12
#define BGR8(r,g,b) (unsigned)(((BYTE)((b & 0xc0) | ((g & 0xe0)>>2) | \
((r & 0xe0)>>5))))
/* Windows uses 5,5,5 for 16-bit */
#define BGR16(r,g,b) ( (((unsigned short)b ) >> 3) | \
(((unsigned short)g & 0xf8) << 2) | \
(((unsigned short)r & 0xf8) << 7) )
#define BGR24(r,g,b) (unsigned long)((DWORD)(((BYTE)(b)| \
((WORD)((BYTE)(g))<<8))| \
(((DWORD)(BYTE)(r))<<16)))
#define BGR32(r,g,b) (unsigned long)((DWORD)(((BYTE)(b)| \
((WORD)((BYTE)(g))<<8))| \
(((DWORD)(BYTE)(r))<<16)))
File diff suppressed because it is too large Load Diff
@@ -1,695 +0,0 @@
/* $Id: wgl.c,v 1.9 2005/07/01 15:56:14 kschultz Exp $ */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/*
* File name : wgl.c
* WGL stuff. Added by Oleg Letsinsky, [email protected]
* Some things originated from the 3Dfx WGL functions
*/
/*
* This file contains the implementation of the wgl* functions for
* Mesa on Windows. Since these functions are provided by Windows in
* GDI/OpenGL, we must supply our versions that work with Mesa here.
*/
/* We're essentially building part of GDI here, so define this so that
* we get the right export linkage. */
#define _GDI32_
#include <windows.h>
#include "GL/wmesa.h" /* protos for wmesa* functions */
typedef struct wmesa_context *PWMC;
/*
* Pixel Format Descriptors
*/
/* Extend the PFD to include DB flag */
struct __pixelformat__
{
PIXELFORMATDESCRIPTOR pfd;
GLboolean doubleBuffered;
};
/* These are the PFD's supported by this driver. */
struct __pixelformat__ pfd[] =
{
#if 0
/* Double Buffer, alpha */
{
{
sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|
PFD_GENERIC_FORMAT|PFD_DOUBLEBUFFER|PFD_SWAP_COPY,
PFD_TYPE_RGBA,
24,
8, 0,
8, 8,
8, 16,
8, 24,
0, 0, 0, 0, 0,
16, 8,
0, 0, 0,
0, 0, 0
},
GL_TRUE
},
/* Single Buffer, alpha */
{
{
sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|
PFD_GENERIC_FORMAT,
PFD_TYPE_RGBA,
24,
8, 0,
8, 8,
8, 16,
8, 24,
0, 0, 0, 0, 0,
16, 8,
0, 0, 0,
0, 0, 0
},
GL_FALSE
},
#endif
/* Double Buffer, no alpha */
{
{
sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|
PFD_GENERIC_FORMAT|PFD_DOUBLEBUFFER|PFD_SWAP_COPY,
PFD_TYPE_RGBA,
24,
8, 0,
8, 8,
8, 16,
0, 0,
0, 0, 0, 0, 0,
16, 8,
0, 0, 0,
0, 0, 0
},
GL_TRUE
},
/* Single Buffer, no alpha */
{
{
sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|
PFD_GENERIC_FORMAT,
PFD_TYPE_RGBA,
24,
8, 0,
8, 8,
8, 16,
0, 0,
0, 0, 0, 0, 0,
16, 8,
0, 0, 0,
0, 0, 0
},
GL_FALSE
},
};
int npfd = sizeof(pfd) / sizeof(pfd[0]);
/*
* Contexts
*/
typedef struct {
WMesaContext ctx;
HDC hdc;
} MesaWglCtx;
#define MESAWGL_CTX_MAX_COUNT 20
static MesaWglCtx wgl_ctx[MESAWGL_CTX_MAX_COUNT];
static unsigned ctx_count = 0;
static int ctx_current = -1;
static unsigned curPFD = 0;
WINGDIAPI HGLRC GLAPIENTRY wglCreateContext(HDC hdc)
{
HWND hWnd;
int i = 0;
if(!(hWnd = WindowFromDC(hdc))) {
SetLastError(0);
return(NULL);
}
if (!ctx_count) {
for(i=0;i<MESAWGL_CTX_MAX_COUNT;i++) {
wgl_ctx[i].ctx = NULL;
wgl_ctx[i].hdc = NULL;
}
}
for( i = 0; i < MESAWGL_CTX_MAX_COUNT; i++ ) {
if ( wgl_ctx[i].ctx == NULL ) {
wgl_ctx[i].ctx =
WMesaCreateContext(hWnd, NULL, GL_TRUE,
pfd[curPFD-1].doubleBuffered,
pfd[curPFD-1].pfd.cAlphaBits ?
GL_TRUE : GL_FALSE);
if (wgl_ctx[i].ctx == NULL)
break;
wgl_ctx[i].hdc = hdc;
ctx_count++;
return ((HGLRC)wgl_ctx[i].ctx);
}
}
SetLastError(0);
return(NULL);
}
WINGDIAPI BOOL GLAPIENTRY wglDeleteContext(HGLRC hglrc)
{
int i;
for ( i = 0; i < MESAWGL_CTX_MAX_COUNT; i++ ) {
if ( wgl_ctx[i].ctx == (PWMC) hglrc ){
WMesaMakeCurrent((PWMC) hglrc);
WMesaDestroyContext();
wgl_ctx[i].ctx = NULL;
wgl_ctx[i].hdc = NULL;
ctx_count--;
return(TRUE);
}
}
SetLastError(0);
return(FALSE);
}
WINGDIAPI HGLRC GLAPIENTRY wglGetCurrentContext(VOID)
{
if (ctx_current < 0)
return 0;
else
return (HGLRC) wgl_ctx[ctx_current].ctx;
}
WINGDIAPI HDC GLAPIENTRY wglGetCurrentDC(VOID)
{
if (ctx_current < 0)
return 0;
else
return wgl_ctx[ctx_current].hdc;
}
WINGDIAPI BOOL GLAPIENTRY wglMakeCurrent(HDC hdc,HGLRC hglrc)
{
int i;
if (!hdc || !hglrc) {
WMesaMakeCurrent(NULL);
ctx_current = -1;
return TRUE;
}
for ( i = 0; i < MESAWGL_CTX_MAX_COUNT; i++ ) {
if ( wgl_ctx[i].ctx == (PWMC) hglrc ) {
wgl_ctx[i].hdc = hdc;
WMesaMakeCurrent( (WMesaContext) hglrc );
ctx_current = i;
return TRUE;
}
}
return FALSE;
}
WINGDIAPI int GLAPIENTRY wglChoosePixelFormat(HDC hdc,
CONST
PIXELFORMATDESCRIPTOR *ppfd)
{
int i,best = -1,bestdelta = 0x7FFFFFFF,delta;
(void) hdc;
if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
{
SetLastError(0);
return(0);
}
for(i = 0; i < npfd;i++)
{
delta = 0;
if(
(ppfd->dwFlags & PFD_DRAW_TO_WINDOW) &&
!(pfd[i].pfd.dwFlags & PFD_DRAW_TO_WINDOW))
continue;
if(
(ppfd->dwFlags & PFD_DRAW_TO_BITMAP) &&
!(pfd[i].pfd.dwFlags & PFD_DRAW_TO_BITMAP))
continue;
if(
(ppfd->dwFlags & PFD_SUPPORT_GDI) &&
!(pfd[i].pfd.dwFlags & PFD_SUPPORT_GDI))
continue;
if(
(ppfd->dwFlags & PFD_SUPPORT_OPENGL) &&
!(pfd[i].pfd.dwFlags & PFD_SUPPORT_OPENGL))
continue;
if(
!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) &&
((ppfd->dwFlags & PFD_DOUBLEBUFFER) !=
(pfd[i].pfd.dwFlags & PFD_DOUBLEBUFFER)))
continue;
if(
!(ppfd->dwFlags & PFD_STEREO_DONTCARE) &&
((ppfd->dwFlags & PFD_STEREO) !=
(pfd[i].pfd.dwFlags & PFD_STEREO)))
continue;
if(ppfd->iPixelType != pfd[i].pfd.iPixelType)
delta++;
if(ppfd->cAlphaBits != pfd[i].pfd.cAlphaBits)
delta++;
if(delta < bestdelta)
{
best = i + 1;
bestdelta = delta;
if(bestdelta == 0)
break;
}
}
if(best == -1)
{
SetLastError(0);
return(0);
}
return(best);
}
WINGDIAPI int GLAPIENTRY wglDescribePixelFormat(HDC hdc,
int iPixelFormat,
UINT nBytes,
LPPIXELFORMATDESCRIPTOR ppfd)
{
(void) hdc;
if(ppfd == NULL)
return(npfd);
if(iPixelFormat < 1 || iPixelFormat > npfd ||
nBytes != sizeof(PIXELFORMATDESCRIPTOR))
{
SetLastError(0);
return(0);
}
*ppfd = pfd[iPixelFormat - 1].pfd;
return(npfd);
}
WINGDIAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc)
{
PROC p = (PROC) _glapi_get_proc_address((const char *) lpszProc);
if (p)
return p;
SetLastError(0);
return(NULL);
}
WINGDIAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc)
{
(void) hdc;
if(curPFD == 0) {
SetLastError(0);
return(0);
}
return(curPFD);
}
WINGDIAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
PIXELFORMATDESCRIPTOR *ppfd)
{
(void) hdc;
if(iPixelFormat < 1 || iPixelFormat > npfd ||
ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR)) {
SetLastError(0);
return(FALSE);
}
curPFD = iPixelFormat;
return(TRUE);
}
WINGDIAPI BOOL GLAPIENTRY wglSwapBuffers(HDC hdc)
{
(void) hdc;
if (ctx_current < 0)
return FALSE;
if(wgl_ctx[ctx_current].ctx == NULL) {
SetLastError(0);
return(FALSE);
}
WMesaSwapBuffers();
return(TRUE);
}
static FIXED FixedFromDouble(double d)
{
long l = (long) (d * 65536L);
return *(FIXED *) (void *) &l;
}
/*
** This is cribbed from FX/fxwgl.c, and seems to implement support
** for bitmap fonts where the wglUseFontBitmapsA() code implements
** support for outline fonts. In combination they hopefully give
** fairly generic support for fonts.
*/
static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
DWORD numChars, DWORD listBase)
{
#define VERIFY(a) a
TEXTMETRIC metric;
BITMAPINFO *dibInfo;
HDC bitDevice;
COLORREF tempColor;
int i;
VERIFY(GetTextMetrics(fontDevice, &metric));
dibInfo = (BITMAPINFO *) calloc(sizeof(BITMAPINFO) + sizeof(RGBQUAD), 1);
dibInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
dibInfo->bmiHeader.biPlanes = 1;
dibInfo->bmiHeader.biBitCount = 1;
dibInfo->bmiHeader.biCompression = BI_RGB;
bitDevice = CreateCompatibleDC(fontDevice);
// Swap fore and back colors so the bitmap has the right polarity
tempColor = GetBkColor(bitDevice);
SetBkColor(bitDevice, GetTextColor(bitDevice));
SetTextColor(bitDevice, tempColor);
// Place chars based on base line
VERIFY(SetTextAlign(bitDevice, TA_BASELINE) != GDI_ERROR ? 1 : 0);
for(i = 0; i < (int)numChars; i++) {
SIZE size;
char curChar;
int charWidth,charHeight,bmapWidth,bmapHeight,numBytes,res;
HBITMAP bitObject;
HGDIOBJ origBmap;
unsigned char *bmap;
curChar = i + firstChar;
// Find how high/wide this character is
VERIFY(GetTextExtentPoint32(bitDevice, &curChar, 1, &size));
// Create the output bitmap
charWidth = size.cx;
charHeight = size.cy;
// Round up to the next multiple of 32 bits
bmapWidth = ((charWidth + 31) / 32) * 32;
bmapHeight = charHeight;
bitObject = CreateCompatibleBitmap(bitDevice,
bmapWidth,
bmapHeight);
//VERIFY(bitObject);
// Assign the output bitmap to the device
origBmap = SelectObject(bitDevice, bitObject);
(void) VERIFY(origBmap);
VERIFY( PatBlt( bitDevice, 0, 0, bmapWidth, bmapHeight,BLACKNESS ) );
// Use our source font on the device
VERIFY(SelectObject(bitDevice, GetCurrentObject(fontDevice,OBJ_FONT)));
// Draw the character
VERIFY(TextOut(bitDevice, 0, metric.tmAscent, &curChar, 1));
// Unselect our bmap object
VERIFY(SelectObject(bitDevice, origBmap));
// Convert the display dependant representation to a 1 bit deep DIB
numBytes = (bmapWidth * bmapHeight) / 8;
bmap = malloc(numBytes);
dibInfo->bmiHeader.biWidth = bmapWidth;
dibInfo->bmiHeader.biHeight = bmapHeight;
res = GetDIBits(bitDevice, bitObject, 0, bmapHeight, bmap,
dibInfo,
DIB_RGB_COLORS);
//VERIFY(res);
// Create the GL object
glNewList(i + listBase, GL_COMPILE);
glBitmap(bmapWidth, bmapHeight, 0.0, metric.tmDescent,
charWidth, 0.0,
bmap);
glEndList();
// CheckGL();
// Destroy the bmap object
DeleteObject(bitObject);
// Deallocate the bitmap data
free(bmap);
}
// Destroy the DC
VERIFY(DeleteDC(bitDevice));
free(dibInfo);
return TRUE;
#undef VERIFY
}
WINGDIAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
DWORD count, DWORD listBase)
{
int i;
GLuint font_list;
DWORD size;
GLYPHMETRICS gm;
HANDLE hBits;
LPSTR lpBits;
MAT2 mat;
int success = TRUE;
if (count == 0)
return FALSE;
font_list = listBase;
mat.eM11 = FixedFromDouble(1);
mat.eM12 = FixedFromDouble(0);
mat.eM21 = FixedFromDouble(0);
mat.eM22 = FixedFromDouble(-1);
memset(&gm,0,sizeof(gm));
/*
** If we can't get the glyph outline, it may be because this is a fixed
** font. Try processing it that way.
*/
if( GetGlyphOutline(hdc, first, GGO_BITMAP, &gm, 0, NULL, &mat)
== GDI_ERROR ) {
return wglUseFontBitmaps_FX( hdc, first, count, listBase );
}
/*
** Otherwise process all desired characters.
*/
for (i = 0; i < (int)count; i++) {
DWORD err;
glNewList( font_list+i, GL_COMPILE );
/* allocate space for the bitmap/outline */
size = GetGlyphOutline(hdc, first + i, GGO_BITMAP,
&gm, 0, NULL, &mat);
if (size == GDI_ERROR) {
glEndList( );
err = GetLastError();
success = FALSE;
continue;
}
hBits = GlobalAlloc(GHND, size+1);
lpBits = GlobalLock(hBits);
err =
GetGlyphOutline(hdc, /* handle to device context */
first + i, /* character to query */
GGO_BITMAP, /* format of data to return */
&gm, /* ptr to structure for metrics*/
size, /* size of buffer for data */
lpBits, /* pointer to buffer for data */
&mat /* pointer to transformation */
/* matrix structure */
);
if (err == GDI_ERROR) {
GlobalUnlock(hBits);
GlobalFree(hBits);
glEndList( );
err = GetLastError();
success = FALSE;
continue;
}
glBitmap(gm.gmBlackBoxX,gm.gmBlackBoxY,
-gm.gmptGlyphOrigin.x,
gm.gmptGlyphOrigin.y,
gm.gmCellIncX,gm.gmCellIncY,
(const GLubyte * )lpBits);
GlobalUnlock(hBits);
GlobalFree(hBits);
glEndList( );
}
return success;
}
/* NOT IMPLEMENTED YET */
WINGDIAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc,
HGLRC hglrcDst,
UINT mask)
{
(void) hglrcSrc; (void) hglrcDst; (void) mask;
return(FALSE);
}
WINGDIAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,
int iLayerPlane)
{
(void) hdc; (void) iLayerPlane;
SetLastError(0);
return(NULL);
}
WINGDIAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,
HGLRC hglrc2)
{
(void) hglrc1; (void) hglrc2;
return(TRUE);
}
WINGDIAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc,
DWORD first,
DWORD count,
DWORD listBase)
{
(void) hdc; (void) first; (void) count; (void) listBase;
return FALSE;
}
WINGDIAPI BOOL GLAPIENTRY wglUseFontOutlinesA(HDC hdc,
DWORD first,
DWORD count,
DWORD listBase,
FLOAT deviation,
FLOAT extrusion,
int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
(void) hdc; (void) first; (void) count;
(void) listBase; (void) deviation; (void) extrusion; (void) format;
(void) lpgmf;
SetLastError(0);
return(FALSE);
}
WINGDIAPI BOOL GLAPIENTRY wglUseFontOutlinesW(HDC hdc,
DWORD first,
DWORD count,
DWORD listBase,
FLOAT deviation,
FLOAT extrusion,
int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
(void) hdc; (void) first; (void) count;
(void) listBase; (void) deviation; (void) extrusion; (void) format;
(void) lpgmf;
SetLastError(0);
return(FALSE);
}
WINGDIAPI BOOL GLAPIENTRY wglDescribeLayerPlane(HDC hdc,
int iPixelFormat,
int iLayerPlane,
UINT nBytes,
LPLAYERPLANEDESCRIPTOR plpd)
{
(void) hdc; (void) iPixelFormat; (void) iLayerPlane;
(void) nBytes; (void) plpd;
SetLastError(0);
return(FALSE);
}
WINGDIAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC hdc,
int iLayerPlane,
int iStart,
int cEntries,
CONST COLORREF *pcr)
{
(void) hdc; (void) iLayerPlane; (void) iStart;
(void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
WINGDIAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC hdc,
int iLayerPlane,
int iStart,
int cEntries,
COLORREF *pcr)
{
(void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
WINGDIAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc,
int iLayerPlane,
BOOL bRealize)
{
(void) hdc; (void) iLayerPlane; (void) bRealize;
SetLastError(0);
return(FALSE);
}
WINGDIAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc,
UINT fuPlanes)
{
(void) hdc; (void) fuPlanes;
SetLastError(0);
return(FALSE);
}
File diff suppressed because it is too large Load Diff
@@ -1,34 +0,0 @@
#include "context.h"
typedef struct _dibSection{
HDC hDC;
HANDLE hFileMap;
BOOL fFlushed;
LPVOID base;
}WMDIBSECTION, *PWMDIBSECTION;
typedef struct wmesa_context{
GLcontext *gl_ctx; /* The core GL/Mesa context */
GLvisual *gl_visual; /* Describes the buffers */
GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers*/
HWND Window;
HDC hDC;
COLORREF clearColorRef;
HPEN clearPen;
HBRUSH clearBrush;
GLuint width;
GLuint height;
GLuint ScanWidth;
GLboolean db_flag;
WMDIBSECTION dib;
BITMAPINFO bmi;
HBITMAP hbmDIB;
HBITMAP hOldBitmap;
PBYTE pbPixels;
BYTE cColorBits;
int pixelformat;
} *PWMC;
@@ -1,192 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Logging functions.
*
****************************************************************************/
#define STRICT
#include <windows.h>
#include "ddlog.h"
#include "gld_driver.h"
// ***********************************************************************
static char ddlogbuf[256];
static FILE* fpDDLog = NULL; // Log file pointer
static char szDDLogName[_MAX_PATH] = {"gldirect.log"}; // Filename of the log
static DDLOG_loggingMethodType ddlogLoggingMethod = DDLOG_NONE; // Default to No Logging
static DDLOG_severityType ddlogDebugLevel;
static BOOL bUIWarning = FALSE; // MessageBox warning ?
// ***********************************************************************
void ddlogOpen(
DDLOG_loggingMethodType LoggingMethod,
DDLOG_severityType Severity)
{
if (fpDDLog != NULL) {
// Tried to re-open the log
ddlogMessage(DDLOG_WARN, "Tried to re-open the log file\n");
return;
}
ddlogLoggingMethod = LoggingMethod;
ddlogDebugLevel = Severity;
if (ddlogLoggingMethod == DDLOG_NORMAL) {
fpDDLog = fopen(szDDLogName, "wt");
if (fpDDLog == NULL)
return;
}
ddlogMessage(DDLOG_SYSTEM, "\n");
ddlogMessage(DDLOG_SYSTEM, "-> Logging Started\n");
}
// ***********************************************************************
void ddlogClose()
{
// Determine whether the log is already closed
if (fpDDLog == NULL && ddlogLoggingMethod == DDLOG_NORMAL)
return; // Nothing to do.
ddlogMessage(DDLOG_SYSTEM, "<- Logging Ended\n");
if (ddlogLoggingMethod == DDLOG_NORMAL) {
fclose(fpDDLog);
fpDDLog = NULL;
}
}
// ***********************************************************************
void ddlogMessage(
DDLOG_severityType severity,
LPSTR message)
{
char buf[256];
// Bail if logging is disabled
if (ddlogLoggingMethod == DDLOG_NONE)
return;
if (ddlogLoggingMethod == DDLOG_CRASHPROOF)
fpDDLog = fopen(szDDLogName, "at");
if (fpDDLog == NULL)
return;
if (severity >= ddlogDebugLevel) {
sprintf(buf, "DDLog: (%s) %s", ddlogSeverityMessages[severity], message);
fputs(buf, fpDDLog); // Write string to file
OutputDebugString(buf); // Echo to debugger
}
if (ddlogLoggingMethod == DDLOG_CRASHPROOF) {
fflush(fpDDLog); // Write info to disk
fclose(fpDDLog);
fpDDLog = NULL;
}
// Popup message box if critical error
if (bUIWarning && severity == DDLOG_CRITICAL) {
MessageBox(NULL, buf, "GLDirect", MB_OK | MB_ICONWARNING | MB_TASKMODAL);
}
}
// ***********************************************************************
// Write a string value to the log file
void ddlogError(
DDLOG_severityType severity,
LPSTR message,
HRESULT hResult)
{
#ifdef _USE_GLD3_WGL
char dxErrStr[1024];
_gldDriver.GetDXErrorString(hResult, &dxErrStr[0], sizeof(dxErrStr));
if (FAILED(hResult)) {
sprintf(ddlogbuf, "DDLog: %s %8x:[ %s ]\n", message, hResult, dxErrStr);
} else
sprintf(ddlogbuf, "DDLog: %s\n", message);
#else
if (FAILED(hResult)) {
sprintf(ddlogbuf, "DDLog: %s %8x:[ %s ]\n", message, hResult, DDErrorToString(hResult));
} else
sprintf(ddlogbuf, "DDLog: %s\n", message);
#endif
ddlogMessage(severity, ddlogbuf);
}
// ***********************************************************************
void ddlogPrintf(
DDLOG_severityType severity,
LPSTR message,
...)
{
va_list args;
va_start(args, message);
vsprintf(ddlogbuf, message, args);
va_end(args);
lstrcat(ddlogbuf, "\n");
ddlogMessage(severity, ddlogbuf);
}
// ***********************************************************************
void ddlogWarnOption(
BOOL bWarnOption)
{
bUIWarning = bWarnOption;
}
// ***********************************************************************
void ddlogPathOption(
LPSTR szPath)
{
char szPathName[_MAX_PATH];
strcpy(szPathName, szPath);
strcat(szPathName, "\\");
strcat(szPathName, szDDLogName);
strcpy(szDDLogName, szPathName);
}
// ***********************************************************************
@@ -1,109 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Logging functions.
*
****************************************************************************/
#ifndef __DDLOG_H
#define __DDLOG_H
#include <stdio.h>
#ifndef _USE_GLD3_WGL
#include "dderrstr.h" // ddraw/d3d error string
#endif
/*---------------------- Macros and type definitions ----------------------*/
typedef enum {
DDLOG_NONE = 0, // No log output
DDLOG_NORMAL = 1, // Log is kept open
DDLOG_CRASHPROOF = 2, // Log is closed and flushed
DDLOG_METHOD_FORCE_DWORD = 0x7fffffff,
} DDLOG_loggingMethodType;
// Denotes type of message sent to the logging functions
typedef enum {
DDLOG_INFO = 0, // Information only
DDLOG_WARN = 1, // Warning only
DDLOG_ERROR = 2, // Notify user of an error
DDLOG_CRITICAL = 3, // Exceptionally severe error
DDLOG_SYSTEM = 4, // System message. Not an error
// but must always be printed.
DDLOG_SEVERITY_FORCE_DWORD = 0x7fffffff, // Make enum dword
} DDLOG_severityType;
#ifdef _USE_GLD3_WGL
// Synomyms
#define GLDLOG_INFO DDLOG_INFO
#define GLDLOG_WARN DDLOG_WARN
#define GLDLOG_ERROR DDLOG_ERROR
#define GLDLOG_CRITICAL DDLOG_CRITICAL
#define GLDLOG_SYSTEM DDLOG_SYSTEM
#endif
// The message that will be output to the log
static const char *ddlogSeverityMessages[] = {
"INFO",
"WARN",
"ERROR",
"*CRITICAL*",
"System",
};
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
void ddlogOpen(DDLOG_loggingMethodType LoggingMethod, DDLOG_severityType Severity);
void ddlogClose();
void ddlogMessage(DDLOG_severityType severity, LPSTR message);
void ddlogError(DDLOG_severityType severity, LPSTR message, HRESULT hResult);
void ddlogPrintf(DDLOG_severityType severity, LPSTR message, ...);
void ddlogWarnOption(BOOL bWarnOption);
void ddlogPathOption(LPSTR szPath);
#ifdef _USE_GLD3_WGL
// Synomyms
#define gldLogMessage ddlogMessage
#define gldLogError ddlogError
#define gldLogPrintf ddlogPrintf
#endif
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
@@ -1,281 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: OpenGL context handling.
*
****************************************************************************/
#ifndef __DGLCONTEXT_H
#define __DGLCONTEXT_H
// Disable compiler complaints about DLL linkage
#pragma warning (disable:4273)
// Macros to control compilation
#ifndef STRICT
#define STRICT
#endif // STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <GL\gl.h>
#ifdef _USE_GLD3_WGL
#include "dglmacros.h"
#include "dglglobals.h"
#include "pixpack.h"
#include "ddlog.h"
#include "dglpf.h"
#include "context.h" // Mesa context
#else
#include <ddraw.h>
#include <d3d.h>
#include "dglmacros.h"
#include "dglglobals.h"
#include "pixpack.h"
#include "ddlog.h"
#include "dglpf.h"
#include "d3dvertex.h"
#include "DirectGL.h"
#include "context.h" // Mesa context
#include "vb.h" // Mesa vertex buffer
#endif // _USE_GLD3_WGL
/*---------------------- Macros and type definitions ----------------------*/
// TODO: Use a list instead of this constant!
#define DGL_MAX_CONTEXTS 32
// Structure for describing an OpenGL context
#ifdef _USE_GLD3_WGL
typedef struct {
BOOL bHasBeenCurrent;
DGL_pixelFormat *lpPF;
// Pointer to private driver data (this also contains the drawable).
void *glPriv;
// Mesa vars:
GLcontext *glCtx; // The core Mesa context
GLvisual *glVis; // Describes the color buffer
GLframebuffer *glBuffer; // Ancillary buffers
GLuint ClearIndex;
GLuint CurrentIndex;
GLubyte ClearColor[4];
GLubyte CurrentColor[4];
BOOL EmulateSingle; // Emulate single-buffering
BOOL bDoubleBuffer;
BOOL bDepthBuffer;
// Shared driver vars:
BOOL bAllocated;
BOOL bFullscreen; // Is this a fullscreen context?
BOOL bSceneStarted; // Has a lpDev->BeginScene been issued?
BOOL bCanRender; // Flag: states whether rendering is OK
BOOL bFrameStarted; // Has frame update started at all?
BOOL bStencil; // TRUE if this context has stencil
BOOL bGDIEraseBkgnd; // GDI Erase Background command
// Window information
HWND hWnd; // Window handle
HDC hDC; // Windows' Device Context of the window
DWORD dwWidth; // Window width
DWORD dwHeight; // Window height
DWORD dwBPP; // Window bits-per-pixel;
RECT rcScreenRect; // Screen rectangle
DWORD dwModeWidth; // Display mode width
DWORD dwModeHeight; // Display mode height
float dvClipX;
float dvClipY;
LONG lpfnWndProc; // window message handler function
} DGL_ctx;
#define GLD_context DGL_ctx
#define GLD_GET_CONTEXT(c) (GLD_context*)(c)->DriverCtx
#else // _USE_GLD3_WGL
typedef struct {
BOOL bHasBeenCurrent;
DGL_pixelFormat *lpPF;
//
// Mesa context vars:
//
GLcontext *glCtx; // The core Mesa context
GLvisual *glVis; // Describes the color buffer
GLframebuffer *glBuffer; // Ancillary buffers
GLuint ClearIndex;
GLuint CurrentIndex;
GLubyte ClearColor[4];
GLubyte CurrentColor[4];
BOOL EmulateSingle; // Emulate single-buffering
BOOL bDoubleBuffer;
BOOL bDepthBuffer;
int iZBufferPF; // Index of Zbuffer pixel format
// Vertex buffer: one-to-one correlation with Mesa's vertex buffer.
// This will be filled by our setup function (see d3dvsetup.c)
DGL_TLvertex gWin[VB_SIZE]; // Transformed and lit vertices
// DGL_Lvertex gObj[VB_SIZE]; // Lit vertices in object coordinates.
// Indices for DrawIndexedPrimitive.
// Clipped quads are drawn seperately, so use VB_SIZE.
// 6 indices are needed to make 2 triangles for each possible quad
// WORD wIndices[(VB_SIZE / 4) * 6];
WORD wIndices[32768];
//
// Device driver vars:
//
BOOL bAllocated;
BOOL bFullscreen; // Is this a fullscreen context?
BOOL bSceneStarted; // Has a lpDev->BeginScene been issued?
BOOL bCanRender; // Flag: states whether rendering is OK
BOOL bFrameStarted; // Has frame update started at all?
// DirectX COM interfaces, postfixed with the interface number
IDirectDraw *lpDD1;
IDirectDraw4 *lpDD4;
IDirect3D3 *lpD3D3;
IDirect3DDevice3 *lpDev3;
IDirect3DViewport3 *lpViewport3;
IDirectDrawSurface4 *lpFront4;
IDirectDrawSurface4 *lpBack4;
IDirectDrawSurface4 *lpDepth4;
// Vertex buffers
BOOL bD3DPipeline; // True if using D3D geometry pipeline
IDirect3DVertexBuffer *m_vbuf; // Unprocessed vertices
IDirect3DVertexBuffer *m_pvbuf; // Processed vertices ready to be rendered
D3DTEXTUREOP ColorOp[MAX_TEXTURE_UNITS]; // Used for re-enabling texturing
D3DTEXTUREOP AlphaOp[MAX_TEXTURE_UNITS]; // Used for re-enabling texturing
struct gl_texture_object *tObj[MAX_TEXTURE_UNITS];
DDCAPS ddCaps; // DirectDraw caps
D3DDEVICEDESC D3DDevDesc; // Direct3D Device description
DDPIXELFORMAT ddpfRender; // Pixel format of the render buffer
DDPIXELFORMAT ddpfDepth; // Pixel format of the depth buffer
BOOL bStencil; // TRUE is this context has stencil
PX_packFunc fnPackFunc; // Pixel packing function for SW
PX_unpackFunc fnUnpackFunc; // Pixel unpacking function for SW
PX_packSpanFunc fnPackSpanFunc; // Pixel span packer
D3DVIEWPORT2 d3dViewport; // D3D Viewport object
D3DCULL cullmode; // Direct3D cull mode
D3DCOLOR curcolor; // Current color
DWORD dwColorPF; // Current color, in format of target surface
D3DCOLOR d3dClearColor; // Clear color
D3DCOLOR ConstantColor; // For flat shading
DWORD dwClearColorPF; // Clear color, in format of target surface
BOOL bGDIEraseBkgnd; // GDI Erase Background command
// Primitive caches
// DGL_vertex LineCache[DGL_MAX_LINE_VERTS];
// DGL_vertex TriCache[DGL_MAX_TRI_VERTS];
// DWORD dwNextLineVert;
// DWORD dwNextTriVert;
// Window information
HWND hWnd; // Window handle
HDC hDC; // Windows' Device Context of the window
DWORD dwWidth; // Window width
DWORD dwHeight; // Window height
DWORD dwBPP; // Window bits-per-pixel;
RECT rcScreenRect; // Screen rectangle
DWORD dwModeWidth; // Display mode width
DWORD dwModeHeight; // Display mode height
float dvClipX;
float dvClipY;
LONG lpfnWndProc; // window message handler function
// Shared texture palette
IDirectDrawPalette *lpGlobalPalette;
// Usage counters.
// One of these counters will be incremented when we choose
// between hardware and software rendering functions.
// DWORD dwHWUsageCount; // Hardware usage count
// DWORD dwSWUsageCount; // Software usage count
// Texture state flags.
// BOOL m_texturing; // TRUE is texturing
// BOOL m_mtex; // TRUE if multitexture
// BOOL m_texHandleValid; // TRUE if tex state valid
// Renderstate caches to ensure no redundant state changes
DWORD dwRS[256]; // Renderstates
DWORD dwTSS[2][24]; // Texture-stage states
LPDIRECT3DTEXTURE2 lpTex[2]; // Texture (1 per stage)
DWORD dwMaxTextureSize; // Max texture size:
// clamped to 1024.
} DGL_ctx;
#endif // _USE_GLD3_WGL
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
HHOOK hKeyHook;
LRESULT CALLBACK dglKeyProc(int code,WPARAM wParam,LPARAM lParam);
void dglInitContextState();
void dglDeleteContextState();
BOOL dglIsValidContext(HGLRC a);
DGL_ctx* dglGetContextAddress(const HGLRC a);
HDC dglGetCurrentDC(void);
HGLRC dglGetCurrentContext(void);
HGLRC dglCreateContext(HDC a, const DGL_pixelFormat *lpPF);
BOOL dglMakeCurrent(HDC a, HGLRC b);
BOOL dglDeleteContext(HGLRC a);
BOOL dglSwapBuffers(HDC hDC);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,149 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Global variables.
*
****************************************************************************/
#include "dglglobals.h"
// =======================================================================
// Global Variables
// =======================================================================
char szCopyright[] = "Copyright (c) 1998 SciTech Software, Inc.";
char szDllName[] = "Scitech GLDirect";
char szErrorTitle[] = "GLDirect Error";
DGL_globals glb;
// Shared result variable
HRESULT hResult;
// ***********************************************************************
// Patch function for missing function in Mesa
int finite(
double x)
{
return _finite(x);
};
// ***********************************************************************
void dglInitGlobals()
{
// Zero all fields just in case
memset(&glb, 0, sizeof(glb));
// Set the global defaults
glb.bPrimary = FALSE; // Not the primary device
glb.bHardware = FALSE; // Not a hardware device
// glb.bFullscreen = FALSE; // Not running fullscreen
glb.bSquareTextures = FALSE; // Device does not need sq
glb.bPAL8 = FALSE; // Device cannot do 8bit
glb.dwMemoryType = DDSCAPS_SYSTEMMEMORY;
glb.dwRendering = DGL_RENDER_D3D;
glb.bWaitForRetrace = TRUE; // Sync to vertical retrace
glb.bFullscreenBlit = FALSE;
glb.nPixelFormatCount = 0;
glb.lpPF = NULL; // Pixel format list
#ifndef _USE_GLD3_WGL
glb.nZBufferPFCount = 0;
glb.lpZBufferPF = NULL;
glb.nDisplayModeCount = 0;
glb.lpDisplayModes = NULL;
glb.nTextureFormatCount = 0;
glb.lpTextureFormat = NULL;
#endif // _USE_GLD3_WGL
glb.wMaxSimultaneousTextures = 1;
// Enable support for multitexture, if available.
glb.bMultitexture = TRUE;
// Enable support for mipmapping
glb.bUseMipmaps = TRUE;
// Alpha emulation via chroma key
glb.bEmulateAlphaTest = FALSE;
// Use Mesa pipeline always (for compatibility)
glb.bForceMesaPipeline = FALSE;
// Init support for multiple GLRCs
glb.bDirectDraw = FALSE;
glb.bDirectDrawPrimary = FALSE;
glb.bDirect3D = FALSE;
glb.bDirect3DDevice = FALSE;
glb.bDirectDrawStereo = FALSE;
glb.iDirectDrawStereo = 0;
glb.hWndActive = NULL;
// Init DirectX COM interfaces for multiple GLRCs
// glb.lpDD4 = NULL;
// glb.lpPrimary4 = NULL;
// glb.lpBack4 = NULL;
// glb.lpDepth4 = NULL;
// glb.lpGlobalPalette = NULL;
// Init special support options
glb.bMessageBoxWarnings = TRUE;
glb.bDirectDrawPersistant = FALSE;
glb.bPersistantBuffers = FALSE;
// Do not assume single-precision-only FPU (for compatibility)
glb.bFastFPU = FALSE;
// Allow hot-key support
glb.bHotKeySupport = TRUE;
// Default to single-threaded support (for simplicity)
glb.bMultiThreaded = FALSE;
// Use application-specific customizations (for end-user convenience)
glb.bAppCustomizations = TRUE;
#ifdef _USE_GLD3_WGL
// Registry/ini-file settings for GLDirect 3.x
glb.dwAdapter = 0; // Primary DX8 adapter
glb.dwTnL = 1; // MesaSW TnL
glb.dwMultisample = 0; // Multisample Off
glb.dwDriver = 2; // Direct3D HW
// Signal a pixelformat list rebuild
glb.bPixelformatsDirty = TRUE;
#endif
}
// ***********************************************************************
@@ -1,198 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Globals.
*
****************************************************************************/
#ifndef __DGLGLOBALS_H
#define __DGLGLOBALS_H
#include "dglcontext.h"
#include "dglpf.h" // Pixel format
#ifndef _USE_GLD3_WGL
#include "d3dtexture.h"
#endif
/*---------------------- Macros and type definitions ----------------------*/
typedef enum {
DGL_RENDER_MESASW = 0,
DGL_RENDER_D3D = 1,
DGL_RENDER_FORCE_DWORD = 0x7ffffff,
} DGL_renderType;
#ifdef _USE_GLD3_WGL
// Same as DGL_renderType? KeithH
typedef enum {
GLDS_DRIVER_MESA_SW = 0, // Mesa SW rendering
GLDS_DRIVER_REF = 1, // Direct3D Reference Rasteriser
GLDS_DRIVER_HAL = 2, // Direct3D HW rendering
} GLDS_DRIVER;
typedef enum {
GLDS_TNL_DEFAULT = 0, // Choose best TnL method
GLDS_TNL_MESA = 1, // Mesa TnL
GLDS_TNL_D3DSW = 2, // D3D Software TnL
GLDS_TNL_D3DHW = 3, // D3D Hardware TnL
} GLDS_TNL;
typedef enum {
GLDS_MULTISAMPLE_NONE = 0,
GLDS_MULTISAMPLE_FASTEST = 1,
GLDS_MULTISAMPLE_NICEST = 2,
} GLDS_MULTISAMPLE;
#endif
typedef struct {
// Registry settings
char szDDName[MAX_DDDEVICEID_STRING]; // DirectDraw device name
char szD3DName[MAX_DDDEVICEID_STRING]; // Direct3D driver name
BOOL bPrimary; // Is ddraw device the Primary device?
BOOL bHardware; // Is the d3d driver a Hardware driver?
#ifndef _USE_GLD3_WGL
GUID ddGuid; // GUID of the ddraw device
GUID d3dGuid; // GUID of the direct3d driver
#endif // _USE_GLD3_WGL
// BOOL bFullscreen; // Force fullscreen - only useful for primary adaptors.
BOOL bSquareTextures; // Does this driver require square textures?
DWORD dwRendering; // Type of rendering required
BOOL bWaitForRetrace; // Sync to vertical retrace
BOOL bFullscreenBlit; // Use Blt instead of Flip in fullscreen modes
// Multitexture
BOOL bMultitexture;
BOOL bUseMipmaps;
DWORD dwMemoryType; // Sysmem or Vidmem
// Global palette
BOOL bPAL8;
DDPIXELFORMAT ddpfPAL8;
// Multitexture
WORD wMaxSimultaneousTextures;
// Win32 internals
BOOL bAppActive; // Keep track of Alt-Tab
LONG lpfnWndProc; // WndProc of calling app
// Pixel Format Descriptior list.
int nPixelFormatCount;
DGL_pixelFormat *lpPF;
#ifndef _USE_GLD3_WGL
// ZBuffer pixel formats
int nZBufferPFCount; // Count of Zbuffer pixel formats
DDPIXELFORMAT *lpZBufferPF; // ZBuffer pixel formats
// Display modes (for secondary devices)
int nDisplayModeCount;
DDSURFACEDESC2 *lpDisplayModes;
// Texture pixel formats
int nTextureFormatCount;
DGL_textureFormat *lpTextureFormat;
#endif // _USE_GLD3_WGL
// Alpha emulation via chroma key
BOOL bEmulateAlphaTest;
// Geom pipeline override.
// If this is set TRUE then the D3D pipeline will never be used,
// and the Mesa pipline will always be used.
BOOL bForceMesaPipeline;
#ifdef _USE_GLD3_WGL
BOOL bPixelformatsDirty; // Signal a list rebuild
#endif
// Additional globals to support multiple GL rendering contexts, GLRCs
BOOL bDirectDraw; // DirectDraw interface exists ?
BOOL bDirectDrawPrimary; // DirectDraw primary surface exists ?
BOOL bDirect3D; // Direct3D interface exists ?
BOOL bDirect3DDevice; // Direct3D device exists ?
BOOL bDirectDrawStereo; // DirectDraw Stereo driver started ?
int iDirectDrawStereo; // DirectDraw Stereo driver reference count
HWND hWndActive; // copy of active window
// Copies of DirectX COM interfaces for re-referencing across multiple GLRCs
// IDirectDraw4 *lpDD4; // copy of DirectDraw interface
// IDirectDrawSurface4 *lpPrimary4; // copy of DirectDraw primary surface
// IDirectDrawSurface4 *lpBack4;
// IDirectDrawSurface4 *lpDepth4;
// IDirectDrawPalette *lpGlobalPalette;
// Aids for heavy-duty MFC-windowed OGL apps, like AutoCAD
BOOL bMessageBoxWarnings; // popup message box warning
BOOL bDirectDrawPersistant; // DirectDraw is persisitant
BOOL bPersistantBuffers; // DirectDraw buffers persisitant
// FPU setup option for CAD precision (AutoCAD) vs GAME speed (Quake)
BOOL bFastFPU; // single-precision-only FPU ?
// Hot-Key support, like for real-time stereo parallax adjustments
BOOL bHotKeySupport; // hot-key support ?
// Multi-threaded support, for apps like 3DStudio
BOOL bMultiThreaded; // multi-threaded ?
// Detect and use app-specific customizations for apps like 3DStudio
BOOL bAppCustomizations; // app customizations ?
#ifdef _USE_GLD3_WGL
DWORD dwAdapter; // Primary DX8 adapter
DWORD dwTnL; // MesaSW TnL
DWORD dwMultisample; // Multisample Off
DWORD dwDriver; // Direct3D HW
void *pDrvPrivate; // Driver-specific data
#endif
} DGL_globals;
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
DGL_globals glb;
void dglInitGlobals();
#ifdef __cplusplus
}
#endif
#endif
@@ -1,91 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Useful generic macros.
*
****************************************************************************/
#ifndef __DGLMACROS_H
#define __DGLMACROS_H
#include <ddraw.h>
// Define the relevant RELEASE macro depending on C or C++
#if !defined(__cplusplus) || defined(CINTERFACE)
// Standard C version
#define RELEASE(x) if (x!=NULL) { x->lpVtbl->Release(x); x=NULL; }
#else
// C++ version
#define RELEASE(x) if (x!=NULL) { x->Release(); x=NULL; }
#endif
// We don't want a message *every* time we call an unsupported function
#define UNSUPPORTED(x) \
{ \
static BOOL bFirstTime = TRUE; \
if (bFirstTime) { \
bFirstTime = FALSE; \
ddlogError(DDLOG_WARN, (x), DDERR_CURRENTLYNOTAVAIL); \
} \
}
#define DGL_CHECK_CONTEXT \
if (ctx == NULL) return;
// Don't render if bCanRender is not TRUE.
#define DGL_CHECK_RENDER \
if (!dgl->bCanRender) return;
#if 0
#define TRY(a,b) (a)
#define TRY_ERR(a,b) (a)
#else
// hResult should be defined in the function
// Return codes should be checked via SUCCEDDED and FAILED macros
#define TRY(a,b) \
{ \
if (FAILED(hResult=(a))) \
ddlogError(DDLOG_ERROR, (b), hResult); \
}
// hResult is a global
// The label exit_with_error should be defined within the calling scope
#define TRY_ERR(a,b) \
{ \
if (FAILED(hResult=(a))) { \
ddlogError(DDLOG_ERROR, (b), hResult); \
goto exit_with_error; \
} \
}
#endif // #if 1
#endif
@@ -1,620 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ========================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Pixel Formats.
*
****************************************************************************/
#include "dglpf.h"
#ifdef _USE_GLD3_WGL
#include "gld_driver.h"
#endif
// ***********************************************************************
char szColorDepthWarning[] =
"GLDirect does not support the current desktop\n\
color depth.\n\n\
You may need to change the display resolution to\n\
16 bits per pixel or higher color depth using\n\
the Windows Display Settings control panel\n\
before running this OpenGL application.\n";
// ***********************************************************************
// This pixel format will be used as a template when compiling the list
// of pixel formats supported by the hardware. Many fields will be
// filled in at runtime.
// PFD flag defaults are upgraded to match ChoosePixelFormat() -- DaveM
DGL_pixelFormat pfTemplateHW =
{
{
sizeof(PIXELFORMATDESCRIPTOR), // Size of the data structure
1, // Structure version - should be 1
// Flags:
PFD_DRAW_TO_WINDOW | // The buffer can draw to a window or device surface.
PFD_DRAW_TO_BITMAP | // The buffer can draw to a bitmap. (DaveM)
PFD_SUPPORT_GDI | // The buffer supports GDI drawing. (DaveM)
PFD_SUPPORT_OPENGL | // The buffer supports OpenGL drawing.
PFD_DOUBLEBUFFER | // The buffer is double-buffered.
0, // Placeholder for easy commenting of above flags
PFD_TYPE_RGBA, // Pixel type RGBA.
16, // Total colour bitplanes (excluding alpha bitplanes)
5, 0, // Red bits, shift
5, 5, // Green bits, shift
5, 10, // Blue bits, shift
0, 0, // Alpha bits, shift (destination alpha)
0, // Accumulator bits (total)
0, 0, 0, 0, // Accumulator bits: Red, Green, Blue, Alpha
0, // Depth bits
0, // Stencil bits
0, // Number of auxiliary buffers
0, // Layer type
0, // Specifies the number of overlay and underlay planes.
0, // Layer mask
0, // Specifies the transparent color or index of an underlay plane.
0 // Damage mask
},
-1, // No depth/stencil buffer
};
// ***********************************************************************
// Return the count of the number of bits in a Bit Mask.
int BitCount(
DWORD dw)
{
int i;
if (dw == 0)
return 0; // account for non-RGB mode
for (i=0; dw; dw=dw>>1)
i += (dw & 1);
return i;
}
// ***********************************************************************
DWORD BitShift(
DWORD dwMaskIn)
{
DWORD dwShift, dwMask;
if (dwMaskIn == 0)
return 0; // account for non-RGB mode
for (dwShift=0, dwMask=dwMaskIn; !(dwMask&1); dwShift++, dwMask>>=1);
return dwShift;
}
// ***********************************************************************
BOOL IsValidPFD(int iPFD)
{
DGL_pixelFormat *lpPF;
// Validate license
if (!dglValidate())
return FALSE;
if ((glb.lpPF == NULL) ||
(glb.nPixelFormatCount == 0))
return FALSE;
// Check PFD range
if ( (iPFD < 1) || (iPFD > glb.nPixelFormatCount) ) {
ddlogMessage(DDLOG_ERROR, "PFD out of range\n");
return FALSE; // PFD is invalid
}
// Make a pointer to the pixel format
lpPF = &glb.lpPF[iPFD-1];
// Check size
if (lpPF->pfd.nSize != sizeof(PIXELFORMATDESCRIPTOR)) {
ddlogMessage(DDLOG_ERROR, "Bad PFD size\n");
return FALSE; // PFD is invalid
}
// Check version
if (lpPF->pfd.nVersion != 1) {
ddlogMessage(DDLOG_ERROR, "PFD is not Version 1\n");
return FALSE; // PFD is invalid
}
return TRUE; // PFD is valid
}
// ***********************************************************************
#ifndef _USE_GLD3_WGL
int iEnumCount; // Enumeration count
DWORD dwDisplayBitDepth; // Bit depth of current display mode
// ***********************************************************************
HRESULT WINAPI EnumDisplayModesCallback(
DDSURFACEDESC2* pddsd,
void *pvContext)
{
DWORD dwModeDepth;
DDSURFACEDESC2 *lpDisplayMode;
char buf[32];
// Check parameters
if (pddsd == NULL)
return DDENUMRET_CANCEL;
dwModeDepth = pddsd->ddpfPixelFormat.dwRGBBitCount;
lpDisplayMode = (DDSURFACEDESC2 *)pvContext;
// Check mode for compatability with device.
if (dwModeDepth != dwDisplayBitDepth)
return DDENUMRET_OK;
if (lpDisplayMode != NULL) {
memcpy(&lpDisplayMode[iEnumCount], pddsd, sizeof(DDSURFACEDESC2));
sprintf(buf, TEXT("Mode: %ld x %ld x %ld\n"),
pddsd->dwWidth, pddsd->dwHeight, dwModeDepth);
ddlogMessage(DDLOG_INFO, buf);
}
iEnumCount++;
return DDENUMRET_OK;
}
// ***********************************************************************
HRESULT CALLBACK d3dEnumZBufferFormatsCallback(
DDPIXELFORMAT* pddpf,
VOID* lpZBufferPF )
{
char buf[64];
if(pddpf == NULL)
return D3DENUMRET_CANCEL;
if (pddpf->dwFlags & DDPF_ZBUFFER) {
if (lpZBufferPF == NULL) {
// Pass 1. Merely counting the PF
glb.nZBufferPFCount++;
} else {
// Pass 2. Save the PF
if (pddpf->dwFlags & DDPF_STENCILBUFFER) {
sprintf(buf, " %d: Z=%d S=%d\n",
iEnumCount,
pddpf->dwZBufferBitDepth,
pddpf->dwStencilBitDepth);
} else {
sprintf(buf, " %d: Z=%d S=0\n",
iEnumCount,
pddpf->dwZBufferBitDepth);
}
ddlogMessage(DDLOG_INFO, buf);
memcpy(&glb.lpZBufferPF[iEnumCount++],
pddpf,
sizeof(DDPIXELFORMAT));
}
}
return D3DENUMRET_OK;
}
#endif // _USE_GLD3_WGL
// ***********************************************************************
BOOL IsStencilSupportBroken(LPDIRECTDRAW4 lpDD4)
{
DDDEVICEIDENTIFIER dddi; // DX6 device identifier
BOOL bBroken = FALSE;
// Microsoft really fucked up with the GetDeviceIdentifier function
// on Windows 2000, since it locks up on stock driers on the CD. Updated
// drivers from vendors appear to work, but we can't identify the drivers
// without this function!!! For now we skip these tests on Windows 2000.
if ((GetVersion() & 0x80000000UL) == 0)
return FALSE;
// Obtain device info
if (FAILED(IDirectDraw4_GetDeviceIdentifier(lpDD4, &dddi, 0)))
return FALSE;
// Matrox G400 stencil buffer support does not draw anything in AutoCAD,
// but ordinary Z buffers draw shaded models fine. (DaveM)
if (dddi.dwVendorId == 0x102B) { // Matrox
if (dddi.dwDeviceId == 0x0525) { // G400
bBroken = TRUE;
}
}
return bBroken;
}
// ***********************************************************************
void dglBuildPixelFormatList()
{
int i;
char buf[128];
char cat[8];
DGL_pixelFormat *lpPF;
#ifdef _USE_GLD3_WGL
_gldDriver.BuildPixelformatList();
#else
HRESULT hRes;
IDirectDraw *lpDD1 = NULL;
IDirectDraw4 *lpDD4 = NULL;
IDirect3D3 *lpD3D3 = NULL;
DDSURFACEDESC2 ddsdDisplayMode;
DWORD dwRb, dwGb, dwBb, dwAb; // Bit counts
DWORD dwRs, dwGs, dwBs, dwAs; // Bit shifts
DWORD dwPixelType; // RGB or color index
// Set defaults
glb.nPixelFormatCount = 0;
glb.lpPF = NULL;
glb.nZBufferPFCount = 0;
glb.lpZBufferPF = NULL;
glb.nDisplayModeCount = 0;
glb.lpDisplayModes = NULL;
//
// Examine the hardware for depth and stencil
//
if (glb.bPrimary)
hRes = DirectDrawCreate(NULL, &lpDD1, NULL);
else
hRes = DirectDrawCreate(&glb.ddGuid, &lpDD1, NULL);
if (FAILED(hRes)) {
ddlogError(DDLOG_ERROR, "dglBPFL: DirectDrawCreate failed", hRes);
return;
}
// Query for DX6 IDirectDraw4.
hRes = IDirectDraw_QueryInterface(
lpDD1,
&IID_IDirectDraw4,
(void**)&lpDD4);
if (FAILED(hRes)) {
ddlogError(DDLOG_ERROR, "dglBPFL: QueryInterface (DD4) failed", hRes);
goto clean_up;
}
// Retrieve caps of current display mode
ZeroMemory(&ddsdDisplayMode, sizeof(ddsdDisplayMode));
ddsdDisplayMode.dwSize = sizeof(ddsdDisplayMode);
hRes = IDirectDraw4_GetDisplayMode(lpDD4, &ddsdDisplayMode);
if (FAILED(hRes))
goto clean_up;
dwDisplayBitDepth = ddsdDisplayMode.ddpfPixelFormat.dwRGBBitCount;
dwPixelType = (dwDisplayBitDepth <= 8) ? PFD_TYPE_COLORINDEX : PFD_TYPE_RGBA;
dwRb = BitCount(ddsdDisplayMode.ddpfPixelFormat.dwRBitMask);
dwGb = BitCount(ddsdDisplayMode.ddpfPixelFormat.dwGBitMask);
dwBb = BitCount(ddsdDisplayMode.ddpfPixelFormat.dwBBitMask);
dwRs = BitShift(ddsdDisplayMode.ddpfPixelFormat.dwRBitMask);
dwGs = BitShift(ddsdDisplayMode.ddpfPixelFormat.dwGBitMask);
dwBs = BitShift(ddsdDisplayMode.ddpfPixelFormat.dwBBitMask);
if (BitCount(ddsdDisplayMode.ddpfPixelFormat.dwRGBAlphaBitMask)) {
dwAb = BitCount(ddsdDisplayMode.ddpfPixelFormat.dwRGBAlphaBitMask);
dwAs = BitShift(ddsdDisplayMode.ddpfPixelFormat.dwRGBAlphaBitMask);
} else {
dwAb = 0;
dwAs = 0;
}
// Query for available display modes
ddlogMessage(DDLOG_INFO, "\n");
ddlogMessage(DDLOG_INFO, "Display Modes:\n");
// Pass 1: Determine count
iEnumCount = 0;
hRes = IDirectDraw4_EnumDisplayModes(
lpDD4,
0,
NULL,
NULL,
EnumDisplayModesCallback);
if (FAILED(hRes)) {
ddlogError(DDLOG_ERROR, "dglBPFL: EnumDisplayModes failed", hRes);
goto clean_up;
}
if (iEnumCount == 0) {
ddlogMessage(DDLOG_ERROR, "dglBPFL: No display modes found");
goto clean_up;
}
glb.lpDisplayModes = (DDSURFACEDESC2 *)calloc(iEnumCount,
sizeof(DDSURFACEDESC2));
if (glb.lpDisplayModes == NULL) {
ddlogMessage(DDLOG_ERROR, "dglBPFL: DDSURFACEDESC2 calloc failed");
goto clean_up;
}
glb.nDisplayModeCount = iEnumCount;
// Pass 2: Save modes
iEnumCount = 0;
hRes = IDirectDraw4_EnumDisplayModes(
lpDD4,
0,
NULL,
(void *)glb.lpDisplayModes,
EnumDisplayModesCallback);
if (FAILED(hRes)) {
ddlogError(DDLOG_ERROR, "dglBPFL: EnumDisplayModes failed", hRes);
goto clean_up;
}
// Query for IDirect3D3 interface
hRes = IDirectDraw4_QueryInterface(
lpDD4,
&IID_IDirect3D3,
(void**)&lpD3D3);
if (FAILED(hRes)) {
ddlogError(DDLOG_ERROR, "dglBPFL: QueryInterface (D3D3) failed", hRes);
goto clean_up;
}
ddlogMessage(DDLOG_INFO, "\n");
ddlogMessage(DDLOG_INFO, "ZBuffer formats:\n");
// Pass 1. Count the ZBuffer pixel formats
hRes = IDirect3D3_EnumZBufferFormats(
lpD3D3,
&glb.d3dGuid,
d3dEnumZBufferFormatsCallback,
NULL);
if (FAILED(hRes))
goto clean_up;
if (glb.nZBufferPFCount) {
glb.lpZBufferPF = (DDPIXELFORMAT *)calloc(glb.nZBufferPFCount,
sizeof(DDPIXELFORMAT));
if(glb.lpZBufferPF == NULL)
goto clean_up;
// Pass 2. Cache the ZBuffer pixel formats
iEnumCount = 0; // (Used by the enum function)
hRes = IDirect3D3_EnumZBufferFormats(
lpD3D3,
&glb.d3dGuid,
d3dEnumZBufferFormatsCallback,
glb.lpZBufferPF);
if (FAILED(hRes))
goto clean_up;
}
// Remove stencil support for boards which don't work for AutoCAD;
// Matrox G400 does not work, but NVidia TNT2 and ATI Rage128 do... (DaveM)
if (IsStencilSupportBroken(lpDD4)) {
for (i=0; i<iEnumCount; i++)
if (glb.lpZBufferPF[i].dwFlags & DDPF_STENCILBUFFER)
glb.nZBufferPFCount--;
}
// One each for every ZBuffer pixel format (including no depth buffer)
// Times-two because duplicated for single buffering (as opposed to double)
glb.nPixelFormatCount = 2 * (glb.nZBufferPFCount + 1);
glb.lpPF = (DGL_pixelFormat *)calloc(glb.nPixelFormatCount,
sizeof(DGL_pixelFormat));
if (glb.lpPF == NULL)
goto clean_up;
//
// Fill in the pixel formats
// Note: Depth buffer bits are really (dwZBufferBitDepth-dwStencilBitDepth)
// but this will pass wierd numbers to the OpenGL app. (?)
//
pfTemplateHW.pfd.iPixelType = dwPixelType;
pfTemplateHW.pfd.cColorBits = dwDisplayBitDepth;
pfTemplateHW.pfd.cRedBits = dwRb;
pfTemplateHW.pfd.cGreenBits = dwGb;
pfTemplateHW.pfd.cBlueBits = dwBb;
pfTemplateHW.pfd.cAlphaBits = dwAb;
pfTemplateHW.pfd.cRedShift = dwRs;
pfTemplateHW.pfd.cGreenShift = dwGs;
pfTemplateHW.pfd.cBlueShift = dwBs;
pfTemplateHW.pfd.cAlphaShift = dwAs;
lpPF = glb.lpPF;
// Fill in the double-buffered pixel formats
for (i=0; i<(glb.nZBufferPFCount + 1); i++, lpPF++) {
memcpy(lpPF, &pfTemplateHW, sizeof(DGL_pixelFormat));
if (i) {
lpPF->iZBufferPF = i-1;
lpPF->pfd.cDepthBits = glb.lpZBufferPF[i-1].dwZBufferBitDepth;
lpPF->pfd.cStencilBits = glb.lpZBufferPF[i-1].dwStencilBitDepth;
}
}
// Fill in the single-buffered pixel formats
for (i=0; i<(glb.nZBufferPFCount + 1); i++, lpPF++) {
memcpy(lpPF, &pfTemplateHW, sizeof(DGL_pixelFormat));
if (i) {
lpPF->iZBufferPF = i-1;
lpPF->pfd.cDepthBits = glb.lpZBufferPF[i-1].dwZBufferBitDepth;
lpPF->pfd.cStencilBits = glb.lpZBufferPF[i-1].dwStencilBitDepth;
}
// Remove double-buffer flag. Could use XOR instead...
lpPF->pfd.dwFlags &= (~(PFD_DOUBLEBUFFER));
// Insert GDI flag for single buffered format only.
lpPF->pfd.dwFlags |= PFD_SUPPORT_GDI;
}
#endif // _USE_GLD3_WGL
// Lets dump the list to the log
// ** Based on "wglinfo" by Nate Robins **
ddlogMessage(DDLOG_INFO, "\n");
ddlogMessage(DDLOG_INFO, "Pixel Formats:\n");
ddlogMessage(DDLOG_INFO,
" visual x bf lv rg d st r g b a ax dp st accum buffs ms\n");
ddlogMessage(DDLOG_INFO,
" id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b\n");
ddlogMessage(DDLOG_INFO,
"-----------------------------------------------------------------\n");
for (i=0, lpPF = glb.lpPF; i<glb.nPixelFormatCount; i++, lpPF++) {
sprintf(buf, "0x%02x ", i+1);
sprintf(cat, "%2d ", lpPF->pfd.cColorBits);
strcat(buf, cat);
if(lpPF->pfd.dwFlags & PFD_DRAW_TO_WINDOW) sprintf(cat, "wn ");
else if(lpPF->pfd.dwFlags & PFD_DRAW_TO_BITMAP) sprintf(cat, "bm ");
else sprintf(cat, ". ");
strcat(buf, cat);
/* should find transparent pixel from LAYERPLANEDESCRIPTOR */
sprintf(cat, " . ");
strcat(buf, cat);
sprintf(cat, "%2d ", lpPF->pfd.cColorBits);
strcat(buf, cat);
/* bReserved field indicates number of over/underlays */
if(lpPF->pfd.bReserved) sprintf(cat, " %d ", lpPF->pfd.bReserved);
else sprintf(cat, " . ");
strcat(buf, cat);
sprintf(cat, " %c ", lpPF->pfd.iPixelType == PFD_TYPE_RGBA ? 'r' : 'c');
strcat(buf, cat);
sprintf(cat, "%c ", lpPF->pfd.dwFlags & PFD_DOUBLEBUFFER ? 'y' : '.');
strcat(buf, cat);
sprintf(cat, " %c ", lpPF->pfd.dwFlags & PFD_STEREO ? 'y' : '.');
strcat(buf, cat);
if(lpPF->pfd.cRedBits && lpPF->pfd.iPixelType == PFD_TYPE_RGBA)
sprintf(cat, "%2d ", lpPF->pfd.cRedBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cGreenBits && lpPF->pfd.iPixelType == PFD_TYPE_RGBA)
sprintf(cat, "%2d ", lpPF->pfd.cGreenBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cBlueBits && lpPF->pfd.iPixelType == PFD_TYPE_RGBA)
sprintf(cat, "%2d ", lpPF->pfd.cBlueBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cAlphaBits && lpPF->pfd.iPixelType == PFD_TYPE_RGBA)
sprintf(cat, "%2d ", lpPF->pfd.cAlphaBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cAuxBuffers) sprintf(cat, "%2d ", lpPF->pfd.cAuxBuffers);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cDepthBits) sprintf(cat, "%2d ", lpPF->pfd.cDepthBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cStencilBits) sprintf(cat, "%2d ", lpPF->pfd.cStencilBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cAccumRedBits) sprintf(cat, "%2d ", lpPF->pfd.cAccumRedBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cAccumGreenBits) sprintf(cat, "%2d ", lpPF->pfd.cAccumGreenBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cAccumBlueBits) sprintf(cat, "%2d ", lpPF->pfd.cAccumBlueBits);
else sprintf(cat, " . ");
strcat(buf, cat);
if(lpPF->pfd.cAccumAlphaBits) sprintf(cat, "%2d ", lpPF->pfd.cAccumAlphaBits);
else sprintf(cat, " . ");
strcat(buf, cat);
/* no multisample in Win32 */
sprintf(cat, " . .\n");
strcat(buf, cat);
ddlogMessage(DDLOG_INFO, buf);
}
ddlogMessage(DDLOG_INFO,
"-----------------------------------------------------------------\n");
ddlogMessage(DDLOG_INFO, "\n");
#ifndef _USE_GLD3_WGL
clean_up:
// Release COM objects
RELEASE(lpD3D3);
RELEASE(lpDD4);
RELEASE(lpDD1);
// Popup warning message if non RGB color mode
if (dwDisplayBitDepth <= 8) {
ddlogPrintf(DDLOG_WARN, "Current Color Depth %d bpp is not supported", dwDisplayBitDepth);
MessageBox(NULL, szColorDepthWarning, "GLDirect", MB_OK | MB_ICONWARNING);
}
#endif // _USE_GLD3_WGL
}
// ***********************************************************************
void dglReleasePixelFormatList()
{
glb.nPixelFormatCount = 0;
if (glb.lpPF) {
free(glb.lpPF);
glb.lpPF = NULL;
}
#ifndef _USE_GLD3_WGL
glb.nZBufferPFCount = 0;
if (glb.lpZBufferPF) {
free(glb.lpZBufferPF);
glb.lpZBufferPF = NULL;
}
glb.nDisplayModeCount = 0;
if (glb.lpDisplayModes) {
free(glb.lpDisplayModes);
glb.lpDisplayModes = NULL;
}
#endif // _USE_GLD3_WGL
}
// ***********************************************************************
@@ -1,77 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Pixel Formats.
*
****************************************************************************/
#ifndef __DGLPF_H
#define __DGLPF_H
#ifndef STRICT
#define STRICT
#endif // STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
/*---------------------- Macros and type definitions ----------------------*/
typedef struct {
PIXELFORMATDESCRIPTOR pfd; // Win32 Pixel Format Descriptor
#ifdef _USE_GLD3_WGL
// Driver-specific data.
// Example: The DX8 driver uses this to hold an index into a
// list of depth-stencil descriptions.
DWORD dwDriverData;
#else
int iZBufferPF; // Index of depth buffer pixel format
#endif
} DGL_pixelFormat;
#include "dglglobals.h"
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
BOOL IsValidPFD(int iPFD);
void dglBuildPixelFormatList();
void dglReleasePixelFormatList();
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
@@ -1,102 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: OpenGL window functions (wgl*).
*
****************************************************************************/
#ifndef __DGLWGL_H
#define __DGLWGL_H
// Disable compiler complaints about DLL linkage
#pragma warning (disable:4273)
// Macros to control compilation
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <GL\gl.h>
#include "dglcontext.h"
#include "dglglobals.h"
#include "dglmacros.h"
#include "ddlog.h"
#include "dglpf.h"
/*---------------------- Macros and type definitions ----------------------*/
typedef struct {
PROC proc;
char *name;
} DGL_extension;
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _USE_GLD3_WGL
int APIENTRY DGL_ChoosePixelFormat(HDC a, CONST PIXELFORMATDESCRIPTOR *ppfd);
BOOL APIENTRY DGL_CopyContext(HGLRC a, HGLRC b, UINT c);
HGLRC APIENTRY DGL_CreateContext(HDC a);
HGLRC APIENTRY DGL_CreateLayerContext(HDC a, int b);
BOOL APIENTRY DGL_DeleteContext(HGLRC a);
BOOL APIENTRY DGL_DescribeLayerPlane(HDC a, int b, int c, UINT d, LPLAYERPLANEDESCRIPTOR e);
int APIENTRY DGL_DescribePixelFormat(HDC a, int b, UINT c, LPPIXELFORMATDESCRIPTOR d);
HGLRC APIENTRY DGL_GetCurrentContext(void);
HDC APIENTRY DGL_GetCurrentDC(void);
PROC APIENTRY DGL_GetDefaultProcAddress(LPCSTR a);
int APIENTRY DGL_GetLayerPaletteEntries(HDC a, int b, int c, int d, COLORREF *e);
int APIENTRY DGL_GetPixelFormat(HDC a);
PROC APIENTRY DGL_GetProcAddress(LPCSTR a);
BOOL APIENTRY DGL_MakeCurrent(HDC a, HGLRC b);
BOOL APIENTRY DGL_RealizeLayerPalette(HDC a, int b, BOOL c);
int APIENTRY DGL_SetLayerPaletteEntries(HDC a, int b, int c, int d, CONST COLORREF *e);
BOOL APIENTRY DGL_SetPixelFormat(HDC a, int b, CONST PIXELFORMATDESCRIPTOR *c);
BOOL APIENTRY DGL_ShareLists(HGLRC a, HGLRC b);
BOOL APIENTRY DGL_SwapBuffers(HDC a);
BOOL APIENTRY DGL_SwapLayerBuffers(HDC a, UINT b);
BOOL APIENTRY DGL_UseFontBitmapsA(HDC a, DWORD b, DWORD c, DWORD d);
BOOL APIENTRY DGL_UseFontBitmapsW(HDC a, DWORD b, DWORD c, DWORD d);
BOOL APIENTRY DGL_UseFontOutlinesA(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FLOAT f, int g, LPGLYPHMETRICSFLOAT h);
BOOL APIENTRY DGL_UseFontOutlinesW(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FLOAT f, int g, LPGLYPHMETRICSFLOAT h);
#endif //_USE_GLD3_WGL
BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,817 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Win32 DllMain functions.
*
****************************************************************************/
// INITGUID must only be defined once.
// Don't put it in a shared header file!
// GLD3 uses dxguid.lib, so INITGUID must *not* be used!
#ifndef _USE_GLD3_WGL
#define INITGUID
#endif // _USE_GLD3_WGL
#include "dllmain.h"
//#include "snap/graphics.h"
//#include "drvlib/os/os.h"
#ifdef _USE_GLD3_WGL
typedef void (APIENTRY *LPDGLSPLASHSCREEN)(int, int, char*);
#include "gld_driver.h"
#endif
// ***********************************************************************
BOOL bInitialized = FALSE; // callback driver initialized?
BOOL bExited = FALSE; // callback driver exited this instance?
HINSTANCE hInstanceDll = NULL; // DLL instance handle
static BOOL bDriverValidated = FALSE; // prior validation status
static BOOL bSplashScreen = TRUE; // Splash Screen ?
static BOOL bValidINIFound = FALSE; // Have we found a valid INI file?
HHOOK hKeyHook = NULL; // global keyboard handler hook
// Multi-threaded support needs to be reflected in Mesa code. (DaveM)
int _gld_bMultiThreaded = FALSE;
// ***********************************************************************
DWORD dwLogging = 0; // Logging flag
DWORD dwDebugLevel = 0; // Log debug level
char szLogPath[_MAX_PATH] = {"\0"}; // Log file path
char szSNAPPath[_MAX_PATH] = {"\0"}; // SNAP driver path
#ifndef _USE_GLD3_WGL
DGL_wglFuncs wglFuncs = {
sizeof(DGL_wglFuncs),
DGL_ChoosePixelFormat,
DGL_CopyContext,
DGL_CreateContext,
DGL_CreateLayerContext,
DGL_DeleteContext,
DGL_DescribeLayerPlane,
DGL_DescribePixelFormat,
DGL_GetCurrentContext,
DGL_GetCurrentDC,
DGL_GetDefaultProcAddress,
DGL_GetLayerPaletteEntries,
DGL_GetPixelFormat,
DGL_GetProcAddress,
DGL_MakeCurrent,
DGL_RealizeLayerPalette,
DGL_SetLayerPaletteEntries,
DGL_SetPixelFormat,
DGL_ShareLists,
DGL_SwapBuffers,
DGL_SwapLayerBuffers,
DGL_UseFontBitmapsA,
DGL_UseFontBitmapsW,
DGL_UseFontOutlinesA,
DGL_UseFontOutlinesW,
};
DGL_mesaFuncs mesaFuncs = {
sizeof(DGL_mesaFuncs),
};
#endif // _USE_GLD3_WGL
// ***********************************************************************
typedef struct {
DWORD dwDriver; // 0=SciTech SW, 1=Direct3D SW, 2=Direct3D HW
BOOL bMipmapping; // 0=off, 1=on
BOOL bMultitexture; // 0=off, 1=on
BOOL bWaitForRetrace; // 0=off, 1=on
BOOL bFullscreenBlit; // 0=off, 1=on
BOOL bFastFPU; // 0=off, 1=on
BOOL bDirectDrawPersistant;// 0=off, 1=on
BOOL bPersistantBuffers; // 0=off, 1=on
DWORD dwLogging; // 0=off, 1=normal, 2=crash-proof
DWORD dwLoggingSeverity; // 0=all, 1=warnings+errors, 2=errors only
BOOL bMessageBoxWarnings;// 0=off, 1=on
BOOL bMultiThreaded; // 0=off, 1=on
BOOL bAppCustomizations; // 0=off, 1=on
BOOL bHotKeySupport; // 0=off, 1=on
BOOL bSplashScreen; // 0=off, 1=on
#ifdef _USE_GLD3_WGL
//
// New for GLDirect 3.0
//
DWORD dwAdapter; // DX8 adpater ordinal
DWORD dwTnL; // Transform & Lighting type
DWORD dwMultisample; // DX8 multisample type
#endif // _USE_GLD3_WGL
} INI_settings;
static INI_settings ini;
// ***********************************************************************
BOOL APIENTRY DGL_initDriver(
#ifdef _USE_GLD3_WGL
void)
{
#else
DGL_wglFuncs *lpWglFuncs,
DGL_mesaFuncs *lpMesaFuncs)
{
// Check for valid pointers
if ((lpWglFuncs == NULL) || (lpMesaFuncs == NULL))
return FALSE;
// Check for valid structs
if (lpWglFuncs->dwSize != sizeof(DGL_wglFuncs)) {
return FALSE;
}
// Check for valid structs
if (lpMesaFuncs->dwSize != sizeof(DGL_mesaFuncs)) {
return FALSE;
}
// Copy the Mesa functions
memcpy(&mesaFuncs, lpMesaFuncs, sizeof(DGL_mesaFuncs));
// Pass back the wgl functions
memcpy(lpWglFuncs, &wglFuncs, sizeof(DGL_wglFuncs));
#endif // _USE_GLD3_WGL
// Finally initialize the callback driver
if (!dglInitDriver())
return FALSE;
return TRUE;
};
// ***********************************************************************
BOOL ReadINIFile(
HINSTANCE hInstance)
{
char szModuleFilename[MAX_PATH];
char szSystemDirectory[MAX_PATH];
const char szSectionName[] = "Config";
char szINIFile[MAX_PATH];
int pos;
// Now using the DLL module handle. KeithH, 24/May/2000.
// Addendum: GetModuleFileName(NULL, ... returns process filename,
// GetModuleFileName(hModule, ... returns DLL filename,
// Get the dll path and filename.
GetModuleFileName(hInstance, &szModuleFilename[0], MAX_PATH); // NULL for current process
// Get the System directory.
GetSystemDirectory(&szSystemDirectory[0], MAX_PATH);
// Test to see if DLL is in system directory.
if (strnicmp(szModuleFilename, szSystemDirectory, strlen(szSystemDirectory))==0) {
// DLL *is* in system directory.
// Return FALSE to indicate that registry keys should be read.
return FALSE;
}
// Compose filename of INI file
strcpy(szINIFile, szModuleFilename);
pos = strlen(szINIFile);
while (szINIFile[pos] != '\\') {
pos--;
}
szINIFile[pos+1] = '\0';
// Use run-time DLL path for log file too
strcpy(szLogPath, szINIFile);
szLogPath[pos] = '\0';
// Complete full INI file path
strcat(szINIFile, "gldirect.ini");
// Read settings from private INI file.
// Note that defaults are contained in the calls.
ini.dwDriver = GetPrivateProfileInt(szSectionName, "dwDriver", 2, szINIFile);
ini.bMipmapping = GetPrivateProfileInt(szSectionName, "bMipmapping", 1, szINIFile);
ini.bMultitexture = GetPrivateProfileInt(szSectionName, "bMultitexture", 1, szINIFile);
ini.bWaitForRetrace = GetPrivateProfileInt(szSectionName, "bWaitForRetrace", 0, szINIFile);
ini.bFullscreenBlit = GetPrivateProfileInt(szSectionName, "bFullscreenBlit", 0, szINIFile);
ini.bFastFPU = GetPrivateProfileInt(szSectionName, "bFastFPU", 1, szINIFile);
ini.bDirectDrawPersistant = GetPrivateProfileInt(szSectionName, "bPersistantDisplay", 0, szINIFile);
ini.bPersistantBuffers = GetPrivateProfileInt(szSectionName, "bPersistantResources", 0, szINIFile);
ini.dwLogging = GetPrivateProfileInt(szSectionName, "dwLogging", 0, szINIFile);
ini.dwLoggingSeverity = GetPrivateProfileInt(szSectionName, "dwLoggingSeverity", 0, szINIFile);
ini.bMessageBoxWarnings = GetPrivateProfileInt(szSectionName, "bMessageBoxWarnings", 0, szINIFile);
ini.bMultiThreaded = GetPrivateProfileInt(szSectionName, "bMultiThreaded", 0, szINIFile);
ini.bAppCustomizations = GetPrivateProfileInt(szSectionName, "bAppCustomizations", 1, szINIFile);
ini.bHotKeySupport = GetPrivateProfileInt(szSectionName, "bHotKeySupport", 0, szINIFile);
ini.bSplashScreen = GetPrivateProfileInt(szSectionName, "bSplashScreen", 1, szINIFile);
#ifdef _USE_GLD3_WGL
// New for GLDirect 3.x
ini.dwAdapter = GetPrivateProfileInt(szSectionName, "dwAdapter", 0, szINIFile);
// dwTnL now defaults to zero (chooses TnL at runtime). KeithH
ini.dwTnL = GetPrivateProfileInt(szSectionName, "dwTnL", 0, szINIFile);
ini.dwMultisample = GetPrivateProfileInt(szSectionName, "dwMultisample", 0, szINIFile);
#endif
return TRUE;
}
// ***********************************************************************
BOOL dllReadRegistry(
HINSTANCE hInstance)
{
// Read settings from INI file, if available
bValidINIFound = FALSE;
if (ReadINIFile(hInstance)) {
const char *szRendering[3] = {
"SciTech Software Renderer",
"Direct3D MMX Software Renderer",
"Direct3D Hardware Renderer"
};
// Set globals
glb.bPrimary = 1;
glb.bHardware = (ini.dwDriver == 2) ? 1 : 0;
#ifndef _USE_GLD3_WGL
memset(&glb.ddGuid, 0, sizeof(glb.ddGuid));
glb.d3dGuid = (ini.dwDriver == 2) ? IID_IDirect3DHALDevice : IID_IDirect3DRGBDevice;
#endif // _USE_GLD3_WGL
strcpy(glb.szDDName, "Primary");
strcpy(glb.szD3DName, szRendering[ini.dwDriver]);
glb.dwRendering = ini.dwDriver;
glb.bUseMipmaps = ini.bMipmapping;
glb.bMultitexture = ini.bMultitexture;
glb.bWaitForRetrace = ini.bWaitForRetrace;
glb.bFullscreenBlit = ini.bFullscreenBlit;
glb.bFastFPU = ini.bFastFPU;
glb.bDirectDrawPersistant = ini.bDirectDrawPersistant;
glb.bPersistantBuffers = ini.bPersistantBuffers;
dwLogging = ini.dwLogging;
dwDebugLevel = ini.dwLoggingSeverity;
glb.bMessageBoxWarnings = ini.bMessageBoxWarnings;
glb.bMultiThreaded = ini.bMultiThreaded;
glb.bAppCustomizations = ini.bAppCustomizations;
glb.bHotKeySupport = ini.bHotKeySupport;
bSplashScreen = ini.bSplashScreen;
#ifdef _USE_GLD3_WGL
// New for GLDirect 3.x
glb.dwAdapter = ini.dwAdapter;
glb.dwDriver = ini.dwDriver;
glb.dwTnL = ini.dwTnL;
glb.dwMultisample = ini.dwMultisample;
#endif
bValidINIFound = TRUE;
return TRUE;
}
// Read settings from registry
else {
HKEY hReg;
DWORD cbValSize;
DWORD dwType = REG_SZ; // Registry data type for strings
BOOL bRegistryError;
BOOL bSuccess;
#define REG_READ_DWORD(a, b) \
cbValSize = sizeof(b); \
if (ERROR_SUCCESS != RegQueryValueEx( hReg, (a), \
NULL, NULL, (LPBYTE)&(b), &cbValSize )) \
bRegistryError = TRUE;
#define REG_READ_DEVICEID(a, b) \
cbValSize = MAX_DDDEVICEID_STRING; \
if(ERROR_SUCCESS != RegQueryValueEx(hReg, (a), 0, &dwType, \
(LPBYTE)&(b), &cbValSize)) \
bRegistryError = TRUE;
#define REG_READ_STRING(a, b) \
cbValSize = sizeof((b)); \
if(ERROR_SUCCESS != RegQueryValueEx(hReg, (a), 0, &dwType, \
(LPBYTE)&(b), &cbValSize)) \
bRegistryError = TRUE;
// Read settings from the registry.
// Open the registry key for the current user if it exists.
bSuccess = (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CURRENT_USER,
DIRECTGL_REG_SETTINGS_KEY,
0,
KEY_READ,
&hReg));
// Otherwise open the registry key for the local machine.
if (!bSuccess)
bSuccess = (ERROR_SUCCESS == RegOpenKeyEx(DIRECTGL_REG_KEY_ROOT,
DIRECTGL_REG_SETTINGS_KEY,
0,
KEY_READ,
&hReg));
if (!bSuccess)
return FALSE;
bRegistryError = FALSE;
REG_READ_DWORD(DIRECTGL_REG_SETTING_PRIMARY, glb.bPrimary);
REG_READ_DWORD(DIRECTGL_REG_SETTING_D3D_HW, glb.bHardware);
#ifndef _USE_GLD3_WGL
REG_READ_DWORD(DIRECTGL_REG_SETTING_DD_GUID, glb.ddGuid);
REG_READ_DWORD(DIRECTGL_REG_SETTING_D3D_GUID, glb.d3dGuid);
#endif // _USE_GLD3_WGL
REG_READ_DWORD(DIRECTGL_REG_SETTING_LOGGING, dwLogging);
REG_READ_DWORD(DIRECTGL_REG_SETTING_DEBUGLEVEL, dwDebugLevel);
REG_READ_DWORD(DIRECTGL_REG_SETTING_RENDERING, glb.dwRendering);
REG_READ_DWORD(DIRECTGL_REG_SETTING_MULTITEXTURE, glb.bMultitexture);
REG_READ_DWORD(DIRECTGL_REG_SETTING_WAITFORRETRACE, glb.bWaitForRetrace);
REG_READ_DWORD(DIRECTGL_REG_SETTING_FULLSCREENBLIT, glb.bFullscreenBlit);
REG_READ_DWORD(DIRECTGL_REG_SETTING_USEMIPMAPS, glb.bUseMipmaps);
REG_READ_DEVICEID(DIRECTGL_REG_SETTING_DD_NAME, glb.szDDName);
REG_READ_DEVICEID(DIRECTGL_REG_SETTING_D3D_NAME, glb.szD3DName);
REG_READ_DWORD(DIRECTGL_REG_SETTING_MSGBOXWARNINGS, glb.bMessageBoxWarnings);
REG_READ_DWORD(DIRECTGL_REG_SETTING_PERSISTDISPLAY, glb.bDirectDrawPersistant);
REG_READ_DWORD(DIRECTGL_REG_SETTING_PERSISTBUFFERS, glb.bPersistantBuffers);
REG_READ_DWORD(DIRECTGL_REG_SETTING_FASTFPU, glb.bFastFPU);
REG_READ_DWORD(DIRECTGL_REG_SETTING_HOTKEYS, glb.bHotKeySupport);
REG_READ_DWORD(DIRECTGL_REG_SETTING_MULTITHREAD, glb.bMultiThreaded);
REG_READ_DWORD(DIRECTGL_REG_SETTING_APPCUSTOM, glb.bAppCustomizations);
REG_READ_DWORD(DIRECTGL_REG_SETTING_SPLASHSCREEN, bSplashScreen);
#ifdef _USE_GLD3_WGL
// New for GLDirect 3.x
glb.dwDriver = glb.dwRendering;
REG_READ_DWORD(DIRECTGL_REG_SETTING_ADAPTER, glb.dwAdapter);
REG_READ_DWORD(DIRECTGL_REG_SETTING_TNL, glb.dwTnL);
REG_READ_DWORD(DIRECTGL_REG_SETTING_MULTISAMPLE, glb.dwMultisample);
#endif
RegCloseKey(hReg);
// Open the global registry key for GLDirect
bSuccess = (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE,
DIRECTGL_REG_SETTINGS_KEY,
0,
KEY_READ,
&hReg));
if (bSuccess) {
// Read the installation path for GLDirect
REG_READ_STRING("InstallLocation",szLogPath);
RegCloseKey(hReg);
}
if (bRegistryError || !bSuccess)
return FALSE;
else
return TRUE;
#undef REG_READ_DWORD
#undef REG_READ_DEVICEID
#undef REG_READ_STRING
}
}
// ***********************************************************************
BOOL dllWriteRegistry(
void )
{
HKEY hReg;
DWORD dwCreateDisposition, cbValSize;
BOOL bRegistryError = FALSE;
#define REG_WRITE_DWORD(a, b) \
cbValSize = sizeof(b); \
if (ERROR_SUCCESS != RegSetValueEx( hReg, (a), \
0, REG_DWORD, (LPBYTE)&(b), cbValSize )) \
bRegistryError = TRUE;
if (ERROR_SUCCESS == RegCreateKeyEx( DIRECTGL_REG_KEY_ROOT, DIRECTGL_REG_SETTINGS_KEY,
0, NULL, 0, KEY_WRITE, NULL, &hReg,
&dwCreateDisposition )) {
RegFlushKey(hReg); // Make sure keys are written to disk
RegCloseKey(hReg);
hReg = NULL;
}
if (bRegistryError)
return FALSE;
else
return TRUE;
#undef REG_WRITE_DWORD
}
// ***********************************************************************
void dglInitHotKeys(HINSTANCE hInstance)
{
// Hot-Key support at all?
if (!glb.bHotKeySupport)
return;
// Install global keyboard interceptor
hKeyHook = SetWindowsHookEx(WH_KEYBOARD, dglKeyProc, hInstance, 0);
}
// ***********************************************************************
void dglExitHotKeys(void)
{
// Hot-Key support at all?
if (!glb.bHotKeySupport)
return;
// Remove global keyboard interceptor
if (hKeyHook)
UnhookWindowsHookEx(hKeyHook);
hKeyHook = NULL;
}
// ***********************************************************************
// Note: This app-customization step must be performed in both the main
// OpenGL32 driver and the callback driver DLLs for multithreading option.
void dglSetAppCustomizations(void)
{
char szModuleFileName[MAX_PATH];
int iSize = MAX_PATH;
// Get the currently loaded EXE filename.
GetModuleFileName(NULL, &szModuleFileName[0], MAX_PATH); // NULL for current process
strupr(szModuleFileName);
iSize = strlen(szModuleFileName);
// Check for specific EXEs and adjust global settings accordingly
// NOTE: In GLD3.x "bDirectDrawPersistant" corresponds to IDirect3D8 and
// "bPersistantBuffers" corresponds to IDirect3DDevice8. KeithH
// Case 1: 3DStudio must be multi-threaded
// Added: Discreet GMAX (3DStudio MAX 4 for gamers. KeithH)
if (strstr(szModuleFileName, "3DSMAX.EXE")
|| strstr(szModuleFileName, "3DSVIZ.EXE")
|| strstr(szModuleFileName, "GMAX.EXE")) {
glb.bMultiThreaded = TRUE;
glb.bDirectDrawPersistant = FALSE;
glb.bPersistantBuffers = FALSE;
return;
}
// Case 2: Solid Edge must use pre-allocated resources for all GLRCs
if (strstr(szModuleFileName, "PART.EXE")
|| strstr(szModuleFileName, "ASSEMBL.EXE")
|| strstr(szModuleFileName, "DRAFT.EXE")
|| strstr(szModuleFileName, "SMARTVW.EXE")
|| strstr(szModuleFileName, "SMETAL.EXE")) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = TRUE;
glb.bPersistantBuffers = FALSE;
return;
}
// Case 3: Sudden Depth creates and destroys GLRCs on paint commands
if (strstr(szModuleFileName, "SUDDEPTH.EXE")
|| strstr(szModuleFileName, "SUDDEMO.EXE")) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = TRUE;
glb.bPersistantBuffers = TRUE;
glb.bFullscreenBlit = TRUE;
return;
}
// Case 4: StereoGraphics test apps create and destroy GLRCs on paint commands
if (strstr(szModuleFileName, "REDBLUE.EXE")
|| strstr(szModuleFileName, "DIAGNOSE.EXE")) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = TRUE;
glb.bPersistantBuffers = TRUE;
return;
}
// Case 5: Pipes screen savers share multiple GLRCs for same window
if (strstr(szModuleFileName, "PIPES.SCR")
|| (strstr(szModuleFileName, "PIPES") && strstr(szModuleFileName, ".SCR"))) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = TRUE;
glb.bPersistantBuffers = TRUE;
return;
}
// Case 6: AutoVue uses sub-viewport ops which are temporarily broken in stereo window
if (strstr(szModuleFileName, "AVWIN.EXE")) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = TRUE;
glb.bPersistantBuffers = TRUE;
return;
}
// Case 7: Quake3 is waiting for DDraw objects to be released at exit
if (strstr(szModuleFileName, "QUAKE")) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = FALSE;
glb.bPersistantBuffers = FALSE;
glb.bFullscreenBlit = FALSE;
return;
}
// Case 8: Reflection GLX server is unable to switch contexts at run-time
if (strstr(szModuleFileName, "RX.EXE")) {
glb.bMultiThreaded = FALSE;
glb.bMessageBoxWarnings = FALSE;
return;
}
// Case 9: Original AutoCAD 2000 must share DDraw objects across GLRCs
if (strstr(szModuleFileName, "ACAD.EXE")) {
glb.bFastFPU = FALSE;
if (GetModuleHandle("wopengl6.hdi") != NULL) {
glb.bMultiThreaded = FALSE;
glb.bDirectDrawPersistant = TRUE;
glb.bPersistantBuffers = FALSE;
}
return;
}
}
// ***********************************************************************
BOOL dglInitDriver(void)
{
UCHAR szExeName[MAX_PATH];
const char *szRendering[] = {
"Mesa Software",
"Direct3D RGB SW",
"Direct3D HW",
};
static BOOL bWarnOnce = FALSE;
// Already initialized?
if (bInitialized)
return TRUE;
// Moved from DllMain DLL_PROCESS_ATTACH:
// (Re-)Init defaults
dglInitGlobals();
// Read registry or INI file settings
if (!dllReadRegistry(hInstanceDll)) {
if (!bWarnOnce)
MessageBox( NULL, "GLDirect has not been configured.\n\n"
"Please run the configuration program\n"
"before using GLDirect with applications.\n",
"GLDirect", MB_OK | MB_ICONWARNING);
bWarnOnce = TRUE;
return FALSE;
}
#ifdef _USE_GLD3_WGL
// Must do this as early as possible.
// Need to read regkeys/ini-file first though.
gldInitDriverPointers(glb.dwDriver);
// Create private driver globals
_gldDriver.CreatePrivateGlobals();
#endif
// Overide settings with application customizations
if (glb.bAppCustomizations)
dglSetAppCustomizations();
//#ifndef _USE_GLD3_WGL
// Set the global memory type to either sysmem or vidmem
glb.dwMemoryType = glb.bHardware ? DDSCAPS_VIDEOMEMORY : DDSCAPS_SYSTEMMEMORY;
//#endif
// Multi-threaded support overides persistant display support
if (glb.bMultiThreaded)
glb.bDirectDrawPersistant = glb.bPersistantBuffers = FALSE;
// Multi-threaded support needs to be reflected in Mesa code. (DaveM)
_gld_bMultiThreaded = glb.bMultiThreaded;
// Start logging
ddlogPathOption(szLogPath);
ddlogWarnOption(glb.bMessageBoxWarnings);
ddlogOpen((DDLOG_loggingMethodType)dwLogging,
(DDLOG_severityType)dwDebugLevel);
// Obtain the name of the calling app
ddlogMessage(DDLOG_SYSTEM, "Driver : SciTech GLDirect 4.0\n");
GetModuleFileName(NULL, szExeName, sizeof(szExeName));
ddlogPrintf(DDLOG_SYSTEM, "Executable : %s", szExeName);
ddlogPrintf(DDLOG_SYSTEM, "DirectDraw device: %s", glb.szDDName);
ddlogPrintf(DDLOG_SYSTEM, "Direct3D driver : %s", glb.szD3DName);
ddlogPrintf(DDLOG_SYSTEM, "Rendering type : %s", szRendering[glb.dwRendering]);
ddlogPrintf(DDLOG_SYSTEM, "Multithreaded : %s", glb.bMultiThreaded ? "Enabled" : "Disabled");
ddlogPrintf(DDLOG_SYSTEM, "Display resources: %s", glb.bDirectDrawPersistant ? "Persistant" : "Instanced");
ddlogPrintf(DDLOG_SYSTEM, "Buffer resources : %s", glb.bPersistantBuffers ? "Persistant" : "Instanced");
dglInitContextState();
dglBuildPixelFormatList();
//dglBuildTextureFormatList();
// D3D callback driver is now successfully initialized
bInitialized = TRUE;
// D3D callback driver is now ready to be exited
bExited = FALSE;
return TRUE;
}
// ***********************************************************************
void dglExitDriver(void)
{
// Only need to clean up once per instance:
// May be called implicitly from DLL_PROCESS_DETACH,
// or explicitly from DGL_exitDriver().
if (bExited)
return;
bExited = TRUE;
// DDraw objects may be invalid when DLL unloads.
__try {
// Clean-up sequence (moved from DLL_PROCESS_DETACH)
#ifndef _USE_GLD3_WGL
dglReleaseTextureFormatList();
#endif
dglReleasePixelFormatList();
dglDeleteContextState();
#ifdef _USE_GLD3_WGL
_gldDriver.DestroyPrivateGlobals();
#endif
}
__except(EXCEPTION_EXECUTE_HANDLER) {
ddlogPrintf(DDLOG_WARN, "Exception raised in dglExitDriver.");
}
// Close the log file
ddlogClose();
}
// ***********************************************************************
int WINAPI DllMain(
HINSTANCE hInstance,
DWORD fdwReason,
PVOID pvReserved)
{
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
// Cache DLL instance handle
hInstanceDll = hInstance;
// Flag that callback driver has yet to be initialized
bInitialized = bExited = FALSE;
#ifndef _USE_GLD3_WGL
// Init internal Mesa function pointers
memset(&mesaFuncs, 0, sizeof(DGL_mesaFuncs));
#endif // _USE_GLD3_WGL
// Init defaults
dglInitGlobals();
// Defer rest of DLL initialization to 1st WGL function call
break;
case DLL_PROCESS_DETACH:
// Call exit clean-up sequence
dglExitDriver();
break;
}
return TRUE;
}
// ***********************************************************************
void APIENTRY DGL_exitDriver(void)
{
// Call exit clean-up sequence
dglExitDriver();
}
// ***********************************************************************
void APIENTRY DGL_reinitDriver(void)
{
// Force init sequence again
bInitialized = bExited = FALSE;
dglInitDriver();
}
// ***********************************************************************
int WINAPI DllInitialize(
HINSTANCE hInstance,
DWORD fdwReason,
PVOID pvReserved)
{
// Some Watcom compiled executables require this.
return DllMain(hInstance, fdwReason, pvReserved);
}
// ***********************************************************************
void DGL_LoadSplashScreen(int piReg, char* pszUser)
{
HINSTANCE hSplashDll = NULL;
LPDGLSPLASHSCREEN dglSplashScreen = NULL;
static BOOL bOnce = FALSE;
static int iReg = 0;
static char szUser[255] = {"\0"};
// Display splash screen at all?
if (!bSplashScreen)
return;
// Only display splash screen once
if (bOnce)
return;
bOnce = TRUE;
// Make local copy of string for passing to DLL
if (pszUser)
strcpy(szUser, pszUser);
iReg = piReg;
// Load Splash Screen DLL
// (If it fails to load for any reason, we don't care...)
hSplashDll = LoadLibrary("gldsplash.dll");
if (hSplashDll) {
// Execute the Splash Screen function
dglSplashScreen = (LPDGLSPLASHSCREEN)GetProcAddress(hSplashDll, "GLDSplashScreen");
if (dglSplashScreen)
(*dglSplashScreen)(1, iReg, szUser);
// Don't unload the DLL since splash screen dialog is modeless now
}
}
// ***********************************************************************
BOOL dglValidate()
{
char *szCaption = "SciTech GLDirect Driver";
UINT uType = MB_OK | MB_ICONEXCLAMATION;
#ifdef _USE_GLD3_WGL
// (Re)build pixelformat list
if (glb.bPixelformatsDirty)
_gldDriver.BuildPixelformatList();
#endif
// Check to see if we have already validated
if (bDriverValidated && bInitialized)
return TRUE;
// Since all (most) the WGL functions must be validated at this point,
// this also insure that the callback driver is completely initialized.
if (!bInitialized)
if (!dglInitDriver()) {
MessageBox(NULL,
"The GLDirect driver could not initialize.\n\n"
"Please run the configuration program to\n"
"properly configure the driver, or else\n"
"re-run the installation program.", szCaption, uType);
_exit(1); // Bail
}
return TRUE;
}
// ***********************************************************************
@@ -1,64 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Win32 DllMain functions.
*
****************************************************************************/
#ifndef __DLLMAIN_H
#define __DLLMAIN_H
// Macros to control compilation
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifndef _USE_GLD3_WGL
#include "DirectGL.h"
#endif // _USE_GLD3_WGL
//#include "gldirect/regkeys.h"
#include "dglglobals.h"
#include "ddlog.h"
#ifndef _USE_GLD3_WGL
#include "d3dtexture.h"
#endif // _USE_GLD3_WGL
#include "dglwgl.h"
extern BOOL bInitialized;
BOOL dglInitDriver(void);
void dglExitDriver(void);
#endif
@@ -1,40 +0,0 @@
/* $Id: gld_debug_clip.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes <gareth@valinux.com>
*/
#ifdef DEBUG /* This code only used for debugging */
// Stub to enable Mesa to build. KeithH
#pragma message("NOTE: Using gld_debug_clip.c HACK")
void _math_test_all_cliptest_functions( char *description )
{
}
#endif /* DEBUG */
@@ -1,40 +0,0 @@
/* $Id: gld_debug_norm.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes <gareth@valinux.com>
*/
#ifdef DEBUG /* This code only used for debugging */
// Stub to enable Mesa to build. KeithH
#pragma message("NOTE: Using gld_debug_norm.c HACK")
void _math_test_all_normal_transform_functions( char *description )
{
}
#endif /* DEBUG */
@@ -1,42 +0,0 @@
/* $Id: gld_debug_xform.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* Updated for P6 architecture by Gareth Hughes.
*/
#ifdef DEBUG /* This code only used for debugging */
// Stub to enable Mesa to build. KeithH
#pragma message("NOTE: Using gld_debug_xform.c HACK")
void _math_test_all_transform_functions( char *description )
{
}
#endif /* DEBUG */
@@ -1,73 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x/2000/XP/XBox (Win32)
*
* Description: Thread-aware dispatch table.
*
****************************************************************************/
#include "glheader.h"
#include "glapi.h"
#include "glapitable.h"
#include "mtypes.h"
#include "context.h"
#define KEYWORD1
#define KEYWORD2 GLAPIENTRY
#if defined(USE_MGL_NAMESPACE)
#define NAME(func) mgl##func
#else
#define NAME(func) gl##func
#endif
#if 0
// Altered these to get the dispatch table from
// the current context of the calling thread.
#define DISPATCH(FUNC, ARGS, MESSAGE) \
GET_CURRENT_CONTEXT(gc); \
(gc->CurrentDispatch->FUNC) ARGS
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
GET_CURRENT_CONTEXT(gc); \
return (gc->CurrentDispatch->FUNC) ARGS
#else // #if 0
#define DISPATCH(FUNC, ARGS, MESSAGE) \
GET_CURRENT_CONTEXT(gc); \
(_glapi_Dispatch->FUNC) ARGS
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
GET_CURRENT_CONTEXT(gc); \
return (_glapi_Dispatch->FUNC) ARGS
#endif // #if 0
#ifndef GLAPIENTRY
#define GLAPIENTRY
#endif
#include "glapitemp.h"
@@ -1,279 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x/2000/XP/XBox (Win32)
*
* Description: Driver functions and interfaces
*
****************************************************************************/
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "gld_driver.h"
#include "ddlog.h"
#include "glheader.h"
// For glGetString().
#include "common_x86_asm.h"
//---------------------------------------------------------------------------
static char *szDriverError = "Driver used before initialisation!";
// This holds our dynamically created OpenGL renderer string.
// 256 chars should be plenty - remember that some apps display this.
static char _gldRendererString[256];
static char *szVendor = "SciTech Software, Inc.";
//---------------------------------------------------------------------------
extern BOOL gldGetDXErrorString_DX(HRESULT hr, char *buf, int nBufSize);
extern BOOL gldCreateDrawable_MesaSW(DGL_ctx *ctx, BOOL bPersistantInterface, BOOL bPersistantBuffers);
extern BOOL gldResizeDrawable_MesaSW(DGL_ctx *ctx, BOOL bDefaultDriver, BOOL bPersistantInterface, BOOL bPersistantBuffers);
extern BOOL gldDestroyDrawable_MesaSW(DGL_ctx *ctx);
extern BOOL gldCreatePrivateGlobals_MesaSW(void);
extern BOOL gldDestroyPrivateGlobals_MesaSW(void);
extern BOOL gldBuildPixelformatList_MesaSW(void);
extern BOOL gldInitialiseMesa_MesaSW(DGL_ctx *ctx);
extern BOOL gldSwapBuffers_MesaSW(DGL_ctx *ctx, HDC hDC, HWND hWnd);
extern PROC gldGetProcAddress_MesaSW(LPCSTR a);
extern BOOL gldGetDisplayMode_MesaSW(DGL_ctx *ctx, GLD_displayMode *glddm);
extern BOOL gldCreateDrawable_DX(DGL_ctx *ctx, BOOL bPersistantInterface, BOOL bPersistantBuffers);
extern BOOL gldResizeDrawable_DX(DGL_ctx *ctx, BOOL bDefaultDriver, BOOL bPersistantInterface, BOOL bPersistantBuffers);
extern BOOL gldDestroyDrawable_DX(DGL_ctx *ctx);
extern BOOL gldCreatePrivateGlobals_DX(void);
extern BOOL gldDestroyPrivateGlobals_DX(void);
extern BOOL gldBuildPixelformatList_DX(void);
extern BOOL gldInitialiseMesa_DX(DGL_ctx *ctx);
extern BOOL gldSwapBuffers_DX(DGL_ctx *ctx, HDC hDC, HWND hWnd);
extern PROC gldGetProcAddress_DX(LPCSTR a);
extern BOOL gldGetDisplayMode_DX(DGL_ctx *ctx, GLD_displayMode *glddm);
//---------------------------------------------------------------------------
// NOP functions. Called if proper driver functions are not set.
//---------------------------------------------------------------------------
static BOOL _gldDriverError(void)
{
ddlogMessage(DDLOG_CRITICAL, szDriverError);
return FALSE;
}
//---------------------------------------------------------------------------
static BOOL _GetDXErrorString_ERROR(
HRESULT hr,
char *buf,
int nBufSize)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _CreateDrawable_ERROR(
DGL_ctx *ctx,
BOOL bPersistantInterface,
BOOL bPersistantBuffers)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _ResizeDrawable_ERROR(
DGL_ctx *ctx,
BOOL bDefaultDriver,
BOOL bPersistantInterface,
BOOL bPersistantBuffers)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _DestroyDrawable_ERROR(
DGL_ctx *ctx)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _CreatePrivateGlobals_ERROR(void)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _DestroyPrivateGlobals_ERROR(void)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _BuildPixelformatList_ERROR(void)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _InitialiseMesa_ERROR(
DGL_ctx *ctx)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static BOOL _SwapBuffers_ERROR(
DGL_ctx *ctx,
HDC hDC,
HWND hWnd)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
static PROC _GetProcAddress_ERROR(
LPCSTR a)
{
_gldDriverError();
return NULL;
}
//---------------------------------------------------------------------------
static BOOL _GetDisplayMode_ERROR(
DGL_ctx *ctx,
GLD_displayMode *glddm)
{
return _gldDriverError();
}
//---------------------------------------------------------------------------
// Functions useful to all drivers
//---------------------------------------------------------------------------
const GLubyte* _gldGetStringGeneric(
GLcontext *ctx,
GLenum name)
{
if (!ctx)
return NULL;
switch (name) {
case GL_RENDERER:
sprintf(_gldRendererString, "GLDirect 4.0 %s%s%s%s (%s %s)",
_mesa_x86_cpu_features ? "/x86" : "",
cpu_has_mmx ? "/MMX" : "",
cpu_has_3dnow ? "/3DNow!" : "",
cpu_has_xmm ? "/SSE" : "",
__DATE__, __TIME__);
return (const GLubyte *) _gldRendererString;
case GL_VENDOR:
return (const GLubyte *) szVendor;
default:
return NULL;
}
}
//---------------------------------------------------------------------------
// Global driver function pointers, initially set to functions that
// will report an error when called.
//---------------------------------------------------------------------------
GLD_driver _gldDriver = {
_GetDXErrorString_ERROR,
_CreateDrawable_ERROR,
_ResizeDrawable_ERROR,
_DestroyDrawable_ERROR,
_CreatePrivateGlobals_ERROR,
_DestroyPrivateGlobals_ERROR,
_BuildPixelformatList_ERROR,
_InitialiseMesa_ERROR,
_SwapBuffers_ERROR,
_GetProcAddress_ERROR,
_GetDisplayMode_ERROR
};
//---------------------------------------------------------------------------
// Init function. Should be called as soon as regkeys/ini-settings are read.
//---------------------------------------------------------------------------
BOOL gldInitDriverPointers(
DWORD dwDriver)
{
_gldDriver.GetDXErrorString = gldGetDXErrorString_DX;
if (dwDriver == GLDS_DRIVER_MESA_SW) {
// Mesa Software driver
_gldDriver.CreateDrawable = gldCreateDrawable_MesaSW;
_gldDriver.ResizeDrawable = gldResizeDrawable_MesaSW;
_gldDriver.DestroyDrawable = gldDestroyDrawable_MesaSW;
_gldDriver.CreatePrivateGlobals = gldCreatePrivateGlobals_MesaSW;
_gldDriver.DestroyPrivateGlobals = gldDestroyPrivateGlobals_MesaSW;
_gldDriver.BuildPixelformatList = gldBuildPixelformatList_MesaSW;
_gldDriver.InitialiseMesa = gldInitialiseMesa_MesaSW;
_gldDriver.SwapBuffers = gldSwapBuffers_MesaSW;
_gldDriver.wglGetProcAddress = gldGetProcAddress_MesaSW;
_gldDriver.GetDisplayMode = gldGetDisplayMode_MesaSW;
return TRUE;
}
if ((dwDriver == GLDS_DRIVER_REF) || (dwDriver == GLDS_DRIVER_HAL)) {
// Direct3D driver, either HW or SW
_gldDriver.CreateDrawable = gldCreateDrawable_DX;
_gldDriver.ResizeDrawable = gldResizeDrawable_DX;
_gldDriver.DestroyDrawable = gldDestroyDrawable_DX;
_gldDriver.CreatePrivateGlobals = gldCreatePrivateGlobals_DX;
_gldDriver.DestroyPrivateGlobals = gldDestroyPrivateGlobals_DX;
_gldDriver.BuildPixelformatList = gldBuildPixelformatList_DX;
_gldDriver.InitialiseMesa = gldInitialiseMesa_DX;
_gldDriver.SwapBuffers = gldSwapBuffers_DX;
_gldDriver.wglGetProcAddress = gldGetProcAddress_DX;
_gldDriver.GetDisplayMode = gldGetDisplayMode_DX;
return TRUE;
};
return FALSE;
}
//---------------------------------------------------------------------------
@@ -1,90 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x/2000/XP/XBox (Win32)
*
* Description: Driver functions and interfaces
*
****************************************************************************/
#ifndef _GLD_DRIVER_H
#define _GLD_DRIVER_H
// This file is only useful is we're using the new GLD3 WGL code.
#ifdef _USE_GLD3_WGL
#include "dglcontext.h"
// Same as DX8 D3DDISPLAYMODE
typedef struct {
DWORD Width;
DWORD Height;
DWORD Refresh;
DWORD BPP;
} GLD_displayMode;
typedef struct {
// Returns a string for a given HRESULT error code.
BOOL (*GetDXErrorString)(HRESULT hr, char *buf, int nBufSize);
// Driver functions for managing drawables.
// Functions must respect persistant buffers / persistant interface.
// NOTE: Persistant interface is: DirectDraw, pre-DX8; Direct3D, DX8 and above.
BOOL (*CreateDrawable)(DGL_ctx *ctx, BOOL bPersistantInterface, BOOL bPersistantBuffers);
BOOL (*ResizeDrawable)(DGL_ctx *ctx, BOOL bDefaultDriver, BOOL bPersistantInterface, BOOL bPersistantBuffers);
BOOL (*DestroyDrawable)(DGL_ctx *ctx);
// Create/Destroy private globals belonging to driver
BOOL (*CreatePrivateGlobals)(void);
BOOL (*DestroyPrivateGlobals)(void);
// Build pixelformat list
BOOL (*BuildPixelformatList)(void);
// Initialise Mesa's driver pointers
BOOL (*InitialiseMesa)(DGL_ctx *ctx);
// Swap buffers
BOOL (*SwapBuffers)(DGL_ctx *ctx, HDC hDC, HWND hWnd);
// wglGetProcAddress()
PROC (*wglGetProcAddress)(LPCSTR a);
BOOL (*GetDisplayMode)(DGL_ctx *ctx, GLD_displayMode *glddm);
} GLD_driver;
extern GLD_driver _gldDriver;
BOOL gldInitDriverPointers(DWORD dwDriver);
const GLubyte* _gldGetStringGeneric(GLcontext *ctx, GLenum name);
#endif // _USE_GLD3_WGL
#endif // _GLD_DRIVER_H
@@ -1,181 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: GLDirect utility for determining lame boards/drivers.
*
****************************************************************************/
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <d3d8.h>
/*
Ack. Broken out from gldlame.c because of broken D3D headers. KeithH
*/
/****************************************************************************
REMARKS:
Scans list of DirectDraw devices for specific device IDs.
****************************************************************************/
#define VENDORID_ATI 0x1002
static DWORD devATIRagePro[] = {
0x4742, // 3D RAGE PRO BGA AGP 1X/2X
0x4744, // 3D RAGE PRO BGA AGP 1X only
0x4749, // 3D RAGE PRO BGA PCI 33 MHz
0x4750, // 3D RAGE PRO PQFP PCI 33 MHz
0x4751, // 3D RAGE PRO PQFP PCI 33 MHz limited 3D
0x4C42, // 3D RAGE LT PRO BGA-312 AGP 133 MHz
0x4C44, // 3D RAGE LT PRO BGA-312 AGP 66 MHz
0x4C49, // 3D RAGE LT PRO BGA-312 PCI 33 MHz
0x4C50, // 3D RAGE LT PRO BGA-256 PCI 33 MHz
0x4C51, // 3D RAGE LT PRO BGA-256 PCI 33 MHz limited 3D
};
static DWORD devATIRageIIplus[] = {
0x4755, // 3D RAGE II+
0x4756, // 3D RAGE IIC PQFP PCI
0x4757, // 3D RAGE IIC BGA AGP
0x475A, // 3D RAGE IIC PQFP AGP
0x4C47, // 3D RAGE LT-G
};
static __inline BOOL IsDevice(
DWORD *lpDeviceIdList,
DWORD dwDeviceId,
int count)
{
int i;
for (i=0; i<count; i++)
if (dwDeviceId == lpDeviceIdList[i])
return TRUE;
return FALSE;
}
/****************************************************************************
REMARKS:
Test the Direct3D8 device for "lameness" with respect to GLDirect.
This is done on per-chipset basis, as in GLD CAD driver (DGLCONTEXT.C).
If bTestForWHQL is set then the device is tested to see if it is
certified, and bIsWHQL is set to indicate TRUE or FALSE. Otherwise bIsWHQL
is not set. [WHQL = Windows Hardware Quality Labs]
NOTE: There is a one- or two-second time penalty incurred in determining
the WHQL certification date.
****************************************************************************/
BOOL IsThisD3D8Lame(
IDirect3D8 *pD3D,
DWORD dwAdapter,
BOOL bTestForWHQL,
BOOL *bIsWHQL)
{
DWORD dwFlags = bTestForWHQL ? 0 : D3DENUM_NO_WHQL_LEVEL;
D3DADAPTER_IDENTIFIER8 d3dai;
HRESULT hr;
hr = IDirect3D8_GetAdapterIdentifier(pD3D, dwAdapter, dwFlags, &d3dai);
if (FAILED(hr))
return TRUE; // Definitely lame if adapter details can't be obtained!
if (bTestForWHQL) {
*bIsWHQL = d3dai.WHQLLevel ? TRUE : FALSE;
}
// Vendor 1: ATI
if (d3dai.VendorId == VENDORID_ATI) {
// Test A: ATI Rage PRO
if (IsDevice(devATIRagePro, d3dai.DeviceId, sizeof(devATIRagePro)))
return TRUE; // bad mipmapping
// Test B: ATI Rage II+
if (IsDevice(devATIRageIIplus, d3dai.DeviceId, sizeof(devATIRageIIplus)))
return TRUE; // bad HW alpha testing
}
return FALSE;
}
/****************************************************************************
REMARKS:
Test the Direct3DDevice8 device for "lameness" with respect to GLDirect.
This is done by querying for particular caps, as in GLD CPL (CPLMAIN.CPP).
****************************************************************************/
BOOL IsThisD3D8DeviceLame(
IDirect3DDevice8 *pDev)
{
D3DCAPS8 d3dCaps;
HRESULT hr;
hr = IDirect3DDevice8_GetDeviceCaps(pDev, &d3dCaps);
if (FAILED(hr))
return TRUE;
// Test 1: Perspective-correct textures
// Any card that cannot do perspective-textures is *exceptionally* lame.
if (!(d3dCaps.TextureCaps & D3DPTEXTURECAPS_PERSPECTIVE)) {
return TRUE; // Lame!
}
// Test 2: Bilinear filtering
if (!(d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFLINEAR)) {
return TRUE; // Lame!
}
// Test 3: Mipmapping
if (!(d3dCaps.TextureCaps & D3DPTEXTURECAPS_MIPMAP)) {
return TRUE; // Lame!
}
// Test 4: Depth-test modes (?)
// Test 5: Blend Modes -- Based on DX7 D3DIM MTEXTURE.CPP caps test
// Accept devices that can do multipass, alpha blending
if( !((d3dCaps.DestBlendCaps & D3DPBLENDCAPS_INVSRCALPHA) &&
(d3dCaps.SrcBlendCaps & D3DPBLENDCAPS_SRCALPHA)) )
return TRUE;
// Accept devices that can do multipass, color blending
if( !((d3dCaps.DestBlendCaps & D3DPBLENDCAPS_SRCCOLOR) &&
(d3dCaps.SrcBlendCaps & D3DPBLENDCAPS_ZERO)) )
return TRUE;
// Accept devices that really support multiple textures.
if( !((d3dCaps.MaxTextureBlendStages > 1 ) &&
(d3dCaps.MaxSimultaneousTextures > 1 ) &&
(d3dCaps.TextureOpCaps & D3DTEXOPCAPS_MODULATE )) )
return TRUE;
return FALSE; // Not lame
}
@@ -1,488 +0,0 @@
;****************************************************************************
;*
;* Mesa 3-D graphics library
;* Direct3D Driver Interface
;*
;* ========================================================================
;*
;* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
;*
;* Permission is hereby granted, free of charge, to any person obtaining a
;* copy of this software and associated documentation files (the "Software"),
;* to deal in the Software without restriction, including without limitation
;* the rights to use, copy, modify, merge, publish, distribute, sublicense,
;* and/or sell copies of the Software, and to permit persons to whom the
;* Software is furnished to do so, subject to the following conditions:
;*
;* The above copyright notice and this permission notice shall be included
;* in all copies or substantial portions of the Software.
;*
;* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
;* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
;* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
;* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;* SOFTWARE.
;*
;* ======================================================================
;*
;* Language: ANSI C
;* Environment: Windows 9x/2000/XP/XBox (Win32)
;*
;* Description: DLL Module definition file
;*
;****************************************************************************/
DESCRIPTION 'GLDirect'
VERSION 3.0
EXPORTS
glAccum=glAccum @1
glAlphaFunc=glAlphaFunc @2
glAreTexturesResident=glAreTexturesResident @3
glArrayElement=glArrayElement @4
glBegin=glBegin @5
glBindTexture=glBindTexture @6
glBitmap=glBitmap @7
glBlendFunc=glBlendFunc @8
glCallList=glCallList @9
glCallLists=glCallLists @10
glClear=glClear @11
glClearAccum=glClearAccum @12
glClearIndex=glClearIndex @13
glClearColor=glClearColor @14
glClearDepth=glClearDepth @15
glClearStencil=glClearStencil @16
glClipPlane=glClipPlane @17
glColor3b=glColor3b @18
glColor3d=glColor3d @19
glColor3f=glColor3f @20
glColor3i=glColor3i @21
glColor3s=glColor3s @22
glColor3ub=glColor3ub @23
glColor3ui=glColor3ui @24
glColor3us=glColor3us @25
glColor4b=glColor4b @26
glColor4d=glColor4d @27
glColor4f=glColor4f @28
glColor4i=glColor4i @29
glColor4s=glColor4s @30
glColor4ub=glColor4ub @31
glColor4ui=glColor4ui @32
glColor4us=glColor4us @33
glColor3bv=glColor3bv @34
glColor3dv=glColor3dv @35
glColor3fv=glColor3fv @36
glColor3iv=glColor3iv @37
glColor3sv=glColor3sv @38
glColor3ubv=glColor3ubv @39
glColor3uiv=glColor3uiv @40
glColor3usv=glColor3usv @41
glColor4bv=glColor4bv @42
glColor4dv=glColor4dv @43
glColor4fv=glColor4fv @44
glColor4iv=glColor4iv @45
glColor4sv=glColor4sv @46
glColor4ubv=glColor4ubv @47
glColor4uiv=glColor4uiv @48
glColor4usv=glColor4usv @49
glColorMask=glColorMask @50
glColorMaterial=glColorMaterial @51
glColorPointer=glColorPointer @52
glColorTableEXT=glColorTableEXT @53
glColorSubTableEXT=glColorSubTableEXT @54
glCopyPixels=glCopyPixels @55
glCopyTexImage1D=glCopyTexImage1D @56
glCopyTexImage2D=glCopyTexImage2D @57
glCopyTexSubImage1D=glCopyTexSubImage1D @58
glCopyTexSubImage2D=glCopyTexSubImage2D @59
glCullFace=glCullFace @60
glDepthFunc=glDepthFunc @61
glDepthMask=glDepthMask @62
glDepthRange=glDepthRange @63
glDeleteLists=glDeleteLists @64
glDeleteTextures=glDeleteTextures @65
glDisable=glDisable @66
glDisableClientState=glDisableClientState @67
glDrawArrays=glDrawArrays @68
glDrawBuffer=glDrawBuffer @69
glDrawElements=glDrawElements @70
glDrawPixels=glDrawPixels @71
glEnable=glEnable @72
glEnableClientState=glEnableClientState @73
glEnd=glEnd @74
glEndList=glEndList @75
glEvalCoord1d=glEvalCoord1d @76
glEvalCoord1f=glEvalCoord1f @77
glEvalCoord1dv=glEvalCoord1dv @78
glEvalCoord1fv=glEvalCoord1fv @79
glEvalCoord2d=glEvalCoord2d @80
glEvalCoord2f=glEvalCoord2f @81
glEvalCoord2dv=glEvalCoord2dv @82
glEvalCoord2fv=glEvalCoord2fv @83
glEvalPoint1=glEvalPoint1 @84
glEvalPoint2=glEvalPoint2 @85
glEvalMesh1=glEvalMesh1 @86
glEdgeFlag=glEdgeFlag @87
glEdgeFlagv=glEdgeFlagv @88
glEdgeFlagPointer=glEdgeFlagPointer @89
glEvalMesh2=glEvalMesh2 @90
glFeedbackBuffer=glFeedbackBuffer @91
glFinish=glFinish @92
glFlush=glFlush @93
glFogf=glFogf @94
glFogi=glFogi @95
glFogfv=glFogfv @96
glFogiv=glFogiv @97
glFrontFace=glFrontFace @98
glFrustum=glFrustum @99
glGenLists=glGenLists @100
glGenTextures=glGenTextures @101
glGetBooleanv=glGetBooleanv @102
glGetClipPlane=glGetClipPlane @103
glGetColorTableEXT=glGetColorTableEXT @104
glGetColorTableParameterivEXT=glGetColorTableParameterivEXT @105
glGetColorTableParameterfvEXT=glGetColorTableParameterfvEXT @106
glGetDoublev=glGetDoublev @107
glGetError=glGetError @108
glGetFloatv=glGetFloatv @109
glGetIntegerv=glGetIntegerv @110
glGetLightfv=glGetLightfv @111
glGetLightiv=glGetLightiv @112
glGetMapdv=glGetMapdv @113
glGetMapfv=glGetMapfv @114
glGetMapiv=glGetMapiv @115
glGetMaterialfv=glGetMaterialfv @116
glGetMaterialiv=glGetMaterialiv @117
glGetPixelMapfv=glGetPixelMapfv @118
glGetPixelMapuiv=glGetPixelMapuiv @119
glGetPixelMapusv=glGetPixelMapusv @120
glGetPointerv=glGetPointerv @121
glGetPolygonStipple=glGetPolygonStipple @122
glGetString=glGetString @123
glGetTexEnvfv=glGetTexEnvfv @124
glGetTexEnviv=glGetTexEnviv @125
glGetTexGeniv=glGetTexGeniv @126
glGetTexGendv=glGetTexGendv @127
glGetTexGenfv=glGetTexGenfv @128
glGetTexImage=glGetTexImage @129
glGetTexLevelParameterfv=glGetTexLevelParameterfv @130
glGetTexLevelParameteriv=glGetTexLevelParameteriv @131
glGetTexParameterfv=glGetTexParameterfv @132
glGetTexParameteriv=glGetTexParameteriv @133
glHint=glHint @134
glIndexd=glIndexd @135
glIndexf=glIndexf @136
glIndexi=glIndexi @137
glIndexs=glIndexs @138
glIndexub=glIndexub @139
glIndexdv=glIndexdv @140
glIndexfv=glIndexfv @141
glIndexiv=glIndexiv @142
glIndexsv=glIndexsv @143
glIndexubv=glIndexubv @144
glIndexMask=glIndexMask @145
glIndexPointer=glIndexPointer @146
glInterleavedArrays=glInterleavedArrays @147
glInitNames=glInitNames @148
glIsList=glIsList @149
glIsTexture=glIsTexture @150
glLightf=glLightf @151
glLighti=glLighti @152
glLightfv=glLightfv @153
glLightiv=glLightiv @154
glLightModelf=glLightModelf @155
glLightModeli=glLightModeli @156
glLightModelfv=glLightModelfv @157
glLightModeliv=glLightModeliv @158
glLineWidth=glLineWidth @159
glLineStipple=glLineStipple @160
glListBase=glListBase @161
glLoadIdentity=glLoadIdentity @162
glLoadMatrixd=glLoadMatrixd @163
glLoadMatrixf=glLoadMatrixf @164
glLoadName=glLoadName @165
glLogicOp=glLogicOp @166
glMap1d=glMap1d @167
glMap1f=glMap1f @168
glMap2d=glMap2d @169
glMap2f=glMap2f @170
glMapGrid1d=glMapGrid1d @171
glMapGrid1f=glMapGrid1f @172
glMapGrid2d=glMapGrid2d @173
glMapGrid2f=glMapGrid2f @174
glMaterialf=glMaterialf @175
glMateriali=glMateriali @176
glMaterialfv=glMaterialfv @177
glMaterialiv=glMaterialiv @178
glMatrixMode=glMatrixMode @179
glMultMatrixd=glMultMatrixd @180
glMultMatrixf=glMultMatrixf @181
glNewList=glNewList @182
glNormal3b=glNormal3b @183
glNormal3d=glNormal3d @184
glNormal3f=glNormal3f @185
glNormal3i=glNormal3i @186
glNormal3s=glNormal3s @187
glNormal3bv=glNormal3bv @188
glNormal3dv=glNormal3dv @189
glNormal3fv=glNormal3fv @190
glNormal3iv=glNormal3iv @191
glNormal3sv=glNormal3sv @192
glNormalPointer=glNormalPointer @193
glOrtho=glOrtho @194
glPassThrough=glPassThrough @195
glPixelMapfv=glPixelMapfv @196
glPixelMapuiv=glPixelMapuiv @197
glPixelMapusv=glPixelMapusv @198
glPixelStoref=glPixelStoref @199
glPixelStorei=glPixelStorei @200
glPixelTransferf=glPixelTransferf @201
glPixelTransferi=glPixelTransferi @202
glPixelZoom=glPixelZoom @203
glPointSize=glPointSize @204
glPolygonMode=glPolygonMode @205
glPolygonOffset=glPolygonOffset @206
glPolygonOffsetEXT=glPolygonOffsetEXT @207
glPolygonStipple=glPolygonStipple @208
glPopAttrib=glPopAttrib @209
glPopClientAttrib=glPopClientAttrib @210
glPopMatrix=glPopMatrix @211
glPopName=glPopName @212
glPrioritizeTextures=glPrioritizeTextures @213
glPushMatrix=glPushMatrix @214
glRasterPos2d=glRasterPos2d @215
glRasterPos2f=glRasterPos2f @216
glRasterPos2i=glRasterPos2i @217
glRasterPos2s=glRasterPos2s @218
glRasterPos3d=glRasterPos3d @219
glRasterPos3f=glRasterPos3f @220
glRasterPos3i=glRasterPos3i @221
glRasterPos3s=glRasterPos3s @222
glRasterPos4d=glRasterPos4d @223
glRasterPos4f=glRasterPos4f @224
glRasterPos4i=glRasterPos4i @225
glRasterPos4s=glRasterPos4s @226
glRasterPos2dv=glRasterPos2dv @227
glRasterPos2fv=glRasterPos2fv @228
glRasterPos2iv=glRasterPos2iv @229
glRasterPos2sv=glRasterPos2sv @230
glRasterPos3dv=glRasterPos3dv @231
glRasterPos3fv=glRasterPos3fv @232
glRasterPos3iv=glRasterPos3iv @233
glRasterPos3sv=glRasterPos3sv @234
glRasterPos4dv=glRasterPos4dv @235
glRasterPos4fv=glRasterPos4fv @236
glRasterPos4iv=glRasterPos4iv @237
glRasterPos4sv=glRasterPos4sv @238
glReadBuffer=glReadBuffer @239
glReadPixels=glReadPixels @240
glRectd=glRectd @241
glRectf=glRectf @242
glRecti=glRecti @243
glRects=glRects @244
glRectdv=glRectdv @245
glRectfv=glRectfv @246
glRectiv=glRectiv @247
glRectsv=glRectsv @248
glScissor=glScissor @249
glIsEnabled=glIsEnabled @250
glPushAttrib=glPushAttrib @251
glPushClientAttrib=glPushClientAttrib @252
glPushName=glPushName @253
glRenderMode=glRenderMode @254
glRotated=glRotated @255
glRotatef=glRotatef @256
glSelectBuffer=glSelectBuffer @257
glScaled=glScaled @258
glScalef=glScalef @259
glShadeModel=glShadeModel @260
glStencilFunc=glStencilFunc @261
glStencilMask=glStencilMask @262
glStencilOp=glStencilOp @263
glTexCoord1d=glTexCoord1d @264
glTexCoord1f=glTexCoord1f @265
glTexCoord1i=glTexCoord1i @266
glTexCoord1s=glTexCoord1s @267
glTexCoord2d=glTexCoord2d @268
glTexCoord2f=glTexCoord2f @269
glTexCoord2i=glTexCoord2i @270
glTexCoord2s=glTexCoord2s @271
glTexCoord3d=glTexCoord3d @272
glTexCoord3f=glTexCoord3f @273
glTexCoord3i=glTexCoord3i @274
glTexCoord3s=glTexCoord3s @275
glTexCoord4d=glTexCoord4d @276
glTexCoord4f=glTexCoord4f @277
glTexCoord4i=glTexCoord4i @278
glTexCoord4s=glTexCoord4s @279
glTexCoord1dv=glTexCoord1dv @280
glTexCoord1fv=glTexCoord1fv @281
glTexCoord1iv=glTexCoord1iv @282
glTexCoord1sv=glTexCoord1sv @283
glTexCoord2dv=glTexCoord2dv @284
glTexCoord2fv=glTexCoord2fv @285
glTexCoord2iv=glTexCoord2iv @286
glTexCoord2sv=glTexCoord2sv @287
glTexCoord3dv=glTexCoord3dv @288
glTexCoord3fv=glTexCoord3fv @289
glTexCoord3iv=glTexCoord3iv @290
glTexCoord3sv=glTexCoord3sv @291
glTexCoord4dv=glTexCoord4dv @292
glTexCoord4fv=glTexCoord4fv @293
glTexCoord4iv=glTexCoord4iv @294
glTexCoord4sv=glTexCoord4sv @295
glTexCoordPointer=glTexCoordPointer @296
glTexGend=glTexGend @297
glTexGenf=glTexGenf @298
glTexGeni=glTexGeni @299
glTexGendv=glTexGendv @300
glTexGeniv=glTexGeniv @301
glTexGenfv=glTexGenfv @302
glTexEnvf=glTexEnvf @303
glTexEnvi=glTexEnvi @304
glTexEnvfv=glTexEnvfv @305
glTexEnviv=glTexEnviv @306
glTexImage1D=glTexImage1D @307
glTexImage2D=glTexImage2D @308
glTexParameterf=glTexParameterf @309
glTexParameteri=glTexParameteri @310
glTexParameterfv=glTexParameterfv @311
glTexParameteriv=glTexParameteriv @312
glTexSubImage1D=glTexSubImage1D @313
glTexSubImage2D=glTexSubImage2D @314
glTranslated=glTranslated @315
glTranslatef=glTranslatef @316
glVertex2d=glVertex2d @317
glVertex2f=glVertex2f @318
glVertex2i=glVertex2i @319
glVertex2s=glVertex2s @320
glVertex3d=glVertex3d @321
glVertex3f=glVertex3f @322
glVertex3i=glVertex3i @323
glVertex3s=glVertex3s @324
glVertex4d=glVertex4d @325
glVertex4f=glVertex4f @326
glVertex4i=glVertex4i @327
glVertex4s=glVertex4s @328
glVertex2dv=glVertex2dv @329
glVertex2fv=glVertex2fv @330
glVertex2iv=glVertex2iv @331
glVertex2sv=glVertex2sv @332
glVertex3dv=glVertex3dv @333
glVertex3fv=glVertex3fv @334
glVertex3iv=glVertex3iv @335
glVertex3sv=glVertex3sv @336
glVertex4dv=glVertex4dv @337
glVertex4fv=glVertex4fv @338
glVertex4iv=glVertex4iv @339
glVertex4sv=glVertex4sv @340
glVertexPointer=glVertexPointer @341
glViewport=glViewport @342
glBlendEquationEXT=glBlendEquationEXT @343
glBlendColorEXT=glBlendColorEXT @344
glVertexPointerEXT=glVertexPointerEXT @345
glNormalPointerEXT=glNormalPointerEXT @346
glColorPointerEXT=glColorPointerEXT @347
glIndexPointerEXT=glIndexPointerEXT @348
glTexCoordPointerEXT=glTexCoordPointerEXT @349
glEdgeFlagPointerEXT=glEdgeFlagPointerEXT @350
glGetPointervEXT=glGetPointervEXT @351
glArrayElementEXT=glArrayElementEXT @352
glDrawArraysEXT=glDrawArraysEXT @353
glBindTextureEXT=glBindTextureEXT @354
glDeleteTexturesEXT=glDeleteTexturesEXT @355
glGenTexturesEXT=glGenTexturesEXT @356
glPrioritizeTexturesEXT=glPrioritizeTexturesEXT @357
glCopyTexSubImage3DEXT=glCopyTexSubImage3DEXT @358
glTexImage3DEXT=glTexImage3DEXT @359
glTexSubImage3DEXT=glTexSubImage3DEXT @360
glWindowPos4fMESA=glWindowPos4fMESA @361
glWindowPos2iMESA=glWindowPos2iMESA @362
glWindowPos2sMESA=glWindowPos2sMESA @363
glWindowPos2fMESA=glWindowPos2fMESA @364
glWindowPos2dMESA=glWindowPos2dMESA @365
glWindowPos2ivMESA=glWindowPos2ivMESA @366
glWindowPos2svMESA=glWindowPos2svMESA @367
glWindowPos2fvMESA=glWindowPos2fvMESA @368
glWindowPos2dvMESA=glWindowPos2dvMESA @369
glWindowPos3iMESA=glWindowPos3iMESA @370
glWindowPos3sMESA=glWindowPos3sMESA @371
glWindowPos3fMESA=glWindowPos3fMESA @372
glWindowPos3dMESA=glWindowPos3dMESA @373
glWindowPos3ivMESA=glWindowPos3ivMESA @374
glWindowPos3svMESA=glWindowPos3svMESA @375
glWindowPos3fvMESA=glWindowPos3fvMESA @376
glWindowPos3dvMESA=glWindowPos3dvMESA @377
glWindowPos4iMESA=glWindowPos4iMESA @378
glWindowPos4sMESA=glWindowPos4sMESA @379
glWindowPos4dMESA=glWindowPos4dMESA @380
glWindowPos4ivMESA=glWindowPos4ivMESA @381
glWindowPos4svMESA=glWindowPos4svMESA @382
glWindowPos4fvMESA=glWindowPos4fvMESA @383
glWindowPos4dvMESA=glWindowPos4dvMESA @384
glResizeBuffersMESA=glResizeBuffersMESA @385
wglCopyContext=wglCopyContext @386
wglCreateContext=wglCreateContext @387
wglCreateLayerContext=wglCreateLayerContext @388
wglDeleteContext=wglDeleteContext @389
wglDescribeLayerPlane=wglDescribeLayerPlane @390
wglGetCurrentContext=wglGetCurrentContext @391
wglGetCurrentDC=wglGetCurrentDC @392
wglGetLayerPaletteEntries=wglGetLayerPaletteEntries @393
wglGetProcAddress=wglGetProcAddress @394
wglMakeCurrent=wglMakeCurrent @395
wglRealizeLayerPalette=wglRealizeLayerPalette @396
wglSetLayerPaletteEntries=wglSetLayerPaletteEntries @397
wglShareLists=wglShareLists @398
wglSwapLayerBuffers=wglSwapLayerBuffers @399
wglUseFontBitmapsA=wglUseFontBitmapsA @400
wglUseFontBitmapsW=wglUseFontBitmapsW @401
wglUseFontOutlinesA=wglUseFontOutlinesA @402
wglUseFontOutlinesW=wglUseFontOutlinesW @403
ChoosePixelFormat=ChoosePixelFormat @404
DescribePixelFormat=DescribePixelFormat @405
GetPixelFormat=GetPixelFormat @406
SetPixelFormat=SetPixelFormat @407
SwapBuffers=SwapBuffers @408
wglChoosePixelFormat=wglChoosePixelFormat @409
wglDescribePixelFormat=wglDescribePixelFormat @410
wglGetPixelFormat=wglGetPixelFormat @411
wglSetPixelFormat=wglSetPixelFormat @412
wglSwapBuffers=wglSwapBuffers @413
glActiveTextureARB=glActiveTextureARB @414
glClientActiveTextureARB=glClientActiveTextureARB @415
glMultiTexCoord1dARB=glMultiTexCoord1dARB @416
glMultiTexCoord1dvARB=glMultiTexCoord1dvARB @417
glMultiTexCoord1fARB=glMultiTexCoord1fARB @418
glMultiTexCoord1fvARB=glMultiTexCoord1fvARB @419
glMultiTexCoord1iARB=glMultiTexCoord1iARB @420
glMultiTexCoord1ivARB=glMultiTexCoord1ivARB @421
glMultiTexCoord1sARB=glMultiTexCoord1sARB @422
glMultiTexCoord1svARB=glMultiTexCoord1svARB @423
glMultiTexCoord2dARB=glMultiTexCoord2dARB @424
glMultiTexCoord2dvARB=glMultiTexCoord2dvARB @425
glMultiTexCoord2fARB=glMultiTexCoord2fARB @426
glMultiTexCoord2fvARB=glMultiTexCoord2fvARB @427
glMultiTexCoord2iARB=glMultiTexCoord2iARB @428
glMultiTexCoord2ivARB=glMultiTexCoord2ivARB @429
glMultiTexCoord2sARB=glMultiTexCoord2sARB @430
glMultiTexCoord2svARB=glMultiTexCoord2svARB @431
glMultiTexCoord3dARB=glMultiTexCoord3dARB @432
glMultiTexCoord3dvARB=glMultiTexCoord3dvARB @433
glMultiTexCoord3fARB=glMultiTexCoord3fARB @434
glMultiTexCoord3fvARB=glMultiTexCoord3fvARB @435
glMultiTexCoord3iARB=glMultiTexCoord3iARB @436
glMultiTexCoord3ivARB=glMultiTexCoord3ivARB @437
glMultiTexCoord3sARB=glMultiTexCoord3sARB @438
glMultiTexCoord3svARB=glMultiTexCoord3svARB @439
glMultiTexCoord4dARB=glMultiTexCoord4dARB @440
glMultiTexCoord4dvARB=glMultiTexCoord4dvARB @441
glMultiTexCoord4fARB=glMultiTexCoord4fARB @442
glMultiTexCoord4fvARB=glMultiTexCoord4fvARB @443
glMultiTexCoord4iARB=glMultiTexCoord4iARB @444
glMultiTexCoord4ivARB=glMultiTexCoord4ivARB @445
glMultiTexCoord4sARB=glMultiTexCoord4sARB @446
glMultiTexCoord4svARB=glMultiTexCoord4svARB @447
@@ -1,108 +0,0 @@
/****************************************************************************
*
* Mesa 3-D graphics library
* Direct3D Driver Interface
*
* ========================================================================
*
* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* ======================================================================
*
* Language: ANSI C
* Environment: Windows 9x (Win32)
*
* Description: Pixel packing functions.
*
****************************************************************************/
#ifndef __PIXPACK_H
#define __PIXPACK_H
#include <GL\gl.h>
#include <ddraw.h>
#include "ddlog.h"
/*---------------------- Macros and type definitions ----------------------*/
#define PXAPI
// Typedef that can be used for pixel packing function pointers.
#define PX_PACK_FUNC(a) void PXAPI (a)(unsigned char *pixdata, void *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2)
typedef void (PXAPI *PX_packFunc)(unsigned char *pixdata, void *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2);
// Typedef that can be used for pixel unpacking function pointers.
#define PX_UNPACK_FUNC(a) void PXAPI (a)(unsigned char *pixdata, void *src, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2)
typedef void (PXAPI *PX_unpackFunc)(unsigned char *pixdata, void *src, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2);
// Typedef that can be used for pixel span packing function pointers.
#define PX_PACK_SPAN_FUNC(a) void PXAPI (a)(GLuint n, unsigned char *pixdata, unsigned char *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2)
typedef void (PXAPI *PX_packSpanFunc)(GLuint n, unsigned char *pixdata, unsigned char *dst, GLenum Format, const LPDDSURFACEDESC2 lpDDSD2);
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
// Function that examines a pixel format and returns the relevent
// pixel-packing function
void PXAPI pxClassifyPixelFormat(const LPDDPIXELFORMAT lpddpf, PX_packFunc *lpPackFn ,PX_unpackFunc *lpUnpackFn, PX_packSpanFunc *lpPackSpanFn);
// Packing functions
PX_PACK_FUNC(pxPackGeneric);
PX_PACK_FUNC(pxPackRGB555);
PX_PACK_FUNC(pxPackARGB4444);
PX_PACK_FUNC(pxPackARGB1555);
PX_PACK_FUNC(pxPackRGB565);
PX_PACK_FUNC(pxPackRGB332);
PX_PACK_FUNC(pxPackRGB888);
PX_PACK_FUNC(pxPackARGB8888);
PX_PACK_FUNC(pxPackPAL8);
// Unpacking functions
PX_UNPACK_FUNC(pxUnpackGeneric);
PX_UNPACK_FUNC(pxUnpackRGB555);
PX_UNPACK_FUNC(pxUnpackARGB4444);
PX_UNPACK_FUNC(pxUnpackARGB1555);
PX_UNPACK_FUNC(pxUnpackRGB565);
PX_UNPACK_FUNC(pxUnpackRGB332);
PX_UNPACK_FUNC(pxUnpackRGB888);
PX_UNPACK_FUNC(pxUnpackARGB8888);
PX_UNPACK_FUNC(pxUnpackPAL8);
// Span Packing functions
PX_PACK_SPAN_FUNC(pxPackSpanGeneric);
PX_PACK_SPAN_FUNC(pxPackSpanRGB555);
PX_PACK_SPAN_FUNC(pxPackSpanARGB4444);
PX_PACK_SPAN_FUNC(pxPackSpanARGB1555);
PX_PACK_SPAN_FUNC(pxPackSpanRGB565);
PX_PACK_SPAN_FUNC(pxPackSpanRGB332);
PX_PACK_SPAN_FUNC(pxPackSpanRGB888);
PX_PACK_SPAN_FUNC(pxPackSpanARGB8888);
PX_PACK_SPAN_FUNC(pxPackSpanPAL8);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,347 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* File name: icd.c
* Author: Gregor Anich
*
* ICD (Installable Client Driver) interface.
* Based on the windows GDI/WGL driver.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <windows.h>
#define GL_GLEXT_PROTOTYPES
#include "GL/gl.h"
#include "GL/glext.h"
#ifdef __cplusplus
}
#endif
#include <stdio.h>
#include <tchar.h>
#include "GL/wmesa.h"
#include "mtypes.h"
#include "glapi.h"
#define MAX_MESA_ATTRS 20
typedef struct wmesa_context *PWMC;
typedef struct _icdTable {
DWORD size;
PROC table[336];
} ICDTABLE, *PICDTABLE;
#ifdef USE_MGL_NAMESPACE
# define GL_FUNC(func) mgl##func
#else
# define GL_FUNC(func) gl##func
#endif
static ICDTABLE icdTable = { 336, {
#define ICD_ENTRY(func) (PROC)GL_FUNC(func),
#include "icdlist.h"
#undef ICD_ENTRY
} };
struct __pixelformat__
{
PIXELFORMATDESCRIPTOR pfd;
GLboolean doubleBuffered;
};
struct __pixelformat__ pix[] =
{
/* Double Buffer, alpha */
{ { sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER|PFD_SWAP_COPY,
PFD_TYPE_RGBA,
24, 8, 0, 8, 8, 8, 16, 8, 24,
0, 0, 0, 0, 0, 16, 8, 0, 0, 0, 0, 0, 0 },
GL_TRUE
},
/* Single Buffer, alpha */
{ { sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL, /* | PFD_SUPPORT_GDI ? */
PFD_TYPE_RGBA,
24, 8, 0, 8, 8, 8, 16, 8, 24,
0, 0, 0, 0, 0, 16, 8, 0, 0, 0, 0, 0, 0 },
GL_FALSE
},
/* Double Buffer, no alpha */
{ { sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER|PFD_SWAP_COPY,
PFD_TYPE_RGBA,
24, 8, 0, 8, 8, 8, 16, 0, 0,
0, 0, 0, 0, 0, 16, 8, 0, 0, 0, 0, 0, 0 },
GL_TRUE
},
/* Single Buffer, no alpha */
{ { sizeof(PIXELFORMATDESCRIPTOR), 1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL, /* | PFD_SUPPORT_GDI ? */
PFD_TYPE_RGBA,
24, 8, 0, 8, 8, 8, 16, 0, 0,
0, 0, 0, 0, 0, 16, 8, 0, 0, 0, 0, 0, 0 },
GL_FALSE
},
};
int qt_pix = sizeof(pix) / sizeof(pix[0]);
typedef struct {
WMesaContext ctx;
HDC hdc;
} MesaWglCtx;
#define MESAWGL_CTX_MAX_COUNT 20
static MesaWglCtx wgl_ctx[MESAWGL_CTX_MAX_COUNT];
static unsigned ctx_count = 0;
static int ctx_current = -1;
static unsigned curPFD = 0;
WGLAPI BOOL GLAPIENTRY DrvCopyContext(HGLRC hglrcSrc,HGLRC hglrcDst,UINT mask)
{
(void) hglrcSrc; (void) hglrcDst; (void) mask;
return(FALSE);
}
WGLAPI HGLRC GLAPIENTRY DrvCreateContext(HDC hdc)
{
HWND hWnd;
int i = 0;
if(!(hWnd = WindowFromDC(hdc)))
{
SetLastError(0);
return(NULL);
}
if (!ctx_count)
{
for(i=0;i<MESAWGL_CTX_MAX_COUNT;i++)
{
wgl_ctx[i].ctx = NULL;
wgl_ctx[i].hdc = NULL;
}
}
for( i = 0; i < MESAWGL_CTX_MAX_COUNT; i++ )
{
if ( wgl_ctx[i].ctx == NULL )
{
wgl_ctx[i].ctx = WMesaCreateContext( hWnd, NULL, GL_TRUE,
pix[curPFD-1].doubleBuffered,
pix[curPFD-1].pfd.cAlphaBits ? GL_TRUE : GL_FALSE);
if (wgl_ctx[i].ctx == NULL)
break;
wgl_ctx[i].hdc = hdc;
ctx_count++;
return ((HGLRC)wgl_ctx[i].ctx);
}
}
SetLastError(0);
return(NULL);
}
WGLAPI BOOL GLAPIENTRY DrvDeleteContext(HGLRC hglrc)
{
int i;
for ( i = 0; i < MESAWGL_CTX_MAX_COUNT; i++ )
{
if ( wgl_ctx[i].ctx == (PWMC) hglrc )
{
WMesaMakeCurrent((PWMC) hglrc);
WMesaDestroyContext();
wgl_ctx[i].ctx = NULL;
wgl_ctx[i].hdc = NULL;
ctx_count--;
return(TRUE);
}
}
SetLastError(0);
return(FALSE);
}
WGLAPI HGLRC GLAPIENTRY DrvCreateLayerContext(HDC hdc,int iLayerPlane)
{
if (iLayerPlane == 0)
return DrvCreateContext(hdc);
SetLastError(0);
return(NULL);
}
WGLAPI PICDTABLE GLAPIENTRY DrvSetContext(HDC hdc,HGLRC hglrc,void *callback)
{
int i;
(void) callback;
/* new code suggested by Andy Sy */
if (!hdc || !hglrc) {
WMesaMakeCurrent(NULL);
ctx_current = -1;
return NULL;
}
for ( i = 0; i < MESAWGL_CTX_MAX_COUNT; i++ )
{
if ( wgl_ctx[i].ctx == (PWMC) hglrc )
{
wgl_ctx[i].hdc = hdc;
WMesaMakeCurrent( (PWMC) hglrc );
ctx_current = i;
return &icdTable;
}
}
return NULL;
}
WGLAPI void GLAPIENTRY DrvReleaseContext(HGLRC hglrc)
{
(void) hglrc;
WMesaMakeCurrent(NULL);
ctx_current = -1;
}
WGLAPI BOOL GLAPIENTRY DrvShareLists(HGLRC hglrc1,HGLRC hglrc2)
{
(void) hglrc1; (void) hglrc2;
return(TRUE);
}
WGLAPI BOOL GLAPIENTRY DrvDescribeLayerPlane(HDC hdc,int iPixelFormat,
int iLayerPlane,UINT nBytes,
LPLAYERPLANEDESCRIPTOR plpd)
{
(void) hdc; (void) iPixelFormat; (void) iLayerPlane; (void) nBytes; (void) plpd;
SetLastError(0);
return(FALSE);
}
WGLAPI int GLAPIENTRY DrvSetLayerPaletteEntries(HDC hdc,int iLayerPlane,
int iStart,int cEntries,
CONST COLORREF *pcr)
{
(void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
WGLAPI int GLAPIENTRY DrvGetLayerPaletteEntries(HDC hdc,int iLayerPlane,
int iStart,int cEntries,
COLORREF *pcr)
{
(void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
WGLAPI BOOL GLAPIENTRY DrvRealizeLayerPalette(HDC hdc,int iLayerPlane,BOOL bRealize)
{
(void) hdc; (void) iLayerPlane; (void) bRealize;
SetLastError(0);
return(FALSE);
}
WGLAPI BOOL GLAPIENTRY DrvSwapLayerBuffers(HDC hdc,UINT fuPlanes)
{
(void) fuPlanes;
if( !hdc )
{
WMesaSwapBuffers();
return(TRUE);
}
SetLastError(0);
return(FALSE);
}
WGLAPI int GLAPIENTRY DrvDescribePixelFormat(HDC hdc,int iPixelFormat,UINT nBytes,
LPPIXELFORMATDESCRIPTOR ppfd)
{
int qt_valid_pix;
(void) hdc;
qt_valid_pix = qt_pix;
if(ppfd == NULL)
return(qt_valid_pix);
if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || nBytes != sizeof(PIXELFORMATDESCRIPTOR))
{
SetLastError(0);
return(0);
}
*ppfd = pix[iPixelFormat - 1].pfd;
return(qt_valid_pix);
}
/*
* GetProcAddress - return the address of an appropriate extension
*/
WGLAPI PROC GLAPIENTRY DrvGetProcAddress(LPCSTR lpszProc)
{
PROC p = (PROC) (int) _glapi_get_proc_address((const char *) lpszProc);
if (p)
return p;
SetLastError(0);
return(NULL);
}
WGLAPI BOOL GLAPIENTRY DrvSetPixelFormat(HDC hdc,int iPixelFormat)
{
int qt_valid_pix;
(void) hdc;
qt_valid_pix = qt_pix;
if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix)
{
SetLastError(0);
return(FALSE);
}
curPFD = iPixelFormat;
return(TRUE);
}
WGLAPI BOOL GLAPIENTRY DrvSwapBuffers(HDC hdc)
{
(void) hdc;
if (ctx_current < 0)
return FALSE;
if(wgl_ctx[ctx_current].ctx == NULL) {
SetLastError(0);
return(FALSE);
}
WMesaSwapBuffers();
return(TRUE);
}
WGLAPI BOOL GLAPIENTRY DrvValidateVersion(DWORD version)
{
(void) version;
return TRUE;
}
@@ -1,336 +0,0 @@
ICD_ENTRY(NewList) /* 0 */
ICD_ENTRY(EndList) /* 1 */
ICD_ENTRY(CallList) /* 2 */
ICD_ENTRY(CallLists) /* 3 */
ICD_ENTRY(DeleteLists) /* 4 */
ICD_ENTRY(GenLists) /* 5 */
ICD_ENTRY(ListBase) /* 6 */
ICD_ENTRY(Begin) /* 7 */
ICD_ENTRY(Bitmap) /* 8 */
ICD_ENTRY(Color3b) /* 9 */
ICD_ENTRY(Color3bv) /* 10 */
ICD_ENTRY(Color3d) /* 11 */
ICD_ENTRY(Color3dv) /* 12 */
ICD_ENTRY(Color3f) /* 13 */
ICD_ENTRY(Color3fv) /* 14 */
ICD_ENTRY(Color3i) /* 15 */
ICD_ENTRY(Color3iv) /* 16 */
ICD_ENTRY(Color3s) /* 17 */
ICD_ENTRY(Color3sv) /* 18 */
ICD_ENTRY(Color3ub) /* 19 */
ICD_ENTRY(Color3ubv) /* 20 */
ICD_ENTRY(Color3ui) /* 21 */
ICD_ENTRY(Color3uiv) /* 22 */
ICD_ENTRY(Color3us) /* 23 */
ICD_ENTRY(Color3usv) /* 24 */
ICD_ENTRY(Color4b) /* 25 */
ICD_ENTRY(Color4bv) /* 26 */
ICD_ENTRY(Color4d) /* 27 */
ICD_ENTRY(Color4dv) /* 28 */
ICD_ENTRY(Color4f) /* 29 */
ICD_ENTRY(Color4fv) /* 30 */
ICD_ENTRY(Color4i) /* 31 */
ICD_ENTRY(Color4iv) /* 32 */
ICD_ENTRY(Color4s) /* 33 */
ICD_ENTRY(Color4sv) /* 34 */
ICD_ENTRY(Color4ub) /* 35 */
ICD_ENTRY(Color4ubv) /* 36 */
ICD_ENTRY(Color4ui) /* 37 */
ICD_ENTRY(Color4uiv) /* 38 */
ICD_ENTRY(Color4us) /* 39 */
ICD_ENTRY(Color4usv) /* 40 */
ICD_ENTRY(EdgeFlag) /* 41 */
ICD_ENTRY(EdgeFlagv) /* 42 */
ICD_ENTRY(End) /* 43 */
ICD_ENTRY(Indexd) /* 44 */
ICD_ENTRY(Indexdv) /* 45 */
ICD_ENTRY(Indexf) /* 46 */
ICD_ENTRY(Indexfv) /* 47 */
ICD_ENTRY(Indexi) /* 48 */
ICD_ENTRY(Indexiv) /* 49 */
ICD_ENTRY(Indexs) /* 50 */
ICD_ENTRY(Indexsv) /* 51 */
ICD_ENTRY(Normal3b) /* 52 */
ICD_ENTRY(Normal3bv) /* 53 */
ICD_ENTRY(Normal3d) /* 54 */
ICD_ENTRY(Normal3dv) /* 55 */
ICD_ENTRY(Normal3f) /* 56 */
ICD_ENTRY(Normal3fv) /* 57 */
ICD_ENTRY(Normal3i) /* 58 */
ICD_ENTRY(Normal3iv) /* 59 */
ICD_ENTRY(Normal3s) /* 60 */
ICD_ENTRY(Normal3sv) /* 61 */
ICD_ENTRY(RasterPos2d) /* 62 */
ICD_ENTRY(RasterPos2dv) /* 63 */
ICD_ENTRY(RasterPos2f) /* 64 */
ICD_ENTRY(RasterPos2fv) /* 65 */
ICD_ENTRY(RasterPos2i) /* 66 */
ICD_ENTRY(RasterPos2iv) /* 67 */
ICD_ENTRY(RasterPos2s) /* 68 */
ICD_ENTRY(RasterPos2sv) /* 69 */
ICD_ENTRY(RasterPos3d) /* 70 */
ICD_ENTRY(RasterPos3dv) /* 71 */
ICD_ENTRY(RasterPos3f) /* 72 */
ICD_ENTRY(RasterPos3fv) /* 73 */
ICD_ENTRY(RasterPos3i) /* 74 */
ICD_ENTRY(RasterPos3iv) /* 75 */
ICD_ENTRY(RasterPos3s) /* 76 */
ICD_ENTRY(RasterPos3sv) /* 77 */
ICD_ENTRY(RasterPos4d) /* 78 */
ICD_ENTRY(RasterPos4dv) /* 79 */
ICD_ENTRY(RasterPos4f) /* 80 */
ICD_ENTRY(RasterPos4fv) /* 81 */
ICD_ENTRY(RasterPos4i) /* 82 */
ICD_ENTRY(RasterPos4iv) /* 83 */
ICD_ENTRY(RasterPos4s) /* 84 */
ICD_ENTRY(RasterPos4sv) /* 85 */
ICD_ENTRY(Rectd) /* 86 */
ICD_ENTRY(Rectdv) /* 87 */
ICD_ENTRY(Rectf) /* 88 */
ICD_ENTRY(Rectfv) /* 89 */
ICD_ENTRY(Recti) /* 90 */
ICD_ENTRY(Rectiv) /* 91 */
ICD_ENTRY(Rects) /* 92 */
ICD_ENTRY(Rectsv) /* 93 */
ICD_ENTRY(TexCoord1d) /* 94 */
ICD_ENTRY(TexCoord1dv) /* 95 */
ICD_ENTRY(TexCoord1f) /* 96 */
ICD_ENTRY(TexCoord1fv) /* 97 */
ICD_ENTRY(TexCoord1i) /* 98 */
ICD_ENTRY(TexCoord1iv) /* 99 */
ICD_ENTRY(TexCoord1s) /* 100 */
ICD_ENTRY(TexCoord1sv) /* 101 */
ICD_ENTRY(TexCoord2d) /* 102 */
ICD_ENTRY(TexCoord2dv) /* 103 */
ICD_ENTRY(TexCoord2f) /* 104 */
ICD_ENTRY(TexCoord2fv) /* 105 */
ICD_ENTRY(TexCoord2i) /* 106 */
ICD_ENTRY(TexCoord2iv) /* 107 */
ICD_ENTRY(TexCoord2s) /* 108 */
ICD_ENTRY(TexCoord2sv) /* 109 */
ICD_ENTRY(TexCoord3d) /* 110 */
ICD_ENTRY(TexCoord3dv) /* 111 */
ICD_ENTRY(TexCoord3f) /* 112 */
ICD_ENTRY(TexCoord3fv) /* 113 */
ICD_ENTRY(TexCoord3i) /* 114 */
ICD_ENTRY(TexCoord3iv) /* 115 */
ICD_ENTRY(TexCoord3s) /* 116 */
ICD_ENTRY(TexCoord3sv) /* 117 */
ICD_ENTRY(TexCoord4d) /* 118 */
ICD_ENTRY(TexCoord4dv) /* 119 */
ICD_ENTRY(TexCoord4f) /* 120 */
ICD_ENTRY(TexCoord4fv) /* 121 */
ICD_ENTRY(TexCoord4i) /* 122 */
ICD_ENTRY(TexCoord4iv) /* 123 */
ICD_ENTRY(TexCoord4s) /* 124 */
ICD_ENTRY(TexCoord4sv) /* 125 */
ICD_ENTRY(Vertex2d) /* 126 */
ICD_ENTRY(Vertex2dv) /* 127 */
ICD_ENTRY(Vertex2f) /* 128 */
ICD_ENTRY(Vertex2fv) /* 129 */
ICD_ENTRY(Vertex2i) /* 130 */
ICD_ENTRY(Vertex2iv) /* 131 */
ICD_ENTRY(Vertex2s) /* 132 */
ICD_ENTRY(Vertex2sv) /* 133 */
ICD_ENTRY(Vertex3d) /* 134 */
ICD_ENTRY(Vertex3dv) /* 135 */
ICD_ENTRY(Vertex3f) /* 136 */
ICD_ENTRY(Vertex3fv) /* 137 */
ICD_ENTRY(Vertex3i) /* 138 */
ICD_ENTRY(Vertex3iv) /* 139 */
ICD_ENTRY(Vertex3s) /* 140 */
ICD_ENTRY(Vertex3sv) /* 141 */
ICD_ENTRY(Vertex4d) /* 142 */
ICD_ENTRY(Vertex4dv) /* 143 */
ICD_ENTRY(Vertex4f) /* 144 */
ICD_ENTRY(Vertex4fv) /* 145 */
ICD_ENTRY(Vertex4i) /* 146 */
ICD_ENTRY(Vertex4iv) /* 147 */
ICD_ENTRY(Vertex4s) /* 148 */
ICD_ENTRY(Vertex4sv) /* 149 */
ICD_ENTRY(ClipPlane) /* 150 */
ICD_ENTRY(ColorMaterial) /* 151 */
ICD_ENTRY(CullFace) /* 152 */
ICD_ENTRY(Fogf) /* 153 */
ICD_ENTRY(Fogfv) /* 154 */
ICD_ENTRY(Fogi) /* 155 */
ICD_ENTRY(Fogiv) /* 156 */
ICD_ENTRY(FrontFace) /* 157 */
ICD_ENTRY(Hint) /* 158 */
ICD_ENTRY(Lightf) /* 159 */
ICD_ENTRY(Lightfv) /* 160 */
ICD_ENTRY(Lighti) /* 161 */
ICD_ENTRY(Lightiv) /* 162 */
ICD_ENTRY(LightModelf) /* 163 */
ICD_ENTRY(LightModelfv) /* 164 */
ICD_ENTRY(LightModeli) /* 165 */
ICD_ENTRY(LightModeliv) /* 166 */
ICD_ENTRY(LineStipple) /* 167 */
ICD_ENTRY(LineWidth) /* 168 */
ICD_ENTRY(Materialf) /* 169 */
ICD_ENTRY(Materialfv) /* 170 */
ICD_ENTRY(Materiali) /* 171 */
ICD_ENTRY(Materialiv) /* 172 */
ICD_ENTRY(PointSize) /* 173 */
ICD_ENTRY(PolygonMode) /* 174 */
ICD_ENTRY(PolygonStipple) /* 175 */
ICD_ENTRY(Scissor) /* 176 */
ICD_ENTRY(ShadeModel) /* 177 */
ICD_ENTRY(TexParameterf) /* 178 */
ICD_ENTRY(TexParameterfv) /* 179 */
ICD_ENTRY(TexParameteri) /* 180 */
ICD_ENTRY(TexParameteriv) /* 181 */
ICD_ENTRY(TexImage1D) /* 182 */
ICD_ENTRY(TexImage2D) /* 183 */
ICD_ENTRY(TexEnvf) /* 184 */
ICD_ENTRY(TexEnvfv) /* 185 */
ICD_ENTRY(TexEnvi) /* 186 */
ICD_ENTRY(TexEnviv) /* 187 */
ICD_ENTRY(TexGend) /* 188 */
ICD_ENTRY(TexGendv) /* 189 */
ICD_ENTRY(TexGenf) /* 190 */
ICD_ENTRY(TexGenfv) /* 191 */
ICD_ENTRY(TexGeni) /* 192 */
ICD_ENTRY(TexGeniv) /* 193 */
ICD_ENTRY(FeedbackBuffer) /* 194 */
ICD_ENTRY(SelectBuffer) /* 195 */
ICD_ENTRY(RenderMode) /* 196 */
ICD_ENTRY(InitNames) /* 197 */
ICD_ENTRY(LoadName) /* 198 */
ICD_ENTRY(PassThrough) /* 199 */
ICD_ENTRY(PopName) /* 200 */
ICD_ENTRY(PushName) /* 201 */
ICD_ENTRY(DrawBuffer) /* 202 */
ICD_ENTRY(Clear) /* 203 */
ICD_ENTRY(ClearAccum) /* 204 */
ICD_ENTRY(ClearIndex) /* 205 */
ICD_ENTRY(ClearColor) /* 206 */
ICD_ENTRY(ClearStencil) /* 207 */
ICD_ENTRY(ClearDepth) /* 208 */
ICD_ENTRY(StencilMask) /* 209 */
ICD_ENTRY(ColorMask) /* 210 */
ICD_ENTRY(DepthMask) /* 211 */
ICD_ENTRY(IndexMask) /* 212 */
ICD_ENTRY(Accum) /* 213 */
ICD_ENTRY(Disable) /* 214 */
ICD_ENTRY(Enable) /* 215 */
ICD_ENTRY(Finish) /* 216 */
ICD_ENTRY(Flush) /* 217 */
ICD_ENTRY(PopAttrib) /* 218 */
ICD_ENTRY(PushAttrib) /* 219 */
ICD_ENTRY(Map1d) /* 220 */
ICD_ENTRY(Map1f) /* 221 */
ICD_ENTRY(Map2d) /* 222 */
ICD_ENTRY(Map2f) /* 223 */
ICD_ENTRY(MapGrid1d) /* 224 */
ICD_ENTRY(MapGrid1f) /* 225 */
ICD_ENTRY(MapGrid2d) /* 226 */
ICD_ENTRY(MapGrid2f) /* 227 */
ICD_ENTRY(EvalCoord1d) /* 228 */
ICD_ENTRY(EvalCoord1dv) /* 229 */
ICD_ENTRY(EvalCoord1f) /* 230 */
ICD_ENTRY(EvalCoord1fv) /* 231 */
ICD_ENTRY(EvalCoord2d) /* 232 */
ICD_ENTRY(EvalCoord2dv) /* 233 */
ICD_ENTRY(EvalCoord2f) /* 234 */
ICD_ENTRY(EvalCoord2fv) /* 235 */
ICD_ENTRY(EvalMesh1) /* 236 */
ICD_ENTRY(EvalPoint1) /* 237 */
ICD_ENTRY(EvalMesh2) /* 238 */
ICD_ENTRY(EvalPoint2) /* 239 */
ICD_ENTRY(AlphaFunc) /* 240 */
ICD_ENTRY(BlendFunc) /* 241 */
ICD_ENTRY(LogicOp) /* 242 */
ICD_ENTRY(StencilFunc) /* 243 */
ICD_ENTRY(StencilOp) /* 244 */
ICD_ENTRY(DepthFunc) /* 245 */
ICD_ENTRY(PixelZoom) /* 246 */
ICD_ENTRY(PixelTransferf) /* 247 */
ICD_ENTRY(PixelTransferi) /* 248 */
ICD_ENTRY(PixelStoref) /* 249 */
ICD_ENTRY(PixelStorei) /* 250 */
ICD_ENTRY(PixelMapfv) /* 251 */
ICD_ENTRY(PixelMapuiv) /* 252 */
ICD_ENTRY(PixelMapusv) /* 253 */
ICD_ENTRY(ReadBuffer) /* 254 */
ICD_ENTRY(CopyPixels) /* 255 */
ICD_ENTRY(ReadPixels) /* 256 */
ICD_ENTRY(DrawPixels) /* 257 */
ICD_ENTRY(GetBooleanv) /* 258 */
ICD_ENTRY(GetClipPlane) /* 259 */
ICD_ENTRY(GetDoublev) /* 260 */
ICD_ENTRY(GetError) /* 261 */
ICD_ENTRY(GetFloatv) /* 262 */
ICD_ENTRY(GetIntegerv) /* 263 */
ICD_ENTRY(GetLightfv) /* 264 */
ICD_ENTRY(GetLightiv) /* 265 */
ICD_ENTRY(GetMapdv) /* 266 */
ICD_ENTRY(GetMapfv) /* 267 */
ICD_ENTRY(GetMapiv) /* 268 */
ICD_ENTRY(GetMaterialfv) /* 269 */
ICD_ENTRY(GetMaterialiv) /* 270 */
ICD_ENTRY(GetPixelMapfv) /* 271 */
ICD_ENTRY(GetPixelMapuiv) /* 272 */
ICD_ENTRY(GetPixelMapusv) /* 273 */
ICD_ENTRY(GetPolygonStipple) /* 274 */
ICD_ENTRY(GetString) /* 275 */
ICD_ENTRY(GetTexEnvfv) /* 276 */
ICD_ENTRY(GetTexEnviv) /* 277 */
ICD_ENTRY(GetTexGendv) /* 278 */
ICD_ENTRY(GetTexGenfv) /* 279 */
ICD_ENTRY(GetTexGeniv) /* 280 */
ICD_ENTRY(GetTexImage) /* 281 */
ICD_ENTRY(GetTexParameterfv) /* 282 */
ICD_ENTRY(GetTexParameteriv) /* 283 */
ICD_ENTRY(GetTexLevelParameterfv) /* 284 */
ICD_ENTRY(GetTexLevelParameteriv) /* 285 */
ICD_ENTRY(IsEnabled) /* 286 */
ICD_ENTRY(IsList) /* 287 */
ICD_ENTRY(DepthRange) /* 288 */
ICD_ENTRY(Frustum) /* 289 */
ICD_ENTRY(LoadIdentity) /* 290 */
ICD_ENTRY(LoadMatrixf) /* 291 */
ICD_ENTRY(LoadMatrixd) /* 292 */
ICD_ENTRY(MatrixMode) /* 293 */
ICD_ENTRY(MultMatrixf) /* 294 */
ICD_ENTRY(MultMatrixd) /* 295 */
ICD_ENTRY(Ortho) /* 296 */
ICD_ENTRY(PopMatrix) /* 297 */
ICD_ENTRY(PushMatrix) /* 298 */
ICD_ENTRY(Rotated) /* 299 */
ICD_ENTRY(Rotatef) /* 300 */
ICD_ENTRY(Scaled) /* 301 */
ICD_ENTRY(Scalef) /* 302 */
ICD_ENTRY(Translated) /* 303 */
ICD_ENTRY(Translatef) /* 304 */
ICD_ENTRY(Viewport) /* 305 */
ICD_ENTRY(ArrayElement) /* 306 */
ICD_ENTRY(BindTexture) /* 307 */
ICD_ENTRY(ColorPointer) /* 308 */
ICD_ENTRY(DisableClientState) /* 309 */
ICD_ENTRY(DrawArrays) /* 310 */
ICD_ENTRY(DrawElements) /* 311 */
ICD_ENTRY(EdgeFlagPointer) /* 312 */
ICD_ENTRY(EnableClientState) /* 313 */
ICD_ENTRY(IndexPointer) /* 314 */
ICD_ENTRY(Indexub) /* 315 */
ICD_ENTRY(Indexubv) /* 316 */
ICD_ENTRY(InterleavedArrays) /* 317 */
ICD_ENTRY(NormalPointer) /* 318 */
ICD_ENTRY(PolygonOffset) /* 319 */
ICD_ENTRY(TexCoordPointer) /* 320 */
ICD_ENTRY(VertexPointer) /* 321 */
ICD_ENTRY(AreTexturesResident) /* 322 */
ICD_ENTRY(CopyTexImage1D) /* 323 */
ICD_ENTRY(CopyTexImage2D) /* 324 */
ICD_ENTRY(CopyTexSubImage1D) /* 325 */
ICD_ENTRY(CopyTexSubImage2D) /* 326 */
ICD_ENTRY(DeleteTextures) /* 327 */
ICD_ENTRY(GenTextures) /* 328 */
ICD_ENTRY(GetPointerv) /* 329 */
ICD_ENTRY(IsTexture) /* 330 */
ICD_ENTRY(PrioritizeTextures) /* 331 */
ICD_ENTRY(TexSubImage1D) /* 332 */
ICD_ENTRY(TexSubImage2D) /* 333 */
ICD_ENTRY(PopClientAttrib) /* 334 */
ICD_ENTRY(PushClientAttrib) /* 335 */
@@ -1,108 +0,0 @@
DESCRIPTION 'Mesa (OpenGL driver) for Win32'
VERSION 6.1
EXPORTS
;
; ICD API
DrvCopyContext
DrvCreateContext
DrvCreateLayerContext
DrvDeleteContext
DrvDescribeLayerPlane
DrvDescribePixelFormat
DrvGetLayerPaletteEntries
DrvGetProcAddress
DrvReleaseContext
DrvRealizeLayerPalette
DrvSetContext
DrvSetLayerPaletteEntries
DrvSetPixelFormat
DrvShareLists
DrvSwapBuffers
DrvSwapLayerBuffers
DrvValidateVersion
;
; Mesa internals - mostly for OSMESA
_ac_CreateContext
_ac_DestroyContext
_ac_InvalidateState
_glapi_get_context
_glapi_get_proc_address
_mesa_buffer_data
_mesa_buffer_map
_mesa_buffer_subdata
_mesa_bzero
_mesa_calloc
_mesa_choose_tex_format
_mesa_compressed_texture_size
_mesa_create_framebuffer
_mesa_create_visual
_mesa_delete_buffer_object
_mesa_delete_texture_object
_mesa_destroy_framebuffer
_mesa_destroy_visual
_mesa_enable_1_3_extensions
_mesa_enable_1_4_extensions
_mesa_enable_1_5_extensions
_mesa_enable_sw_extensions
_mesa_error
_mesa_free
_mesa_free_context_data
_mesa_get_current_context
_mesa_init_default_imports
_mesa_init_driver_functions
_mesa_initialize_context
_mesa_make_current
_mesa_memcpy
_mesa_memset
_mesa_new_buffer_object
_mesa_new_texture_object
_mesa_problem
_mesa_ResizeBuffersMESA
_mesa_store_compressed_teximage1d
_mesa_store_compressed_teximage2d
_mesa_store_compressed_teximage3d
_mesa_store_compressed_texsubimage1d
_mesa_store_compressed_texsubimage2d
_mesa_store_compressed_texsubimage3d
_mesa_store_teximage1d
_mesa_store_teximage2d
_mesa_store_teximage3d
_mesa_store_texsubimage1d
_mesa_store_texsubimage2d
_mesa_store_texsubimage3d
_mesa_strcmp
_mesa_test_proxy_teximage
_mesa_Viewport
_swrast_Accum
_swrast_Bitmap
_swrast_CopyPixels
_swrast_DrawBuffer
_swrast_DrawPixels
_swrast_GetDeviceDriverReference
_swrast_Clear
_swrast_choose_line
_swrast_choose_triangle
_swrast_CopyColorSubTable
_swrast_CopyColorTable
_swrast_CopyConvolutionFilter1D
_swrast_CopyConvolutionFilter2D
_swrast_copy_teximage1d
_swrast_copy_teximage2d
_swrast_copy_texsubimage1d
_swrast_copy_texsubimage2d
_swrast_copy_texsubimage3d
_swrast_CreateContext
_swrast_DestroyContext
_swrast_InvalidateState
_swrast_ReadPixels
_swsetup_Wakeup
_swsetup_CreateContext
_swsetup_DestroyContext
_swsetup_InvalidateState
_tnl_CreateContext
_tnl_DestroyContext
_tnl_InvalidateState
_tnl_MakeCurrent
_tnl_run_pipeline
-37
View File
@@ -1,37 +0,0 @@
# Makefile for core library for VMS
# contributed by Jouk Jansen [email protected]
# Last revision : 16 June 2003
.first
define gl [---.include.gl]
.include [---]mms-config.
##### MACROS #####
VPATH = RCS
INCDIR = [---.include],[-.main]
LIBDIR = [---.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)
SOURCES = glapi.c glthread.c
OBJECTS = glapi.obj,glthread.obj
##### RULES #####
VERSION=Mesa V3.4
##### TARGETS #####
# Make the library
$(LIBDIR)$(GL_LIB) : $(OBJECTS)
@ library $(LIBDIR)$(GL_LIB) $(OBJECTS)
clean :
purge
delete *.obj;*
glapi.obj : glapi.c
glthread.obj : glthread.c
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-152
View File
@@ -1,152 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.3
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \mainpage Mesa GL API Module
*
* \section GLAPIIntroduction Introduction
*
* The Mesa GL API module is responsible for dispatching all the
* gl*() functions. All GL functions are dispatched by jumping through
* the current dispatch table (basically a struct full of function
* pointers.)
*
* A per-thread current dispatch table and per-thread current context
* pointer are managed by this module too.
*
* This module is intended to be non-Mesa-specific so it can be used
* with the X/DRI libGL also.
*/
#ifndef _GLAPI_H
#define _GLAPI_H
#include "GL/gl.h"
#include "glapitable.h"
typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
#if defined (GLX_USE_TLS)
const extern void *_glapi_Context;
const extern struct _glapi_table *_glapi_Dispatch;
extern __thread void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
#else
extern void *_glapi_Context;
extern struct _glapi_table *_glapi_Dispatch;
/**
* Macro for declaration and fetching the current context.
*
* \param C local variable which will hold the current context.
*
* It should be used in the variable declaration area of a function:
* \code
* ...
* {
* GET_CURRENT_CONTEXT(ctx);
* ...
* \endcode
*/
# ifdef THREADS
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
# else
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
# endif
#endif /* defined (GLX_USE_TLS) */
extern void
_glapi_noop_enable_warnings(GLboolean enable);
extern void
_glapi_set_warning_func(_glapi_warning_func func);
extern void
_glapi_check_multithread(void);
extern void
_glapi_set_context(void *context);
extern void *
_glapi_get_context(void);
extern void
_glapi_set_dispatch(struct _glapi_table *dispatch);
extern struct _glapi_table *
_glapi_get_dispatch(void);
extern int
_glapi_begin_dispatch_override(struct _glapi_table *override);
extern void
_glapi_end_dispatch_override(int layer);
struct _glapi_table *
_glapi_get_override_dispatch(int layer);
extern GLuint
_glapi_get_dispatch_table_size(void);
extern void
_glapi_check_table(const struct _glapi_table *table);
extern int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature );
extern GLint
_glapi_get_proc_offset(const char *funcName);
extern _glapi_proc
_glapi_get_proc_address(const char *funcName);
extern const char *
_glapi_get_proc_name(GLuint offset);
#endif
File diff suppressed because it is too large Load Diff
-858
View File
@@ -1,858 +0,0 @@
/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
/*
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL, IBM,
* AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#if !defined( _GLAPI_TABLE_H_ )
# define _GLAPI_TABLE_H_
#ifndef GLAPIENTRYP
#define GLAPIENTRYP
#endif
typedef void (*_glapi_proc)(void); /* generic function pointer */
struct _glapi_table
{
void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */
void (GLAPIENTRYP EndList)(void); /* 1 */
void (GLAPIENTRYP CallList)(GLuint list); /* 2 */
void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */
void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */
GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */
void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */
void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */
void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */
void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */
void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */
void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */
void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */
void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */
void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */
void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */
void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */
void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */
void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */
void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */
void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */
void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */
void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */
void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */
void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */
void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */
void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */
void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */
void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */
void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */
void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */
void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */
void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */
void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */
void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */
void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */
void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */
void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */
void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */
void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */
void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */
void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */
void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */
void (GLAPIENTRYP End)(void); /* 43 */
void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */
void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */
void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */
void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */
void (GLAPIENTRYP Indexi)(GLint c); /* 48 */
void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */
void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */
void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */
void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */
void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */
void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */
void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */
void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */
void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */
void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */
void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */
void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */
void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */
void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */
void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */
void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */
void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */
void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */
void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */
void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */
void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */
void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */
void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */
void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */
void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */
void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */
void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */
void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */
void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */
void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */
void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */
void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */
void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */
void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */
void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */
void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */
void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */
void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */
void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */
void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */
void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */
void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */
void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */
void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */
void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */
void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */
void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */
void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */
void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */
void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */
void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */
void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */
void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */
void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */
void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */
void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */
void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */
void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */
void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */
void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */
void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */
void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */
void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */
void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */
void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */
void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */
void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */
void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */
void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */
void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */
void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */
void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */
void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */
void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */
void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */
void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */
void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */
void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */
void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */
void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */
void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */
void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */
void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */
void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */
void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */
void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */
void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */
void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */
void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */
void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */
void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */
void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */
void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */
void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */
void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */
void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */
void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */
void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */
void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */
void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */
void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */
void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */
void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */
void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */
void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */
void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */
void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */
void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */
void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */
void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */
void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */
void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */
void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */
void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */
void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */
void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */
void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */
void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */
void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */
void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */
void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */
void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */
void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */
void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */
void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */
void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */
void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */
void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */
void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */
void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */
void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */
void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */
void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */
void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */
void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */
void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */
void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */
void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */
void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */
void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */
void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */
void (GLAPIENTRYP TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */
void (GLAPIENTRYP TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */
void (GLAPIENTRYP TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */
void (GLAPIENTRYP TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */
void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */
void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */
GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */
void (GLAPIENTRYP InitNames)(void); /* 197 */
void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */
void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */
void (GLAPIENTRYP PopName)(void); /* 200 */
void (GLAPIENTRYP PushName)(GLuint name); /* 201 */
void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */
void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */
void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */
void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */
void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */
void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */
void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */
void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */
void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */
void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */
void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */
void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */
void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */
void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */
void (GLAPIENTRYP Finish)(void); /* 216 */
void (GLAPIENTRYP Flush)(void); /* 217 */
void (GLAPIENTRYP PopAttrib)(void); /* 218 */
void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */
void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */
void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */
void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */
void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */
void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */
void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */
void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */
void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */
void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */
void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */
void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */
void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */
void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */
void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */
void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */
void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */
void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */
void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */
void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */
void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */
void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */
void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */
void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */
void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */
void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */
void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */
void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */
void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */
void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */
void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */
void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */
void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */
void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */
void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */
void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */
void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */
void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */
void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */
void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */
void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */
void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */
GLenum (GLAPIENTRYP GetError)(void); /* 261 */
void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */
void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */
void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */
void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */
void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */
void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */
void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */
void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */
void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */
void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */
void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */
void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */
void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */
const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */
void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */
void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */
void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */
void (GLAPIENTRYP GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */
void (GLAPIENTRYP GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */
void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */
void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */
void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */
void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */
void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */
GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */
GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */
void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */
void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */
void (GLAPIENTRYP LoadIdentity)(void); /* 290 */
void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */
void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */
void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */
void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */
void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */
void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */
void (GLAPIENTRYP PopMatrix)(void); /* 297 */
void (GLAPIENTRYP PushMatrix)(void); /* 298 */
void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */
void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */
void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */
void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */
void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */
void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */
void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */
void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */
void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */
void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */
void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */
void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */
void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */
void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */
void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */
void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */
void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */
void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */
void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */
void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */
void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */
void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */
void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */
GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */
void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */
void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */
void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */
void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */
void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */
void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */
void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */
GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */
void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */
void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */
void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */
void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */
void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */
void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */
void (GLAPIENTRYP BlendEquation)(GLenum mode); /* 337 */
void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */
void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */
void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */
void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */
void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */
void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */
void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */
void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */
void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */
void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */
void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */
void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */
void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */
void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */
void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */
void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */
void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */
void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */
void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */
void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */
void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */
void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */
void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */
void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */
void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */
void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */
void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */
void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */
void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */
void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */
void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */
void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */
void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */
void (GLAPIENTRYP TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */
void (GLAPIENTRYP TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */
void (GLAPIENTRYP CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */
void (GLAPIENTRYP ActiveTextureARB)(GLenum texture); /* 374 */
void (GLAPIENTRYP ClientActiveTextureARB)(GLenum texture); /* 375 */
void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */
void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */
void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */
void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */
void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */
void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */
void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */
void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */
void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */
void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */
void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */
void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */
void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */
void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */
void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */
void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */
void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */
void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */
void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */
void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */
void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */
void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */
void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */
void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */
void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */
void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */
void (GLAPIENTRYP MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */
void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */
void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */
void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */
void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */
void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */
void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 408 */
void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 409 */
void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 410 */
void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 411 */
void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 412 */
void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 413 */
void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 414 */
void (GLAPIENTRYP GetTexFilterFuncSGIS)(GLenum target, GLenum filter, GLfloat * weights); /* 415 */
void (GLAPIENTRYP TexFilterFuncSGIS)(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights); /* 416 */
void (GLAPIENTRYP GetHistogramEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 417 */
void (GLAPIENTRYP GetHistogramParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 418 */
void (GLAPIENTRYP GetHistogramParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 419 */
void (GLAPIENTRYP GetMinmaxEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 420 */
void (GLAPIENTRYP GetMinmaxParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 421 */
void (GLAPIENTRYP GetMinmaxParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 422 */
void (GLAPIENTRYP GetConvolutionFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 423 */
void (GLAPIENTRYP GetConvolutionParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 424 */
void (GLAPIENTRYP GetConvolutionParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 425 */
void (GLAPIENTRYP GetSeparableFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 426 */
void (GLAPIENTRYP GetColorTableSGI)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 427 */
void (GLAPIENTRYP GetColorTableParameterfvSGI)(GLenum target, GLenum pname, GLfloat * params); /* 428 */
void (GLAPIENTRYP GetColorTableParameterivSGI)(GLenum target, GLenum pname, GLint * params); /* 429 */
void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 430 */
void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 431 */
void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 432 */
void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 433 */
void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 434 */
void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 435 */
void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 436 */
void (GLAPIENTRYP TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 437 */
void (GLAPIENTRYP TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels); /* 438 */
GLboolean (GLAPIENTRYP AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 439 */
void (GLAPIENTRYP GenTexturesEXT)(GLsizei n, GLuint * textures); /* 440 */
GLboolean (GLAPIENTRYP IsTextureEXT)(GLuint texture); /* 441 */
void (GLAPIENTRYP DetailTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points); /* 442 */
void (GLAPIENTRYP GetDetailTexFuncSGIS)(GLenum target, GLfloat * points); /* 443 */
void (GLAPIENTRYP SharpenTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points); /* 444 */
void (GLAPIENTRYP GetSharpenTexFuncSGIS)(GLenum target, GLfloat * points); /* 445 */
void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 446 */
void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 447 */
void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 448 */
void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 449 */
void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 450 */
void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 451 */
void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 452 */
void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 453 */
void (GLAPIENTRYP SpriteParameterfSGIX)(GLenum pname, GLfloat param); /* 454 */
void (GLAPIENTRYP SpriteParameterfvSGIX)(GLenum pname, const GLfloat * params); /* 455 */
void (GLAPIENTRYP SpriteParameteriSGIX)(GLenum pname, GLint param); /* 456 */
void (GLAPIENTRYP SpriteParameterivSGIX)(GLenum pname, const GLint * params); /* 457 */
void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 458 */
void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 459 */
GLint (GLAPIENTRYP GetInstrumentsSGIX)(void); /* 460 */
void (GLAPIENTRYP InstrumentsBufferSGIX)(GLsizei size, GLint * buffer); /* 461 */
GLint (GLAPIENTRYP PollInstrumentsSGIX)(GLint * marker_p); /* 462 */
void (GLAPIENTRYP ReadInstrumentsSGIX)(GLint marker); /* 463 */
void (GLAPIENTRYP StartInstrumentsSGIX)(void); /* 464 */
void (GLAPIENTRYP StopInstrumentsSGIX)(GLint marker); /* 465 */
void (GLAPIENTRYP FrameZoomSGIX)(GLint factor); /* 466 */
void (GLAPIENTRYP TagSampleBufferSGIX)(void); /* 467 */
void (GLAPIENTRYP ReferencePlaneSGIX)(const GLdouble * equation); /* 468 */
void (GLAPIENTRYP FlushRasterSGIX)(void); /* 469 */
void (GLAPIENTRYP GetListParameterfvSGIX)(GLuint list, GLenum pname, GLfloat * params); /* 470 */
void (GLAPIENTRYP GetListParameterivSGIX)(GLuint list, GLenum pname, GLint * params); /* 471 */
void (GLAPIENTRYP ListParameterfSGIX)(GLuint list, GLenum pname, GLfloat param); /* 472 */
void (GLAPIENTRYP ListParameterfvSGIX)(GLuint list, GLenum pname, const GLfloat * params); /* 473 */
void (GLAPIENTRYP ListParameteriSGIX)(GLuint list, GLenum pname, GLint param); /* 474 */
void (GLAPIENTRYP ListParameterivSGIX)(GLuint list, GLenum pname, const GLint * params); /* 475 */
void (GLAPIENTRYP FragmentColorMaterialSGIX)(GLenum face, GLenum mode); /* 476 */
void (GLAPIENTRYP FragmentLightfSGIX)(GLenum light, GLenum pname, GLfloat param); /* 477 */
void (GLAPIENTRYP FragmentLightfvSGIX)(GLenum light, GLenum pname, const GLfloat * params); /* 478 */
void (GLAPIENTRYP FragmentLightiSGIX)(GLenum light, GLenum pname, GLint param); /* 479 */
void (GLAPIENTRYP FragmentLightivSGIX)(GLenum light, GLenum pname, const GLint * params); /* 480 */
void (GLAPIENTRYP FragmentLightModelfSGIX)(GLenum pname, GLfloat param); /* 481 */
void (GLAPIENTRYP FragmentLightModelfvSGIX)(GLenum pname, const GLfloat * params); /* 482 */
void (GLAPIENTRYP FragmentLightModeliSGIX)(GLenum pname, GLint param); /* 483 */
void (GLAPIENTRYP FragmentLightModelivSGIX)(GLenum pname, const GLint * params); /* 484 */
void (GLAPIENTRYP FragmentMaterialfSGIX)(GLenum face, GLenum pname, GLfloat param); /* 485 */
void (GLAPIENTRYP FragmentMaterialfvSGIX)(GLenum face, GLenum pname, const GLfloat * params); /* 486 */
void (GLAPIENTRYP FragmentMaterialiSGIX)(GLenum face, GLenum pname, GLint param); /* 487 */
void (GLAPIENTRYP FragmentMaterialivSGIX)(GLenum face, GLenum pname, const GLint * params); /* 488 */
void (GLAPIENTRYP GetFragmentLightfvSGIX)(GLenum light, GLenum pname, GLfloat * params); /* 489 */
void (GLAPIENTRYP GetFragmentLightivSGIX)(GLenum light, GLenum pname, GLint * params); /* 490 */
void (GLAPIENTRYP GetFragmentMaterialfvSGIX)(GLenum face, GLenum pname, GLfloat * params); /* 491 */
void (GLAPIENTRYP GetFragmentMaterialivSGIX)(GLenum face, GLenum pname, GLint * params); /* 492 */
void (GLAPIENTRYP LightEnviSGIX)(GLenum pname, GLint param); /* 493 */
void (GLAPIENTRYP VertexWeightfEXT)(GLfloat weight); /* 494 */
void (GLAPIENTRYP VertexWeightfvEXT)(const GLfloat * weight); /* 495 */
void (GLAPIENTRYP VertexWeightPointerEXT)(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 496 */
void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 497 */
void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 498 */
void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 499 */
void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 500 */
void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 501 */
void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 502 */
void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 503 */
void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 504 */
void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 505 */
void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 506 */
void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 507 */
void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 508 */
void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 509 */
void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 510 */
void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 511 */
void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 512 */
void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 513 */
void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 514 */
void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 515 */
void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 516 */
void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 517 */
void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 518 */
void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 519 */
void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 520 */
void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 521 */
void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 522 */
void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 523 */
void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 524 */
void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 525 */
void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 526 */
void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 527 */
void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 528 */
void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 529 */
void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 530 */
void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 531 */
void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 532 */
void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 533 */
void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 534 */
void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 535 */
void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 536 */
void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 537 */
void (GLAPIENTRYP IndexMaterialEXT)(GLenum face, GLenum mode); /* 538 */
void (GLAPIENTRYP IndexFuncEXT)(GLenum func, GLclampf ref); /* 539 */
void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 540 */
void (GLAPIENTRYP UnlockArraysEXT)(void); /* 541 */
void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 542 */
void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 543 */
void (GLAPIENTRYP HintPGI)(GLenum target, GLint mode); /* 544 */
void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 545 */
void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 546 */
void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 547 */
void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 548 */
void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 549 */
void (GLAPIENTRYP GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data); /* 550 */
void (GLAPIENTRYP GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 551 */
void (GLAPIENTRYP GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 552 */
void (GLAPIENTRYP TbufferMask3DFX)(GLuint mask); /* 553 */
void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 554 */
void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 555 */
void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 556 */
void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 557 */
void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 558 */
void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 559 */
void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 560 */
void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 561 */
void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 562 */
void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 563 */
void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 564 */
void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 565 */
void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 566 */
void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 567 */
void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 568 */
void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 569 */
void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 570 */
void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 571 */
void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 572 */
void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 573 */
void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 574 */
void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 575 */
void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 576 */
void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 577 */
GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 578 */
void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 579 */
void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 580 */
void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 581 */
void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 582 */
void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 583 */
void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 584 */
void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 585 */
void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 586 */
void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 587 */
void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 588 */
void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 589 */
void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 590 */
void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params); /* 591 */
GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 592 */
void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 593 */
void (GLAPIENTRYP ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 594 */
void (GLAPIENTRYP ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); /* 595 */
void (GLAPIENTRYP ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 596 */
void (GLAPIENTRYP ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); /* 597 */
void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 598 */
void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 599 */
void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 600 */
void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 601 */
void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 602 */
void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 603 */
void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 604 */
void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 605 */
void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 606 */
void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 607 */
void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 608 */
void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 609 */
void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 610 */
void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 611 */
void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 612 */
void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 613 */
void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 614 */
void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 615 */
void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 616 */
void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 617 */
void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 618 */
void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 619 */
void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 620 */
void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 621 */
void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 622 */
void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 623 */
void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 624 */
void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 625 */
void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 626 */
void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 627 */
void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 628 */
void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 629 */
void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 630 */
void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 631 */
void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 632 */
void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 633 */
void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 634 */
void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 635 */
void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 636 */
void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 637 */
void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 638 */
void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 639 */
void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 640 */
void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 641 */
void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 642 */
void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 643 */
void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 644 */
void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 645 */
void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 646 */
void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 647 */
void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 648 */
GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 649 */
GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 650 */
void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 651 */
void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 652 */
void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 653 */
void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 654 */
void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 655 */
void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 656 */
void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 657 */
void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 658 */
void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 659 */
void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 660 */
void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 661 */
void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 662 */
void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 663 */
void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 664 */
void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 665 */
void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 666 */
void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 667 */
void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 668 */
void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 669 */
void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 670 */
void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 671 */
void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 672 */
void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 673 */
void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 674 */
void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 675 */
void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 676 */
void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 677 */
void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 678 */
void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 679 */
void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 680 */
void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 681 */
void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 682 */
void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 683 */
void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 684 */
void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 685 */
void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 686 */
void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 687 */
void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 688 */
void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 689 */
void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 690 */
void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 691 */
void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 692 */
void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 693 */
void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 694 */
void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 695 */
GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 696 */
GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 697 */
GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 698 */
void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 699 */
void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 700 */
void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 701 */
GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 702 */
void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 703 */
void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 704 */
void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 705 */
void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 706 */
void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 707 */
void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 708 */
void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 709 */
void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 710 */
void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 711 */
GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 712 */
void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 713 */
GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 714 */
void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint * length); /* 715 */
void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shaderObj); /* 716 */
GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 717 */
void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 718 */
void (GLAPIENTRYP LinkProgramARB)(GLhandleARB programObj); /* 719 */
void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB programObj); /* 720 */
void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB programObj); /* 721 */
void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 722 */
void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 723 */
void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 724 */
void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 725 */
void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 726 */
void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 727 */
void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 728 */
void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 729 */
void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 730 */
void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 731 */
void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 732 */
void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 733 */
void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 734 */
void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 735 */
void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 736 */
void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 737 */
void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 738 */
void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 739 */
void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 740 */
void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 741 */
void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 742 */
void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 743 */
void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 744 */
GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB programObj, const GLcharARB * name); /* 745 */
void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 746 */
void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB programObj, GLint location, GLfloat * params); /* 747 */
void (GLAPIENTRYP GetUniformivARB)(GLhandleARB programObj, GLint location, GLint * params); /* 748 */
void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * source); /* 749 */
void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB programObj, GLuint index, const GLcharARB * name); /* 750 */
void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 751 */
GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB programObj, const GLcharARB * name); /* 752 */
void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 753 */
void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 754 */
void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 755 */
void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 756 */
void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 757 */
void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 758 */
void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 759 */
void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 760 */
void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 761 */
void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 762 */
void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 763 */
void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 764 */
void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 765 */
void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 766 */
void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 767 */
void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 768 */
void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 769 */
void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 770 */
void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 771 */
void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 772 */
void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 773 */
void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 774 */
void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 775 */
void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 776 */
void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 777 */
void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 778 */
void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 779 */
void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 780 */
void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 781 */
GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 782 */
void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 783 */
void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 784 */
void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 785 */
void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 786 */
void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 787 */
void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 788 */
void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 789 */
void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 790 */
void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 791 */
void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 792 */
void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 793 */
void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 794 */
void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 795 */
GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 796 */
void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 797 */
void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 798 */
void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 799 */
void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 800 */
void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 801 */
GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 802 */
void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 803 */
void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 804 */
void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 805 */
GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 806 */
void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 807 */
void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 808 */
void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 809 */
void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 810 */
void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 811 */
void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 812 */
void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 813 */
void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); /* 814 */
void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 815 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-367
View File
@@ -1,367 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 4.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* XXX There's probably some work to do in order to make this file
* truly reusable outside of Mesa. First, the glheader.h include must go.
*/
#include "glheader.h"
#include "glthread.h"
/*
* This file should still compile even when THREADS is not defined.
* This is to make things easier to deal with on the makefile scene..
*/
#ifdef THREADS
#include <errno.h>
/*
* Error messages
*/
#define INIT_TSD_ERROR "_glthread_: failed to allocate key for thread specific data"
#define GET_TSD_ERROR "_glthread_: failed to get thread specific data"
#define SET_TSD_ERROR "_glthread_: thread failed to set thread specific data"
/*
* Magic number to determine if a TSD object has been initialized.
* Kind of a hack but there doesn't appear to be a better cross-platform
* solution.
*/
#define INIT_MAGIC 0xff8adc98
/*
* POSIX Threads -- The best way to go if your platform supports them.
* Solaris >= 2.5 have POSIX threads, IRIX >= 6.4 reportedly
* has them, and many of the free Unixes now have them.
* Be sure to use appropriate -mt or -D_REENTRANT type
* compile flags when building.
*/
#ifdef PTHREADS
unsigned long
_glthread_GetID(void)
{
return (unsigned long) pthread_self();
}
void
_glthread_InitTSD(_glthread_TSD *tsd)
{
if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) {
perror(INIT_TSD_ERROR);
exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
if (tsd->initMagic != (int) INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
return pthread_getspecific(tsd->key);
}
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
if (tsd->initMagic != (int) INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
if (pthread_setspecific(tsd->key, ptr) != 0) {
perror(SET_TSD_ERROR);
exit(-1);
}
}
#endif /* PTHREADS */
/*
* Solaris/Unix International Threads -- Use only if POSIX threads
* aren't available on your Unix platform. Solaris 2.[34] are examples
* of platforms where this is the case. Be sure to use -mt and/or
* -D_REENTRANT when compiling.
*/
#ifdef SOLARIS_THREADS
#define USE_LOCK_FOR_KEY /* undef this to try a version without
lock for the global key... */
unsigned long
_glthread_GetID(void)
{
abort(); /* XXX not implemented yet */
return (unsigned long) 0;
}
void
_glthread_InitTSD(_glthread_TSD *tsd)
{
if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 ||
(errno = thr_keycreate(&(tsd->key), free)) != 0) {
perror(INIT_TSD_ERROR);
exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
void* ret;
if (tsd->initMagic != INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
#ifdef USE_LOCK_FOR_KEY
mutex_lock(&tsd->keylock);
thr_getspecific(tsd->key, &ret);
mutex_unlock(&tsd->keylock);
#else
if ((errno = thr_getspecific(tsd->key, &ret)) != 0) {
perror(GET_TSD_ERROR);
exit(-1);
}
#endif
return ret;
}
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
if (tsd->initMagic != INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
if ((errno = thr_setspecific(tsd->key, ptr)) != 0) {
perror(SET_TSD_ERROR);
exit(-1);
}
}
#undef USE_LOCK_FOR_KEY
#endif /* SOLARIS_THREADS */
/*
* Win32 Threads. The only available option for Windows 95/NT.
* Be sure that you compile using the Multithreaded runtime, otherwise
* bad things will happen.
*/
#ifdef WIN32_THREADS
unsigned long
_glthread_GetID(void)
{
abort(); /* XXX not implemented yet */
return (unsigned long) 0;
}
void
_glthread_InitTSD(_glthread_TSD *tsd)
{
tsd->key = TlsAlloc();
if (tsd->key == 0xffffffff) {
/* Can Windows handle stderr messages for non-console
applications? Does Windows have perror? */
/* perror(SET_INIT_ERROR);*/
exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
if (tsd->initMagic != INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
return TlsGetValue(tsd->key);
}
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
/* the following code assumes that the _glthread_TSD has been initialized
to zero at creation */
if (tsd->initMagic != INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
if (TlsSetValue(tsd->key, ptr) == 0) {
/* Can Windows handle stderr messages for non-console
applications? Does Windows have perror? */
/* perror(SET_TSD_ERROR);*/
exit(-1);
}
}
#endif /* WIN32_THREADS */
/*
* XFree86 has its own thread wrapper, Xthreads.h
* We wrap it again for GL.
*/
#ifdef USE_XTHREADS
unsigned long
_glthread_GetID(void)
{
return (unsigned long) xthread_self();
}
void
_glthread_InitTSD(_glthread_TSD *tsd)
{
if (xthread_key_create(&tsd->key, NULL) != 0) {
perror(INIT_TSD_ERROR);
exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
void *ptr;
if (tsd->initMagic != INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
xthread_get_specific(tsd->key, &ptr);
return ptr;
}
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
if (tsd->initMagic != INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
xthread_set_specific(tsd->key, ptr);
}
#endif /* XTHREAD */
/*
* BeOS threads
*/
#ifdef BEOS_THREADS
unsigned long
_glthread_GetID(void)
{
return (unsigned long) find_thread(NULL);
}
void
_glthread_InitTSD(_glthread_TSD *tsd)
{
tsd->key = tls_allocate();
tsd->initMagic = INIT_MAGIC;
}
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
if (tsd->initMagic != (int) INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
return tls_get(tsd->key);
}
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
if (tsd->initMagic != (int) INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
tls_set(tsd->key, ptr);
}
#endif /* BEOS_THREADS */
#else /* THREADS */
/*
* no-op functions
*/
unsigned long
_glthread_GetID(void)
{
return 0;
}
void
_glthread_InitTSD(_glthread_TSD *tsd)
{
(void) tsd;
}
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
(void) tsd;
return NULL;
}
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
(void) tsd;
(void) ptr;
}
#endif /* THREADS */
-314
View File
@@ -1,314 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.3
*
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* Thread support for gl dispatch.
*
* Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu)
* and Christoph Poliwoda (poliwoda@volumegraphics.com)
* Revised by Keith Whitwell
* Adapted for new gl dispatcher by Brian Paul
*
*
*
* DOCUMENTATION
*
* This thread module exports the following types:
* _glthread_TSD Thread-specific data area
* _glthread_Thread Thread datatype
* _glthread_Mutex Mutual exclusion lock
*
* Macros:
* _glthread_DECLARE_STATIC_MUTEX(name) Declare a non-local mutex
* _glthread_INIT_MUTEX(name) Initialize a mutex
* _glthread_LOCK_MUTEX(name) Lock a mutex
* _glthread_UNLOCK_MUTEX(name) Unlock a mutex
*
* Functions:
* _glthread_GetID(v) Get integer thread ID
* _glthread_InitTSD() Initialize thread-specific data
* _glthread_GetTSD() Get thread-specific data
* _glthread_SetTSD() Set thread-specific data
*
*/
/*
* If this file is accidentally included by a non-threaded build,
* it should not cause the build to fail, or otherwise cause problems.
* In general, it should only be included when needed however.
*/
#ifndef GLTHREAD_H
#define GLTHREAD_H
#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\
defined(WIN32_THREADS) || defined(USE_XTHREADS) || defined(BEOS_THREADS)) \
&& !defined(THREADS)
# define THREADS
#endif
#ifdef VMS
#include <GL/vms_x_fix.h>
#endif
/*
* POSIX threads. This should be your choice in the Unix world
* whenever possible. When building with POSIX threads, be sure
* to enable any compiler flags which will cause the MT-safe
* libc (if one exists) to be used when linking, as well as any
* header macros for MT-safe errno, etc. For Solaris, this is the -mt
* compiler flag. On Solaris with gcc, use -D_REENTRANT to enable
* proper compiling for MT-safe libc etc.
*/
#if defined(PTHREADS)
#include <pthread.h> /* POSIX threads headers */
typedef struct {
pthread_key_t key;
int initMagic;
} _glthread_TSD;
typedef pthread_t _glthread_Thread;
typedef pthread_mutex_t _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) \
static _glthread_Mutex name = PTHREAD_MUTEX_INITIALIZER
#define _glthread_INIT_MUTEX(name) \
pthread_mutex_init(&(name), NULL)
#define _glthread_DESTROY_MUTEX(name) \
pthread_mutex_destroy(&(name))
#define _glthread_LOCK_MUTEX(name) \
(void) pthread_mutex_lock(&(name))
#define _glthread_UNLOCK_MUTEX(name) \
(void) pthread_mutex_unlock(&(name))
#endif /* PTHREADS */
/*
* Solaris threads. Use only up to Solaris 2.4.
* Solaris 2.5 and higher provide POSIX threads.
* Be sure to compile with -mt on the Solaris compilers, or
* use -D_REENTRANT if using gcc.
*/
#ifdef SOLARIS_THREADS
#include <thread.h>
typedef struct {
thread_key_t key;
mutex_t keylock;
int initMagic;
} _glthread_TSD;
typedef thread_t _glthread_Thread;
typedef mutex_t _glthread_Mutex;
/* XXX need to really implement mutex-related macros */
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
#endif /* SOLARIS_THREADS */
/*
* Windows threads. Should work with Windows NT and 95.
* IMPORTANT: Link with multithreaded runtime library when THREADS are
* used!
*/
#ifdef WIN32_THREADS
#include <windows.h>
typedef struct {
DWORD key;
int initMagic;
} _glthread_TSD;
typedef HANDLE _glthread_Thread;
typedef CRITICAL_SECTION _glthread_Mutex;
/* XXX need to really implement mutex-related macros */
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
#endif /* WIN32_THREADS */
/*
* XFree86 has its own thread wrapper, Xthreads.h
* We wrap it again for GL.
*/
#ifdef USE_XTHREADS
#include <X11/Xthreads.h>
typedef struct {
xthread_key_t key;
int initMagic;
} _glthread_TSD;
typedef xthread_t _glthread_Thread;
typedef xmutex_rec _glthread_Mutex;
#ifdef XMUTEX_INITIALIZER
#define _glthread_DECLARE_STATIC_MUTEX(name) \
static _glthread_Mutex name = XMUTEX_INITIALIZER
#else
#define _glthread_DECLARE_STATIC_MUTEX(name) \
static _glthread_Mutex name
#endif
#define _glthread_INIT_MUTEX(name) \
xmutex_init(&(name))
#define _glthread_DESTROY_MUTEX(name) \
xmutex_clear(&(name))
#define _glthread_LOCK_MUTEX(name) \
(void) xmutex_lock(&(name))
#define _glthread_UNLOCK_MUTEX(name) \
(void) xmutex_unlock(&(name))
#endif /* USE_XTHREADS */
/*
* BeOS threads. R5.x required.
*/
#ifdef BEOS_THREADS
#include <kernel/OS.h>
#include <support/TLS.h>
typedef struct {
int32 key;
int initMagic;
} _glthread_TSD;
typedef thread_id _glthread_Thread;
/* Use Benaphore, aka speeder semaphore */
typedef struct {
int32 lock;
sem_id sem;
} benaphore;
typedef benaphore _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 }
#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0
#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0
#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \
if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem)
#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem)
#endif /* BEOS_THREADS */
#ifndef THREADS
/*
* THREADS not defined
*/
typedef GLuint _glthread_TSD;
typedef GLuint _glthread_Thread;
typedef GLuint _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
#endif /* THREADS */
/*
* Platform independent thread specific data API.
*/
extern unsigned long
_glthread_GetID(void);
extern void
_glthread_InitTSD(_glthread_TSD *);
extern void *
_glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
#if defined(GLX_USE_TLS)
extern __thread struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
#define GET_DISPATCH() _glapi_tls_Dispatch
#elif !defined(GL_CALL)
# if defined(THREADS)
# define GET_DISPATCH() \
((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \
? _glapi_Dispatch : _glapi_get_dispatch())
# else
# define GET_DISPATCH() _glapi_Dispatch
# endif /* defined(THREADS) */
#endif /* ndef GL_CALL */
#endif /* THREADS_H */
-110
View File
@@ -1,110 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "glheader.h"
#include "accum.h"
#include "context.h"
#include "imports.h"
#include "macros.h"
#include "state.h"
#include "mtypes.h"
void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
{
GLfloat tmp[4];
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
tmp[0] = CLAMP( red, -1.0F, 1.0F );
tmp[1] = CLAMP( green, -1.0F, 1.0F );
tmp[2] = CLAMP( blue, -1.0F, 1.0F );
tmp[3] = CLAMP( alpha, -1.0F, 1.0F );
if (TEST_EQ_4V(tmp, ctx->Accum.ClearColor))
return;
FLUSH_VERTICES(ctx, _NEW_ACCUM);
COPY_4FV( ctx->Accum.ClearColor, tmp );
}
void GLAPIENTRY
_mesa_Accum( GLenum op, GLfloat value )
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
switch (op) {
case GL_ADD:
case GL_MULT:
case GL_ACCUM:
case GL_LOAD:
case GL_RETURN:
/* OK */
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glAccum(op)");
return;
}
if (ctx->DrawBuffer->Visual.haveAccumBuffer == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glAccum(no accum buffer)");
return;
}
if (ctx->DrawBuffer != ctx->ReadBuffer) {
/* See GLX_SGI_make_current_read or WGL_ARB_make_current_read */
_mesa_error(ctx, GL_INVALID_OPERATION,
"glAccum(different read/draw buffers)");
return;
}
if (ctx->NewState)
_mesa_update_state(ctx);
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glAccum(incomplete framebuffer)");
return;
}
if (ctx->RenderMode == GL_RENDER) {
GLint x = ctx->DrawBuffer->_Xmin;
GLint y = ctx->DrawBuffer->_Ymin;
GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
ctx->Driver.Accum(ctx, op, value, x, y, width, height);
}
}
void
_mesa_init_accum( GLcontext *ctx )
{
/* Accumulate buffer group */
ASSIGN_4V( ctx->Accum.ClearColor, 0.0, 0.0, 0.0, 0.0 );
}
-62
View File
@@ -1,62 +0,0 @@
/**
* \file accum.h
* Accumulation buffer operations.
*
* \if subset
* (No-op)
*
* \endif
*/
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef ACCUM_H
#define ACCUM_H
#include "mtypes.h"
#if _HAVE_FULL_GL
extern void GLAPIENTRY
_mesa_Accum( GLenum op, GLfloat value );
extern void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
extern void
_mesa_init_accum( GLcontext *ctx );
#else
/** No-op */
#define _mesa_init_accum( c ) ((void)0)
#endif
#endif
-796
View File
@@ -1,796 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.3
*
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* Author:
* Keith Whitwell <keith@tungstengraphics.com>
*/
#include "glheader.h"
#include "api_arrayelt.h"
#include "context.h"
#include "glapi.h"
#include "imports.h"
#include "macros.h"
#include "mtypes.h"
#include "glapioffsets.h"
#include "dispatch.h"
typedef void (GLAPIENTRY *array_func)( const void * );
typedef struct {
const struct gl_client_array *array;
int offset;
} AEarray;
typedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data );
typedef struct {
const struct gl_client_array *array;
attrib_func func;
GLuint index;
} AEattrib;
typedef struct {
AEarray arrays[32];
AEattrib attribs[VERT_ATTRIB_MAX + 1];
GLuint NewState;
} AEcontext;
#define AE_CONTEXT(ctx) ((AEcontext *)(ctx)->aelt_context)
/*
* Convert GL_BYTE, GL_UNSIGNED_BYTE, .. GL_DOUBLE into an integer
* in the range [0, 7]. Luckily these type tokens are sequentially
* numbered in gl.h, except for GL_DOUBLE.
*/
#define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 )
static const int ColorFuncs[2][8] = {
{
_gloffset_Color3bv,
_gloffset_Color3ubv,
_gloffset_Color3sv,
_gloffset_Color3usv,
_gloffset_Color3iv,
_gloffset_Color3uiv,
_gloffset_Color3fv,
_gloffset_Color3dv,
},
{
_gloffset_Color4bv,
_gloffset_Color4ubv,
_gloffset_Color4sv,
_gloffset_Color4usv,
_gloffset_Color4iv,
_gloffset_Color4uiv,
_gloffset_Color4fv,
_gloffset_Color4dv,
},
};
static const int VertexFuncs[3][8] = {
{
-1,
-1,
_gloffset_Vertex2sv,
-1,
_gloffset_Vertex2iv,
-1,
_gloffset_Vertex2fv,
_gloffset_Vertex2dv,
},
{
-1,
-1,
_gloffset_Vertex3sv,
-1,
_gloffset_Vertex3iv,
-1,
_gloffset_Vertex3fv,
_gloffset_Vertex3dv,
},
{
-1,
-1,
_gloffset_Vertex4sv,
-1,
_gloffset_Vertex4iv,
-1,
_gloffset_Vertex4fv,
_gloffset_Vertex4dv,
},
};
static const int IndexFuncs[8] = {
-1,
_gloffset_Indexubv,
_gloffset_Indexsv,
-1,
_gloffset_Indexiv,
-1,
_gloffset_Indexfv,
_gloffset_Indexdv,
};
static const int NormalFuncs[8] = {
_gloffset_Normal3bv,
-1,
_gloffset_Normal3sv,
-1,
_gloffset_Normal3iv,
-1,
_gloffset_Normal3fv,
_gloffset_Normal3dv,
};
#if defined(IN_DRI_DRIVER)
static int SecondaryColorFuncs[8];
static int FogCoordFuncs[8] = {
-1,
-1,
-1,
-1,
-1,
-1,
0,
0,
};
#else
static const int SecondaryColorFuncs[8] = {
_gloffset_SecondaryColor3bvEXT,
_gloffset_SecondaryColor3ubvEXT,
_gloffset_SecondaryColor3svEXT,
_gloffset_SecondaryColor3usvEXT,
_gloffset_SecondaryColor3ivEXT,
_gloffset_SecondaryColor3uivEXT,
_gloffset_SecondaryColor3fvEXT,
_gloffset_SecondaryColor3dvEXT,
};
static const int FogCoordFuncs[8] = {
-1,
-1,
-1,
-1,
-1,
-1,
_gloffset_FogCoordfvEXT,
_gloffset_FogCoorddvEXT
};
#endif
/**********************************************************************/
/* GL_BYTE attributes */
static void GLAPIENTRY VertexAttrib1NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0])));
}
static void GLAPIENTRY VertexAttrib1bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, v[0]));
}
static void GLAPIENTRY VertexAttrib2NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1])));
}
static void GLAPIENTRY VertexAttrib2bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, v[0], v[1]));
}
static void GLAPIENTRY VertexAttrib3NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
BYTE_TO_FLOAT(v[1]),
BYTE_TO_FLOAT(v[2])));
}
static void GLAPIENTRY VertexAttrib3bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
static void GLAPIENTRY VertexAttrib4NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
BYTE_TO_FLOAT(v[1]),
BYTE_TO_FLOAT(v[2]),
BYTE_TO_FLOAT(v[3])));
}
static void GLAPIENTRY VertexAttrib4bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, v[0], v[1], v[2], v[3]));
}
/* GL_UNSIGNED_BYTE attributes */
static void GLAPIENTRY VertexAttrib1NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0])));
}
static void GLAPIENTRY VertexAttrib1ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, v[0]));
}
static void GLAPIENTRY VertexAttrib2NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
UBYTE_TO_FLOAT(v[1])));
}
static void GLAPIENTRY VertexAttrib2ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, v[0], v[1]));
}
static void GLAPIENTRY VertexAttrib3NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
UBYTE_TO_FLOAT(v[1]),
UBYTE_TO_FLOAT(v[2])));
}
static void GLAPIENTRY VertexAttrib3ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
static void GLAPIENTRY VertexAttrib4NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
UBYTE_TO_FLOAT(v[1]),
UBYTE_TO_FLOAT(v[2]),
UBYTE_TO_FLOAT(v[3])));
}
static void GLAPIENTRY VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, v[0], v[1], v[2], v[3]));
}
/* GL_SHORT attributes */
static void GLAPIENTRY VertexAttrib1NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0])));
}
static void GLAPIENTRY VertexAttrib1svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, v[0]));
}
static void GLAPIENTRY VertexAttrib2NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
SHORT_TO_FLOAT(v[1])));
}
static void GLAPIENTRY VertexAttrib2svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, v[0], v[1]));
}
static void GLAPIENTRY VertexAttrib3NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
SHORT_TO_FLOAT(v[1]),
SHORT_TO_FLOAT(v[2])));
}
static void GLAPIENTRY VertexAttrib3svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
static void GLAPIENTRY VertexAttrib4NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
SHORT_TO_FLOAT(v[1]),
SHORT_TO_FLOAT(v[2]),
SHORT_TO_FLOAT(v[3])));
}
static void GLAPIENTRY VertexAttrib4svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, v[0], v[1], v[2], v[3]));
}
/* GL_UNSIGNED_SHORT attributes */
static void GLAPIENTRY VertexAttrib1NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0])));
}
static void GLAPIENTRY VertexAttrib1usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, v[0]));
}
static void GLAPIENTRY VertexAttrib2NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1])));
}
static void GLAPIENTRY VertexAttrib2usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, v[0], v[1]));
}
static void GLAPIENTRY VertexAttrib3NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1]),
USHORT_TO_FLOAT(v[2])));
}
static void GLAPIENTRY VertexAttrib3usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
static void GLAPIENTRY VertexAttrib4NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1]),
USHORT_TO_FLOAT(v[2]),
USHORT_TO_FLOAT(v[3])));
}
static void GLAPIENTRY VertexAttrib4usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, v[0], v[1], v[2], v[3]));
}
/* GL_INT attributes */
static void GLAPIENTRY VertexAttrib1NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0])));
}
static void GLAPIENTRY VertexAttrib1ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, v[0]));
}
static void GLAPIENTRY VertexAttrib2NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1])));
}
static void GLAPIENTRY VertexAttrib2ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, v[0], v[1]));
}
static void GLAPIENTRY VertexAttrib3NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1]),
INT_TO_FLOAT(v[2])));
}
static void GLAPIENTRY VertexAttrib3ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
static void GLAPIENTRY VertexAttrib4NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1]),
INT_TO_FLOAT(v[2]),
INT_TO_FLOAT(v[3])));
}
static void GLAPIENTRY VertexAttrib4ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, v[0], v[1], v[2], v[3]));
}
/* GL_UNSIGNED_INT attributes */
static void GLAPIENTRY VertexAttrib1NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0])));
}
static void GLAPIENTRY VertexAttrib1uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, v[0]));
}
static void GLAPIENTRY VertexAttrib2NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1])));
}
static void GLAPIENTRY VertexAttrib2uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, v[0], v[1]));
}
static void GLAPIENTRY VertexAttrib3NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1]),
UINT_TO_FLOAT(v[2])));
}
static void GLAPIENTRY VertexAttrib3uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, v[0], v[1], v[2]));
}
static void GLAPIENTRY VertexAttrib4NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1]),
UINT_TO_FLOAT(v[2]),
UINT_TO_FLOAT(v[3])));
}
static void GLAPIENTRY VertexAttrib4uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, v[0], v[1], v[2], v[3]));
}
/* GL_FLOAT attributes */
static void GLAPIENTRY VertexAttrib1fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib1fvNV(GET_DISPATCH(), (index, v));
}
static void GLAPIENTRY VertexAttrib2fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib2fvNV(GET_DISPATCH(), (index, v));
}
static void GLAPIENTRY VertexAttrib3fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib3fvNV(GET_DISPATCH(), (index, v));
}
static void GLAPIENTRY VertexAttrib4fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib4fvNV(GET_DISPATCH(), (index, v));
}
/* GL_DOUBLE attributes */
static void GLAPIENTRY VertexAttrib1dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib1dvNV(GET_DISPATCH(), (index, v));
}
static void GLAPIENTRY VertexAttrib2dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib2dvNV(GET_DISPATCH(), (index, v));
}
static void GLAPIENTRY VertexAttrib3dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib3dvNV(GET_DISPATCH(), (index, v));
}
static void GLAPIENTRY VertexAttrib4dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib4dvNV(GET_DISPATCH(), (index, v));
}
/*
* Array [size][type] of VertexAttrib functions
*/
static attrib_func AttribFuncsNV[2][4][8] = {
{
/* non-normalized */
{
/* size 1 */
(attrib_func) VertexAttrib1bvNV,
(attrib_func) VertexAttrib1ubvNV,
(attrib_func) VertexAttrib1svNV,
(attrib_func) VertexAttrib1usvNV,
(attrib_func) VertexAttrib1ivNV,
(attrib_func) VertexAttrib1uivNV,
(attrib_func) VertexAttrib1fvNV,
(attrib_func) VertexAttrib1dvNV
},
{
/* size 2 */
(attrib_func) VertexAttrib2bvNV,
(attrib_func) VertexAttrib2ubvNV,
(attrib_func) VertexAttrib2svNV,
(attrib_func) VertexAttrib2usvNV,
(attrib_func) VertexAttrib2ivNV,
(attrib_func) VertexAttrib2uivNV,
(attrib_func) VertexAttrib2fvNV,
(attrib_func) VertexAttrib2dvNV
},
{
/* size 3 */
(attrib_func) VertexAttrib3bvNV,
(attrib_func) VertexAttrib3ubvNV,
(attrib_func) VertexAttrib3svNV,
(attrib_func) VertexAttrib3usvNV,
(attrib_func) VertexAttrib3ivNV,
(attrib_func) VertexAttrib3uivNV,
(attrib_func) VertexAttrib3fvNV,
(attrib_func) VertexAttrib3dvNV
},
{
/* size 4 */
(attrib_func) VertexAttrib4bvNV,
(attrib_func) VertexAttrib4ubvNV,
(attrib_func) VertexAttrib4svNV,
(attrib_func) VertexAttrib4usvNV,
(attrib_func) VertexAttrib4ivNV,
(attrib_func) VertexAttrib4uivNV,
(attrib_func) VertexAttrib4fvNV,
(attrib_func) VertexAttrib4dvNV
}
},
{
/* normalized (except for float/double) */
{
/* size 1 */
(attrib_func) VertexAttrib1NbvNV,
(attrib_func) VertexAttrib1NubvNV,
(attrib_func) VertexAttrib1NsvNV,
(attrib_func) VertexAttrib1NusvNV,
(attrib_func) VertexAttrib1NivNV,
(attrib_func) VertexAttrib1NuivNV,
(attrib_func) VertexAttrib1fvNV,
(attrib_func) VertexAttrib1dvNV
},
{
/* size 2 */
(attrib_func) VertexAttrib2NbvNV,
(attrib_func) VertexAttrib2NubvNV,
(attrib_func) VertexAttrib2NsvNV,
(attrib_func) VertexAttrib2NusvNV,
(attrib_func) VertexAttrib2NivNV,
(attrib_func) VertexAttrib2NuivNV,
(attrib_func) VertexAttrib2fvNV,
(attrib_func) VertexAttrib2dvNV
},
{
/* size 3 */
(attrib_func) VertexAttrib3NbvNV,
(attrib_func) VertexAttrib3NubvNV,
(attrib_func) VertexAttrib3NsvNV,
(attrib_func) VertexAttrib3NusvNV,
(attrib_func) VertexAttrib3NivNV,
(attrib_func) VertexAttrib3NuivNV,
(attrib_func) VertexAttrib3fvNV,
(attrib_func) VertexAttrib3dvNV
},
{
/* size 4 */
(attrib_func) VertexAttrib4NbvNV,
(attrib_func) VertexAttrib4NubvNV,
(attrib_func) VertexAttrib4NsvNV,
(attrib_func) VertexAttrib4NusvNV,
(attrib_func) VertexAttrib4NivNV,
(attrib_func) VertexAttrib4NuivNV,
(attrib_func) VertexAttrib4fvNV,
(attrib_func) VertexAttrib4dvNV
}
}
};
/**********************************************************************/
GLboolean _ae_create_context( GLcontext *ctx )
{
if (ctx->aelt_context)
return GL_TRUE;
#if defined(IN_DRI_DRIVER)
SecondaryColorFuncs[0] = _gloffset_SecondaryColor3bvEXT;
SecondaryColorFuncs[1] = _gloffset_SecondaryColor3ubvEXT;
SecondaryColorFuncs[2] = _gloffset_SecondaryColor3svEXT;
SecondaryColorFuncs[3] = _gloffset_SecondaryColor3usvEXT;
SecondaryColorFuncs[4] = _gloffset_SecondaryColor3ivEXT;
SecondaryColorFuncs[5] = _gloffset_SecondaryColor3uivEXT;
SecondaryColorFuncs[6] = _gloffset_SecondaryColor3fvEXT;
SecondaryColorFuncs[7] = _gloffset_SecondaryColor3dvEXT;
FogCoordFuncs[6] = _gloffset_FogCoordfvEXT;
FogCoordFuncs[7] = _gloffset_FogCoorddvEXT;
#endif
ctx->aelt_context = MALLOC( sizeof(AEcontext) );
if (!ctx->aelt_context)
return GL_FALSE;
AE_CONTEXT(ctx)->NewState = ~0;
return GL_TRUE;
}
void _ae_destroy_context( GLcontext *ctx )
{
if ( AE_CONTEXT( ctx ) ) {
FREE( ctx->aelt_context );
ctx->aelt_context = NULL;
}
}
/**
* Make a list of per-vertex functions to call for each glArrayElement call.
* These functions access the array data (i.e. glVertex, glColor, glNormal,
* etc).
* Note: this may be called during display list construction.
*/
static void _ae_update_state( GLcontext *ctx )
{
AEcontext *actx = AE_CONTEXT(ctx);
AEarray *aa = actx->arrays;
AEattrib *at = actx->attribs;
GLuint i;
/* conventional vertex arrays */
if (ctx->Array.Index.Enabled) {
aa->array = &ctx->Array.Index;
aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
if (ctx->Array.EdgeFlag.Enabled) {
aa->array = &ctx->Array.EdgeFlag;
aa->offset = _gloffset_EdgeFlagv;
aa++;
}
if (ctx->Array.Normal.Enabled) {
aa->array = &ctx->Array.Normal;
aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
if (ctx->Array.Color.Enabled) {
aa->array = &ctx->Array.Color;
aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)];
aa++;
}
if (ctx->Array.SecondaryColor.Enabled) {
aa->array = &ctx->Array.SecondaryColor;
aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
if (ctx->Array.FogCoord.Enabled) {
aa->array = &ctx->Array.FogCoord;
aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)];
aa++;
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
if (ctx->Array.TexCoord[i].Enabled) {
/* NOTE: we use generic glVertexAttrib functions here.
* If we ever de-alias conventional/generic vertex attribs this
* will have to change.
*/
struct gl_client_array *attribArray = &ctx->Array.TexCoord[i];
at->array = attribArray;
at->func = AttribFuncsNV[at->array->Normalized][at->array->Size-1][TYPE_IDX(at->array->Type)];
at->index = VERT_ATTRIB_TEX0 + i;
at++;
}
}
/* generic vertex attribute arrays */
for (i = 1; i < VERT_ATTRIB_MAX; i++) { /* skip zero! */
if (ctx->Array.VertexAttrib[i].Enabled) {
struct gl_client_array *attribArray = &ctx->Array.VertexAttrib[i];
at->array = attribArray;
/* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
* function pointer here (for float arrays) since the pointer may
* change from one execution of _ae_loopback_array_elt() to
* the next. Doing so caused UT to break.
*/
at->func = AttribFuncsNV[at->array->Normalized][at->array->Size-1][TYPE_IDX(at->array->Type)];
at->index = i;
at++;
}
}
/* finally, vertex position */
if (ctx->Array.VertexAttrib[0].Enabled) {
/* Use glVertex(v) instead of glVertexAttrib(0, v) to be sure it's
* issued as the last (proviking) attribute).
*/
aa->array = &ctx->Array.VertexAttrib[0];
assert(aa->array->Size >= 2); /* XXX fix someday? */
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
aa++;
}
else if (ctx->Array.Vertex.Enabled) {
aa->array = &ctx->Array.Vertex;
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
aa++;
}
ASSERT(at - actx->attribs <= VERT_ATTRIB_MAX);
ASSERT(aa - actx->arrays < 32);
at->func = NULL; /* terminate the list */
aa->offset = -1; /* terminate the list */
actx->NewState = 0;
}
/**
* Called via glArrayElement() and glDrawArrays().
* Issue the glNormal, glVertex, glColor, glVertexAttrib, etc functions
* for all enabled vertex arrays (for elt-th element).
* Note: this may be called during display list construction.
*/
void GLAPIENTRY _ae_loopback_array_elt( GLint elt )
{
GET_CURRENT_CONTEXT(ctx);
const AEcontext *actx = AE_CONTEXT(ctx);
const AEarray *aa;
const AEattrib *at;
const struct _glapi_table * const disp = GET_DISPATCH();
if (actx->NewState)
_ae_update_state( ctx );
/* generic attributes */
for (at = actx->attribs; at->func; at++) {
const GLubyte *src = at->array->BufferObj->Data
+ (uintptr_t) at->array->Ptr
+ elt * at->array->StrideB;
at->func( at->index, src );
}
/* conventional arrays */
for (aa = actx->arrays; aa->offset != -1 ; aa++) {
const GLubyte *src = aa->array->BufferObj->Data
+ (uintptr_t) aa->array->Ptr
+ elt * aa->array->StrideB;
CALL_by_offset( disp, (array_func), aa->offset,
((const void *) src) );
}
}
void _ae_invalidate_state( GLcontext *ctx, GLuint new_state )
{
AE_CONTEXT(ctx)->NewState |= new_state;
}
@@ -1,37 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef API_ARRAYELT_H
#define API_ARRAYELT_H
#include "mtypes.h"
extern GLboolean _ae_create_context( GLcontext *ctx );
extern void _ae_destroy_context( GLcontext *ctx );
extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state );
extern void GLAPIENTRY _ae_loopback_array_elt( GLint elt );
#endif

Some files were not shown because too many files have changed in this diff Show More