⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fxg.h

📁 Mesa is an open-source implementation of the OpenGL specification - a system for rendering interacti
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Mesa 3-D graphics library * Version:  5.0.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. *//* * Mesa/FX device driver. Interface to Glide3. * *  Copyright (c) 2003 - Daniel Borca *  Email : dborca@users.sourceforge.net *  Web   : http://www.geocities.com/dborca */#ifndef TDFX_GLIDE_H_included#define TDFX_GLIDE_H_included#include <glide.h>#include <g3ext.h>#ifndef FX_TRAP_GLIDE#define FX_TRAP_GLIDE 0#endif#if FX_TRAP_GLIDE/*** rendering functions*/void FX_CALL trap_grDrawPoint (const void *pt);void FX_CALL trap_grDrawLine (const void *v1, const void *v2);void FX_CALL trap_grDrawTriangle (const void *a, const void *b, const void *c);void FX_CALL trap_grVertexLayout (FxU32 param, FxI32 offset, FxU32 mode);void FX_CALL trap_grDrawVertexArray (FxU32 mode, FxU32 Count, void *pointers);void FX_CALL trap_grDrawVertexArrayContiguous (FxU32 mode, FxU32 Count, void *pointers, FxU32 stride);/***  Antialiasing Functions*/void FX_CALL trap_grAADrawTriangle (const void *a, const void *b, const void *c, FxBool ab_antialias, FxBool bc_antialias, FxBool ca_antialias);/*** buffer management*/void FX_CALL trap_grBufferClear (GrColor_t color, GrAlpha_t alpha, FxU32 depth);void FX_CALL trap_grBufferSwap (FxU32 swap_interval);void FX_CALL trap_grRenderBuffer (GrBuffer_t buffer);/*** error management*/void FX_CALL trap_grErrorSetCallback (GrErrorCallbackFnc_t fnc);/*** SST routines*/void FX_CALL trap_grFinish (void);void FX_CALL trap_grFlush (void);GrContext_t FX_CALL trap_grSstWinOpen (FxU32 hWnd, GrScreenResolution_t screen_resolution, GrScreenRefresh_t refresh_rate, GrColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers);FxBool FX_CALL trap_grSstWinClose (GrContext_t context);FxBool FX_CALL trap_grSelectContext (GrContext_t context);void FX_CALL trap_grSstOrigin (GrOriginLocation_t origin);void FX_CALL trap_grSstSelect (int which_sst);/*** Glide configuration and special effect maintenance functions*/void FX_CALL trap_grAlphaBlendFunction (GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df);void FX_CALL trap_grAlphaCombine (GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);void FX_CALL trap_grAlphaControlsITRGBLighting (FxBool enable);void FX_CALL trap_grAlphaTestFunction (GrCmpFnc_t function);void FX_CALL trap_grAlphaTestReferenceValue (GrAlpha_t value);void FX_CALL trap_grChromakeyMode (GrChromakeyMode_t mode);void FX_CALL trap_grChromakeyValue (GrColor_t value);void FX_CALL trap_grClipWindow (FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy);void FX_CALL trap_grColorCombine (GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);void FX_CALL trap_grColorMask (FxBool rgb, FxBool a);void FX_CALL trap_grCullMode (GrCullMode_t mode);void FX_CALL trap_grConstantColorValue (GrColor_t value);void FX_CALL trap_grDepthBiasLevel (FxI32 level);void FX_CALL trap_grDepthBufferFunction (GrCmpFnc_t function);void FX_CALL trap_grDepthBufferMode (GrDepthBufferMode_t mode);void FX_CALL trap_grDepthMask (FxBool mask);void FX_CALL trap_grDisableAllEffects (void);void FX_CALL trap_grDitherMode (GrDitherMode_t mode);void FX_CALL trap_grFogColorValue (GrColor_t fogcolor);void FX_CALL trap_grFogMode (GrFogMode_t mode);void FX_CALL trap_grFogTable (const GrFog_t ft[]);void FX_CALL trap_grLoadGammaTable (FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue);void FX_CALL trap_grSplash (float x, float y, float width, float height, FxU32 frame);FxU32 FX_CALL trap_grGet (FxU32 pname, FxU32 plength, FxI32 *params);const char * FX_CALL trap_grGetString (FxU32 pname);FxI32 FX_CALL trap_grQueryResolutions (const GrResolution *resTemplate, GrResolution *output);FxBool FX_CALL trap_grReset (FxU32 what);GrProc FX_CALL trap_grGetProcAddress (char *procName);void FX_CALL trap_grEnable (GrEnableMode_t mode);void FX_CALL trap_grDisable (GrEnableMode_t mode);void FX_CALL trap_grCoordinateSpace (GrCoordinateSpaceMode_t mode);void FX_CALL trap_grDepthRange (FxFloat n, FxFloat f);void FX_CALL trap_grStippleMode (GrStippleMode_t mode);void FX_CALL trap_grStipplePattern (GrStipplePattern_t mode);void FX_CALL trap_grViewport (FxI32 x, FxI32 y, FxI32 width, FxI32 height);/*** texture mapping control functions*/FxU32 FX_CALL trap_grTexCalcMemRequired (GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt);FxU32 FX_CALL trap_grTexTextureMemRequired (FxU32 evenOdd, GrTexInfo *info);FxU32 FX_CALL trap_grTexMinAddress (GrChipID_t tmu);FxU32 FX_CALL trap_grTexMaxAddress (GrChipID_t tmu);void FX_CALL trap_grTexNCCTable (GrNCCTable_t table);void FX_CALL trap_grTexSource (GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info);void FX_CALL trap_grTexClampMode (GrChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextureClampMode_t t_clampmode);void FX_CALL trap_grTexCombine (GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert);void FX_CALL trap_grTexDetailControl (GrChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max);void FX_CALL trap_grTexFilterMode (GrChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode);void FX_CALL trap_grTexLodBiasValue (GrChipID_t tmu, float bias);void FX_CALL trap_grTexDownloadMipMap (GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info);void FX_CALL trap_grTexDownloadMipMapLevel (GrChipID_t tmu, FxU32 startAddress, GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio, GrTextureFormat_t format, FxU32 evenOdd, void *data);FxBool FX_CALL trap_grTexDownloadMipMapLevelPartial (GrChipID_t tmu, FxU32 startAddress, GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio, GrTextureFormat_t format, FxU32 evenOdd, void *data, int start, int end);void FX_CALL trap_grTexDownloadTable (GrTexTable_t type, void *data);void FX_CALL trap_grTexDownloadTablePartial (GrTexTable_t type, void *data, int start, int end);void FX_CALL trap_grTexMipMapMode (GrChipID_t tmu, GrMipMapMode_t mode, FxBool lodBlend);void FX_CALL trap_grTexMultibase (GrChipID_t tmu, FxBool enable);void FX_CALL trap_grTexMultibaseAddress (GrChipID_t tmu, GrTexBaseRange_t range, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info);/*** linear frame buffer functions*/FxBool FX_CALL trap_grLfbLock (GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, FxBool pixelPipeline, GrLfbInfo_t *info);FxBool FX_CALL trap_grLfbUnlock (GrLock_t type, GrBuffer_t buffer);void FX_CALL trap_grLfbConstantAlpha (GrAlpha_t alpha);void FX_CALL trap_grLfbConstantDepth (FxU32 depth);void FX_CALL trap_grLfbWriteColorSwizzle (FxBool swizzleBytes, FxBool swapWords);void FX_CALL trap_grLfbWriteColorFormat (GrColorFormat_t colorFormat);FxBool FX_CALL trap_grLfbWriteRegion (GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data);FxBool FX_CALL trap_grLfbReadRegion (GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 dst_stride, void *dst_data);/*** glide management functions*/void FX_CALL trap_grGlideInit (void);void FX_CALL trap_grGlideShutdown (void);void FX_CALL trap_grGlideGetState (void *state);void FX_CALL trap_grGlideSetState (const void *state);void FX_CALL trap_grGlideGetVertexLayout (void *layout);void FX_CALL trap_grGlideSetVertexLayout (const void *layout);/*** glide utility functions*/void FX_CALL trap_guGammaCorrectionRGB (FxFloat red, FxFloat green, FxFloat blue);float FX_CALL trap_guFogTableIndexToW (int i);void FX_CALL trap_guFogGenerateExp (GrFog_t *fogtable, float density);void FX_CALL trap_guFogGenerateExp2 (GrFog_t *fogtable, float density);void FX_CALL trap_guFogGenerateLinear (GrFog_t *fogtable, float nearZ, float farZ);#ifndef FX_TRAP_GLIDE_internal/*** rendering functions*/#define grDrawPoint                     trap_grDrawPoint#define grDrawLine                      trap_grDrawLine#define grDrawTriangle                  trap_grDrawTriangle#define grVertexLayout                  trap_grVertexLayout#define grDrawVertexArray               trap_grDrawVertexArray#define grDrawVertexArrayContiguous     trap_grDrawVertexArrayContiguous/***  Antialiasing Functions*/#define grAADrawTriangle                trap_grAADrawTriangle/*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -