Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

640 lines
25 KiB

  1. #ifndef _texture_h_
  2. #define _texture_h_
  3. /*
  4. ** Copyright 1991,1992, Silicon Graphics, Inc.
  5. ** All Rights Reserved.
  6. **
  7. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  8. ** the contents of this file may not be disclosed to third parties, copied or
  9. ** duplicated in any form, in whole or in part, without the prior written
  10. ** permission of Silicon Graphics, Inc.
  11. **
  12. ** RESTRICTED RIGHTS LEGEND:
  13. ** Use, duplication or disclosure by the Government is subject to restrictions
  14. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  15. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  16. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  17. ** rights reserved under the Copyright Laws of the United States.
  18. **
  19. ** $Revision: 1.11 $
  20. ** $Date: 1995/01/25 18:07:23 $
  21. */
  22. #include "types.h"
  23. #define __GL_TEX_TARGET_INDEX_1D 2
  24. #define __GL_TEX_TARGET_INDEX_2D 3
  25. // This doesn't correspond to an actual default texture, it's just a special
  26. // name for the static DDraw texobj.
  27. #define __GL_TEX_TARGET_INDEX_DDRAW 4
  28. // Texobj name for the DDraw texobj. This can't be zero because it
  29. // must be distinct from a default texture name. Technically that's
  30. // all that matters, but in reality it's nice to use a number that's
  31. // uncommon as a normal texture name because it makes it easy to
  32. // identify the DDraw texture object vs. a normal texture object.
  33. // This difference can never be guaranteed, though, so no code should
  34. // ever be written that assumes name matching is good enough to
  35. // identify the DDraw texture object.
  36. #define __GL_TEX_DDRAW 0xdddddddd
  37. /*
  38. ** Client state set with glTexGen.
  39. **
  40. ** This structure is shared with MCD as MCDTEXTURECOORDGENERATION.
  41. */
  42. typedef struct __GLtextureCoordStateRec {
  43. /* How coordinates are being generated */
  44. GLenum mode;
  45. /* eye plane set via API, stored for MCD */
  46. __GLcoord eyePlaneSet;
  47. /* eye plane equation (used iff mode == GL_EYE_LINEAR) */
  48. __GLcoord eyePlaneEquation;
  49. /* object plane equation (used iff mode == GL_OBJECT_LINEAR) */
  50. __GLcoord objectPlaneEquation;
  51. } __GLtextureCoordState;
  52. /*
  53. ** Client state set with glTexEnv
  54. */
  55. typedef struct __GLtextureEnvStateRec {
  56. /* environment "blend" function */
  57. GLenum mode;
  58. /* environment color */
  59. __GLcolor color;
  60. } __GLtextureEnvState;
  61. //!!! Don't change this structure without changing MCDTEXTURESTATE !!!
  62. /*
  63. ** Client state set with glTexParameter
  64. */
  65. typedef struct __GLtextureParamStateRec {
  66. /* S & T wrap modes */
  67. GLenum sWrapMode;
  68. GLenum tWrapMode;
  69. /* min and mag filter */
  70. GLenum minFilter;
  71. GLenum magFilter;
  72. /* border color */
  73. __GLcolor borderColor; /* Unscaled! */
  74. } __GLtextureParamState;
  75. /*
  76. ** Stackable texture object state.
  77. */
  78. typedef struct __GLtextureObjectStateRec {
  79. GLuint name; /* name of the texture */
  80. GLfloat priority; /* priority of the texture object */
  81. } __GLtextureObjectState;
  82. /*
  83. ** Client state per texture map per dimension.
  84. */
  85. typedef struct __GLperTextureStateRec {
  86. /*
  87. ** Texture parameter state (set with glTexParameter).
  88. */
  89. __GLtextureParamState params;
  90. /*
  91. ** Texture object bindings and priorities.
  92. */
  93. __GLtextureObjectState texobjs;
  94. } __GLperTextureState;
  95. /*
  96. ** Stackable client texture state. This does not include
  97. ** the mipmaps, or level dependent state. Only state which is
  98. ** stackable via glPushAttrib/glPopAttrib is here. The rest of the
  99. ** state is in the machine structure below.
  100. */
  101. typedef struct __GLtextureStateRec {
  102. /* Per coordinate texture state (set with glTexGen) */
  103. __GLtextureCoordState s;
  104. __GLtextureCoordState t;
  105. __GLtextureCoordState r;
  106. __GLtextureCoordState q;
  107. /* Per texture state */
  108. __GLperTextureState *texture;
  109. /* Per texture environment state */
  110. __GLtextureEnvState *env;
  111. } __GLtextureState;
  112. /************************************************************************/
  113. typedef __GLfloat __GLtextureBuffer;
  114. typedef struct __GLtexelRec {
  115. __GLfloat r, g, b;
  116. __GLfloat luminance;
  117. __GLfloat alpha;
  118. __GLfloat intensity;
  119. } __GLtexel;
  120. /************************************************************************/
  121. typedef struct __GLmipMapLevelRec __GLmipMapLevel;
  122. typedef struct __GLtextureRec __GLtexture;
  123. //!!! Don't change this structure without changing MCDMIPMAPLEVEL !!!
  124. struct __GLmipMapLevelRec {
  125. __GLtextureBuffer *buffer;
  126. /* Image dimensions, including border */
  127. GLint width, height;
  128. /* Image dimensions, doesn't include border */
  129. GLint width2, height2;
  130. __GLfloat width2f, height2f;
  131. /* log2 of width2 & height2 */
  132. GLint widthLog2, heightLog2;
  133. /* Border size */
  134. GLint border;
  135. /* Requested internal format */
  136. GLint requestedFormat;
  137. /* Base internal format */
  138. GLint baseFormat;
  139. /* Actual internal format */
  140. GLint internalFormat;
  141. /* Component resolution */
  142. GLint redSize;
  143. GLint greenSize;
  144. GLint blueSize;
  145. GLint alphaSize;
  146. GLint luminanceSize;
  147. GLint intensitySize;
  148. /* Extract function for this mipmap level */
  149. void (FASTCALL *extract)(__GLmipMapLevel *level, __GLtexture *tex,
  150. GLint row, GLint col, __GLtexel *result);
  151. };
  152. //!!! Don't change this structure without changing MCDTEXTUREDATA !!!
  153. struct __GLtextureRec {
  154. /* Back pointer to context */
  155. __GLcontext *gc;
  156. /* Copy of parameter state */
  157. // This is the start of MCDTEXTUREDATA:
  158. __GLtextureParamState params;
  159. /* Copy of texure object stackable state */
  160. __GLtextureObjectState texobjs;
  161. /* Level information */
  162. __GLmipMapLevel *level;
  163. /* Dimension of this texture (1 or 2) */
  164. GLint dim;
  165. #ifdef GL_EXT_paletted_texture
  166. // The palette is the same for all mipmap levels so it
  167. // is a texture field rather than a mipmap field
  168. GLsizei paletteSize;
  169. RGBQUAD *paletteData;
  170. // Type of palette data, determined by glColorTableEXT
  171. // and applied to all mipmap levels
  172. GLenum paletteBaseFormat;
  173. // internalFormat given in glColorTableEXT call, for
  174. // GL_COLOR_TABLE_FORMAT requests
  175. GLenum paletteRequestedFormat;
  176. #endif
  177. /* maximum( log2(level[0].width2), log2(level[0].height2) ) */
  178. GLint p;
  179. /* Min/Mag switchover point */
  180. __GLfloat c;
  181. /* Create a new mipmap level for this texture */
  182. __GLtextureBuffer * (FASTCALL *createLevel)(__GLcontext *gc, __GLtexture *tex,
  183. GLint lod, GLint components,
  184. GLsizei w, GLsizei h, GLint border,
  185. GLint dim);
  186. /* Texturing function for this texture */
  187. void (*textureFunc)(__GLcontext *gc, __GLcolor *color,
  188. __GLfloat s, __GLfloat t, __GLfloat rho);
  189. /* Apply current environment function to fragment */
  190. void (FASTCALL *env)(__GLcontext *gc, __GLcolor *color, __GLtexel *texel);
  191. /* Magnification routine for this texture */
  192. void (FASTCALL *magnify)(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  193. __GLcolor *color, __GLfloat s, __GLfloat t,
  194. __GLtexel *result);
  195. /* Minification routine for this texture */
  196. void (FASTCALL *minnify)(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  197. __GLcolor *color, __GLfloat s, __GLfloat t,
  198. __GLtexel *result);
  199. /* Linear filter for this texture */
  200. void (FASTCALL *linear)(__GLcontext *gc, __GLtexture *tex,
  201. __GLmipMapLevel *lp, __GLcolor *color,
  202. __GLfloat s, __GLfloat t, __GLtexel *result);
  203. /* Nearest filter for this texture */
  204. void (FASTCALL *nearest)(__GLcontext *gc, __GLtexture *tex,
  205. __GLmipMapLevel *lp, __GLcolor *color,
  206. __GLfloat s, __GLfloat t, __GLtexel *result);
  207. void *pvUser; // user-defined expansion for caching, etc.
  208. DWORD textureKey; // driver-private key for MCD-accelerated textures
  209. // The palette can be subdivided into multiple sections. paletteSize
  210. // and paletteData point to a single section, while the Total versions
  211. // contain information about the entire palette.
  212. GLsizei paletteTotalSize;
  213. RGBQUAD *paletteTotalData;
  214. // Number of subdivisions in total palette minus one
  215. GLsizei paletteDivision;
  216. // Shift to go from subdivision number to palette entry
  217. GLsizei paletteDivShift;
  218. };
  219. typedef struct __GLperTextureMachineRec {
  220. __GLtexture map;
  221. } __GLperTextureMachine;
  222. /*
  223. ** Texture object structure.
  224. ** refcount field MUST be first in the structure.
  225. */
  226. typedef struct __GLtextureObjectRec {
  227. GLint refcount; /* reference count: create with 1; delete when 0 */
  228. /* refcount MUST be first in this structure */
  229. GLenum targetIndex; /* index of the target it's bound to */
  230. GLboolean resident; /* residence status of the texture object */
  231. __GLperTextureMachine texture; /* actual texture data */
  232. struct __GLtextureObjectRec *lowerPriority; /* Priority list link */
  233. struct __GLtextureObjectRec *higherPriority; /* Priority list link */
  234. HANDLE loadKey; /* Texture memory load key for unloading */
  235. } __GLtextureObject;
  236. typedef struct __GLsharedTextureStateRec {
  237. /* Stores pointers to texture objects, retrieved by name */
  238. __GLnamesArray *namesArray;
  239. /* List of all texture objects sorted by priority */
  240. __GLtextureObject *priorityListHighest;
  241. __GLtextureObject *priorityListLowest;
  242. } __GLsharedTextureState;
  243. /*
  244. ** DDraw texture flags.
  245. */
  246. /* Whether the texture's format is supported by generic or not */
  247. #define DDTEX_GENERIC_FORMAT 0x00000001
  248. /* Whether all texture surfaces are in video memory or not */
  249. #define DDTEX_VIDEO_MEMORY 0x00000002
  250. typedef struct ___GLddrawTexture {
  251. /* If levels is greater than zero, a DirectDraw texture is current */
  252. GLint levels;
  253. /* Level-zero surface with cached description */
  254. GLDDSURF gdds;
  255. /* Storage space for DirectDraw texture definitions */
  256. __GLtextureObject texobj;
  257. /* levels surface pointers */
  258. LPDIRECTDRAWSURFACE *pdds;
  259. GLuint flags;
  260. } __GLddrawTexture;
  261. typedef struct __GLtextureMachineRec {
  262. __GLperTextureMachine **texture;
  263. /* Array of ptrs to the currently bound texture objects. */
  264. __GLtextureObject **boundTextures;
  265. /* Array of dummy texture objects for the default textures */
  266. __GLtextureObject *defaultTextures;
  267. #ifdef GL_WIN_multiple_textures
  268. /* Current texture index */
  269. GLuint texIndex;
  270. #endif // GL_WIN_multiple_textures
  271. /* Current enabled texture */
  272. __GLtexture *currentTexture;
  273. /* Current DirectDraw texture */
  274. __GLddrawTexture ddtex;
  275. /* The OR of all texture enable bits */
  276. GLboolean textureEnabled;
  277. /* State that can be shared between contexts */
  278. __GLsharedTextureState *shared;
  279. } __GLtextureMachine;
  280. /************************************************************************/
  281. /* Check for texture consistency before enabling texturing */
  282. extern GLboolean FASTCALL __glIsTextureConsistent(__GLcontext *gc, GLenum texture);
  283. /* Fragment texturing routines */
  284. extern void __glFastTextureFragment(__GLcontext *gc, __GLcolor *color,
  285. __GLfloat s, __GLfloat t, __GLfloat rho);
  286. extern void __glTextureFragment(__GLcontext *gc, __GLcolor *color,
  287. __GLfloat s, __GLfloat t, __GLfloat rho);
  288. extern void __glMipMapFragment(__GLcontext *gc, __GLcolor *color,
  289. __GLfloat s, __GLfloat t, __GLfloat rho);
  290. /* Texturing routines */
  291. extern void FASTCALL __glLinearFilter(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  292. __GLcolor *color, __GLfloat s, __GLfloat t,
  293. __GLtexel *result);
  294. extern void FASTCALL __glNearestFilter(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  295. __GLcolor *color, __GLfloat s, __GLfloat t,
  296. __GLtexel *result);
  297. extern void FASTCALL __glNMNFilter(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  298. __GLcolor *color, __GLfloat s, __GLfloat t,
  299. __GLtexel *result);
  300. extern void FASTCALL __glLMNFilter(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  301. __GLcolor *color, __GLfloat s, __GLfloat t,
  302. __GLtexel *result);
  303. extern void FASTCALL __glNMLFilter(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  304. __GLcolor *color, __GLfloat s, __GLfloat t,
  305. __GLtexel *result);
  306. extern void FASTCALL __glLMLFilter(__GLcontext *gc, __GLtexture *tex, __GLfloat lod,
  307. __GLcolor *color, __GLfloat s, __GLfloat t,
  308. __GLtexel *result);
  309. /* Filter routines */
  310. extern void FASTCALL __glLinearFilter1(__GLcontext *gc, __GLtexture *tex,
  311. __GLmipMapLevel *lp, __GLcolor *color,
  312. __GLfloat s, __GLfloat t, __GLtexel *result);
  313. extern void FASTCALL __glLinearFilter2(__GLcontext *gc, __GLtexture *tex,
  314. __GLmipMapLevel *lp, __GLcolor *color,
  315. __GLfloat s, __GLfloat t, __GLtexel *result);
  316. extern void FASTCALL __glNearestFilter1(__GLcontext *gc, __GLtexture *tex,
  317. __GLmipMapLevel *lp, __GLcolor *color,
  318. __GLfloat s, __GLfloat t, __GLtexel *result);
  319. extern void FASTCALL __glNearestFilter2(__GLcontext *gc, __GLtexture *tex,
  320. __GLmipMapLevel *lp, __GLcolor *color,
  321. __GLfloat s, __GLfloat t, __GLtexel *result);
  322. extern void FASTCALL __glLinearFilter2_BGR8Repeat(__GLcontext *gc,
  323. __GLtexture *tex, __GLmipMapLevel *lp, __GLcolor *color,
  324. __GLfloat s, __GLfloat t, __GLtexel *result);
  325. extern void FASTCALL __glLinearFilter2_BGRA8Repeat(__GLcontext *gc,
  326. __GLtexture *tex, __GLmipMapLevel *lp, __GLcolor *color,
  327. __GLfloat s, __GLfloat t, __GLtexel *result);
  328. /* Texture environment functions */
  329. extern void FASTCALL __glTextureModulateL(__GLcontext *gc, __GLcolor *color,
  330. __GLtexel *tx);
  331. extern void FASTCALL __glTextureModulateLA(__GLcontext *gc, __GLcolor *color,
  332. __GLtexel *tx);
  333. extern void FASTCALL __glTextureModulateRGB(__GLcontext *gc, __GLcolor *color,
  334. __GLtexel *tx);
  335. extern void FASTCALL __glTextureModulateRGBA(__GLcontext *gc, __GLcolor *color,
  336. __GLtexel *tx);
  337. extern void FASTCALL __glTextureModulateA(__GLcontext *gc, __GLcolor *color,
  338. __GLtexel *tx);
  339. extern void FASTCALL __glTextureModulateI(__GLcontext *gc, __GLcolor *color,
  340. __GLtexel *tx);
  341. extern void FASTCALL __glTextureDecalRGB(__GLcontext *gc, __GLcolor *color,
  342. __GLtexel *tx);
  343. extern void FASTCALL __glTextureDecalRGBA(__GLcontext *gc, __GLcolor *color,
  344. __GLtexel *tx);
  345. extern void FASTCALL __glTextureBlendL(__GLcontext *gc, __GLcolor *color,
  346. __GLtexel *tx);
  347. extern void FASTCALL __glTextureBlendLA(__GLcontext *gc, __GLcolor *color,
  348. __GLtexel *tx);
  349. extern void FASTCALL __glTextureBlendRGB(__GLcontext *gc, __GLcolor *color,
  350. __GLtexel *tx);
  351. extern void FASTCALL __glTextureBlendRGBA(__GLcontext *gc, __GLcolor *color,
  352. __GLtexel *tx);
  353. extern void FASTCALL __glTextureBlendA(__GLcontext *gc, __GLcolor *color,
  354. __GLtexel *tx);
  355. extern void FASTCALL __glTextureBlendI(__GLcontext *gc, __GLcolor *color,
  356. __GLtexel *tx);
  357. extern void FASTCALL __glTextureReplaceL(__GLcontext *gc, __GLcolor *color,
  358. __GLtexel *tx);
  359. extern void FASTCALL __glTextureReplaceLA(__GLcontext *gc, __GLcolor *color,
  360. __GLtexel *tx);
  361. extern void FASTCALL __glTextureReplaceRGB(__GLcontext *gc, __GLcolor *color,
  362. __GLtexel *tx);
  363. extern void FASTCALL __glTextureReplaceRGBA(__GLcontext *gc, __GLcolor *color,
  364. __GLtexel *tx);
  365. extern void FASTCALL __glTextureReplaceA(__GLcontext *gc, __GLcolor *color,
  366. __GLtexel *tx);
  367. extern void FASTCALL __glTextureReplaceI(__GLcontext *gc, __GLcolor *color,
  368. __GLtexel *tx);
  369. /* Extract a texel from a texture level (no border) */
  370. extern void FASTCALL __glExtractTexelL(__GLmipMapLevel *level, __GLtexture *tex,
  371. GLint row, GLint col, __GLtexel *res);
  372. extern void FASTCALL __glExtractTexelLA(__GLmipMapLevel *level, __GLtexture *tex,
  373. GLint row, GLint col, __GLtexel *res);
  374. extern void FASTCALL __glExtractTexelRGB(__GLmipMapLevel *level, __GLtexture *tex,
  375. GLint row, GLint col, __GLtexel *res);
  376. extern void FASTCALL __glExtractTexelRGBA(__GLmipMapLevel *level, __GLtexture *tex,
  377. GLint row, GLint col, __GLtexel *res);
  378. extern void FASTCALL __glExtractTexelA(__GLmipMapLevel *level, __GLtexture *tex,
  379. GLint row, GLint col, __GLtexel *res);
  380. extern void FASTCALL __glExtractTexelI(__GLmipMapLevel *level, __GLtexture *tex,
  381. GLint row, GLint col, __GLtexel *res);
  382. extern void FASTCALL __glExtractTexelRGB8(__GLmipMapLevel *level, __GLtexture *tex,
  383. GLint row, GLint col, __GLtexel *res);
  384. extern void FASTCALL __glExtractTexelRGBA8(__GLmipMapLevel *level, __GLtexture *tex,
  385. GLint row, GLint col, __GLtexel *res);
  386. extern void FASTCALL __glExtractTexelBGR8(__GLmipMapLevel *level, __GLtexture *tex,
  387. GLint row, GLint col, __GLtexel *res);
  388. extern void FASTCALL __glExtractTexelBGRA8(__GLmipMapLevel *level, __GLtexture *tex,
  389. GLint row, GLint col, __GLtexel *res);
  390. /* Extract a texel from a texture level (the texture has a border) */
  391. extern void FASTCALL __glExtractTexelL_B(__GLmipMapLevel *level, __GLtexture *tex,
  392. GLint row, GLint col, __GLtexel *res);
  393. extern void FASTCALL __glExtractTexelLA_B(__GLmipMapLevel *level, __GLtexture *tex,
  394. GLint row, GLint col, __GLtexel *res);
  395. extern void FASTCALL __glExtractTexelRGB_B(__GLmipMapLevel *level, __GLtexture *tex,
  396. GLint row, GLint col, __GLtexel *res);
  397. extern void FASTCALL __glExtractTexelRGBA_B(__GLmipMapLevel *level, __GLtexture *tex,
  398. GLint row, GLint col, __GLtexel *res);
  399. extern void FASTCALL __glExtractTexelA_B(__GLmipMapLevel *level, __GLtexture *tex,
  400. GLint row, GLint col, __GLtexel *res);
  401. extern void FASTCALL __glExtractTexelI_B(__GLmipMapLevel *level, __GLtexture *tex,
  402. GLint row, GLint col, __GLtexel *res);
  403. extern void FASTCALL __glExtractTexelRGB8_B(__GLmipMapLevel *level, __GLtexture *tex,
  404. GLint row, GLint col, __GLtexel *res);
  405. extern void FASTCALL __glExtractTexelRGBA8_B(__GLmipMapLevel *level, __GLtexture *tex,
  406. GLint row, GLint col, __GLtexel *res);
  407. #ifdef GL_EXT_paletted_texture
  408. extern void FASTCALL __glExtractTexelPI8BGR_B(__GLmipMapLevel *level, __GLtexture *tex,
  409. GLint row, GLint col, __GLtexel *res);
  410. extern void FASTCALL __glExtractTexelPI8BGR(__GLmipMapLevel *level, __GLtexture *tex,
  411. GLint row, GLint col, __GLtexel *res);
  412. extern void FASTCALL __glExtractTexelPI16BGR_B(__GLmipMapLevel *level, __GLtexture *tex,
  413. GLint row, GLint col, __GLtexel *res);
  414. extern void FASTCALL __glExtractTexelPI16BGR(__GLmipMapLevel *level, __GLtexture *tex,
  415. GLint row, GLint col, __GLtexel *res);
  416. extern void FASTCALL __glExtractTexelPI8BGRA_B(__GLmipMapLevel *level, __GLtexture *tex,
  417. GLint row, GLint col, __GLtexel *res);
  418. extern void FASTCALL __glExtractTexelPI8BGRA(__GLmipMapLevel *level, __GLtexture *tex,
  419. GLint row, GLint col, __GLtexel *res);
  420. extern void FASTCALL __glExtractTexelPI16BGRA_B(__GLmipMapLevel *level, __GLtexture *tex,
  421. GLint row, GLint col, __GLtexel *res);
  422. extern void FASTCALL __glExtractTexelPI16BGRA(__GLmipMapLevel *level, __GLtexture *tex,
  423. GLint row, GLint col, __GLtexel *res);
  424. #endif
  425. #ifdef GL_EXT_bgra
  426. void FASTCALL __glExtractTexelBGR8_B(__GLmipMapLevel *level, __GLtexture *tex,
  427. GLint row, GLint col, __GLtexel *result);
  428. void FASTCALL __glExtractTexelBGRA8_B(__GLmipMapLevel *level, __GLtexture *tex,
  429. GLint row, GLint col, __GLtexel *result);
  430. #endif // GL_EXT_bgra
  431. /* Texture init */
  432. extern void FASTCALL __glInitTextureUnpack(__GLcontext *gc, __GLpixelSpanInfo *, GLint,
  433. GLint, GLenum, GLenum, const GLvoid *,
  434. GLenum, GLboolean);
  435. extern void FASTCALL __glInitImagePack(__GLcontext *gc, __GLpixelSpanInfo *spanInfo,
  436. GLint width, GLint height, GLenum format, GLenum type,
  437. const GLvoid *buf);
  438. /* List execution texture image code */
  439. extern void __gllei_TexImage1D(__GLcontext *gc, GLenum target, GLint lod,
  440. GLint components, GLint length,
  441. GLint border, GLenum format, GLenum type,
  442. const GLubyte *image);
  443. extern void __gllei_TexImage2D(__GLcontext *gc, GLenum target, GLint lod,
  444. GLint components, GLint w, GLint h,
  445. GLint border, GLenum format, GLenum type,
  446. const GLubyte *image);
  447. extern void __gllei_TexSubImage1D(__GLcontext *gc, GLenum target, GLint lod,
  448. GLint xoffset, GLint length,
  449. GLenum format, GLenum type,
  450. const GLubyte *image);
  451. extern void __gllei_TexSubImage2D(__GLcontext *gc, GLenum target, GLint lod,
  452. GLint xoffset, GLint yoffset,
  453. GLsizei w, GLsizei h,
  454. GLenum format, GLenum type,
  455. const GLubyte *image);
  456. /* Rho calculation routines */
  457. extern __GLfloat __glComputeLineRho(__GLcontext *gc,
  458. __GLfloat s, __GLfloat t, __GLfloat wInv);
  459. extern __GLfloat __glNopLineRho(__GLcontext *gc,
  460. __GLfloat s, __GLfloat t, __GLfloat wInv);
  461. extern __GLfloat __glComputePolygonRho(__GLcontext *gc, const __GLshade *sh,
  462. __GLfloat s, __GLfloat t,
  463. __GLfloat winv);
  464. extern __GLfloat __glNopPolygonRho(__GLcontext *gc, const __GLshade *sh,
  465. __GLfloat s, __GLfloat t, __GLfloat winv);
  466. extern __GLtexture *FASTCALL __glCheckTexImage1DArgs(__GLcontext *gc, GLenum target,
  467. GLint lod, GLint components,
  468. GLsizei length, GLint border,
  469. GLenum format, GLenum type);
  470. extern __GLtexture *FASTCALL __glCheckTexImage2DArgs(__GLcontext *gc, GLenum target,
  471. GLint lod, GLint components,
  472. GLsizei w, GLsizei h, GLint border,
  473. GLenum format, GLenum type);
  474. /* Texture Lookup */
  475. extern __GLtextureObjectState *FASTCALL __glLookUpTextureTexobjs(__GLcontext *gc,
  476. GLenum target);
  477. /* Texture Lookup */
  478. extern __GLtextureParamState *FASTCALL __glLookUpTextureParams(__GLcontext *gc,
  479. GLenum target);
  480. extern __GLtexture *FASTCALL __glLookUpTexture(__GLcontext *gc, GLenum target);
  481. extern __GLtextureObject *FASTCALL __glLookUpTextureObject(__GLcontext *gc,
  482. GLenum target);
  483. /* Texture Initialization */
  484. extern void FASTCALL __glEarlyInitTextureState(__GLcontext *gc);
  485. GLboolean FASTCALL __glInitTextureObject(__GLcontext *gc,
  486. __GLtextureObject *texobj,
  487. GLuint name, GLuint targetIndex);
  488. void FASTCALL __glInitTextureMachine(__GLcontext *gc, GLuint targetIndex,
  489. __GLperTextureMachine *ptm,
  490. GLboolean allocLevels);
  491. /* Bind Texture used by pop or entry point. */
  492. extern void FASTCALL __glBindTexture(__GLcontext *gc, GLuint targetIndex, GLuint name, GLboolean callGen);
  493. #ifdef NT
  494. extern GLboolean FASTCALL __glCanShareTextures(__GLcontext *gc, __GLcontext *shareMe);
  495. extern void FASTCALL __glShareTextures(__GLcontext *gc, __GLcontext *shareMe);
  496. #endif
  497. void FASTCALL __glSetPaletteSubdivision(__GLtexture *tex, GLsizei subdiv);
  498. #ifdef GL_EXT_paletted_texture
  499. // Attempt to set the extraction function. If no palette is set,
  500. // this can't be done
  501. void __glSetPaletteLevelExtract8(__GLtexture *tex, __GLmipMapLevel *lp,
  502. GLint border);
  503. void __glSetPaletteLevelExtract16(__GLtexture *tex, __GLmipMapLevel *lp,
  504. GLint border);
  505. #endif // GL_EXT_palette_texture
  506. void __glTexPriListRealize(__GLcontext *gc);
  507. void __glTexPriListAddToList(__GLcontext *gc, __GLtextureObject *texobj);
  508. void __glTexPriListAdd(__GLcontext *gc, __GLtextureObject *texobj,
  509. GLboolean realize);
  510. void __glTexPriListRemoveFromList(__GLcontext *gc, __GLtextureObject *texobj);
  511. void __glTexPriListRemove(__GLcontext *gc, __GLtextureObject *texobj,
  512. GLboolean realize);
  513. void __glTexPriListChangePriority(__GLcontext *gc, __GLtextureObject *texobj,
  514. GLboolean realize);
  515. void __glTexPriListLoadSubImage(__GLcontext *gc, GLenum target, GLint lod,
  516. GLint xoffset, GLint yoffset,
  517. GLsizei w, GLsizei h);
  518. void __glTexPriListLoadImage(__GLcontext *gc, GLenum target);
  519. void __glTexPriListUnloadAll(__GLcontext *gc);
  520. __GLtextureBuffer * FASTCALL __glCreateProxyLevel(__GLcontext *gc,
  521. __GLtexture *tex,
  522. GLint lod, GLint components,
  523. GLsizei w, GLsizei h, GLint border,
  524. GLint dim);
  525. __GLtextureBuffer * FASTCALL __glCreateLevel(__GLcontext *gc, __GLtexture *tex,
  526. GLint lod, GLint components,
  527. GLsizei w, GLsizei h, GLint border,
  528. GLint dim);
  529. GLvoid FASTCALL __glCleanupTexObj(__GLcontext *gc, void *pData);
  530. void __glFreeSharedTextureState(__GLcontext *gc);
  531. #endif