Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
Go to the source code of this file.
Macros | |
#define | GFXDRVAPI |
Functions | |
void | GFXInit (int, char **) |
Loads Glut and graphics drivers. More... | |
void | GFXLoop (void main_loop()) |
loops on the function over and over More... | |
void | GFXShutdown () |
Shuts down the graphics subsystem. More... | |
void | GFXBeginScene () |
resets all local lights and sets identity matrix More... | |
void | GFXEndScene () |
Flushes and Swaps buffers. More... | |
void | GFXClear (const GFXBOOL colorbuffer, const GFXBOOL depthbuffer=GFXTRUE, const GFXBOOL stencilbuffer=GFXTRUE) |
Clears the Z buffer. Also clears color buffer if GFXTRUE passed in. More... | |
void | GFXCreateLightContext (int &con_number) |
creates a light context (relevant to a star system) to add lights to More... | |
void | GFXDeleteLightContext (const int con_number) |
Deletes a light context (hence a star system) More... | |
void | GFXSetLightContext (const int con_number) |
Sets active light context (restores all gllights in such context) More... | |
GFXBOOL | GFXLightContextAmbient (const GFXColor &amb) |
Sets the ambient light value. More... | |
GFXBOOL | GFXGetLightContextAmbient (GFXColor &amb) |
Gets the ambient light value. More... | |
void | GFXPickLights (const Vector ¢er, const float radius) |
picks and activates local lights near to "center" More... | |
void | GFXPickLights (const Vector ¢er, const float radius, vector< int > &lights, const int maxlights, const bool pickglobals) |
picks and does not activate local lights near to "center" More... | |
void | GFXPickLights (vector< int >::const_iterator begin, vector< int >::const_iterator end) |
activates local lights picked by GFXPickLight More... | |
GFXBOOL | GFXSetSeparateSpecularColor (const GFXBOOL spec) |
Sets the light model to have separate specular color (if available) More... | |
GFXBOOL | GFXSetCutoff (const float cutoff) |
Sets the intensity cutoff before picked lights are ignored. More... | |
void | GFXSetOptimalIntensity (const float newint, const float saturatevalue) |
Sets the optimal intensity given that Optimal number of lights is fulfilled. More... | |
GFXBOOL | GFXSetOptimalNumLights (const int numlights) |
Sets number of lights graphics can handle optimally. More... | |
GFXBOOL | GFXCreateLight (int &light, const GFXLight &, const bool global) |
void | GFXDeleteLight (const int light) |
Deletes a light, removing it from the light table if necessary. More... | |
GFXBOOL | GFXEnableLight (const int light) |
activates a light if not already activated More... | |
GFXBOOL | GFXDisableLight (const int light) |
Deactivates an active light. More... | |
GFXBOOL | GFXSetLight (const int light, const enum LIGHT_TARGET, const GFXColor &color) |
Modifies the parameters of the given light. More... | |
void | GFXPushGlobalEffects () |
GFXBOOL | GFXPopGlobalEffects () |
This function undoes the above function to restore the global lights after specialFX phase. More... | |
void | GFXSetMaterial (unsigned int &number, const GFXMaterial &material) |
Creates a new material given a material struct. Will search through already made materials for matching materials to minimize switching. More... | |
void | GFXModifyMaterial (const unsigned int number, const GFXMaterial &material) |
Modifies the given material to be like the passed in structure. More... | |
GFXBOOL | GFXGetMaterial (const unsigned int number, GFXMaterial &material) |
Gets the statistics of the material stored in number. More... | |
const GFXMaterial & | GFXGetMaterial (const unsigned int number) |
void | GFXSelectMaterialHighlights (const unsigned int number, const GFXColor &ambient, const GFXColor &diffuse, const GFXColor &specular, const GFXColor &emmissive) |
Tells Graphics library which material to use on next polygon if lighting enabled. More... | |
void | GFXSelectMaterial (const unsigned int number) |
void | GFXHudMode (const bool Enter) |
void | GFXRestoreHudMode () |
void | GFXCenterCamera (const bool Enter) |
void | GFXTranslateView (const QVector &r) |
void | GFXLoadMatrixView (const Matrix &matrix) |
void | GFXGetMatrixView (Matrix &m) |
void | GFXTranslateProjection (const Vector &r) |
Translates the current "mode" matrix by a given vector. More... | |
void | GFXTranslateModel (const QVector &r) |
void | GFXMultMatrixModel (const Matrix &matrix) |
Multipliex the current "mode" matrix by a given matrix. More... | |
void | GFXLoadMatrixModel (const Matrix &matrix) |
loads a given matrix to the current "mode" More... | |
void | GFXLoadMatrixProjection (const float matrix[16]) |
void | GFXLoadIdentity (const MATRIXMODE mode) |
Loads the identity matrix for the given mode. More... | |
void | GFXGetMatrixModel (Matrix &matrix) |
retrieves the matrix for a given mode. More... | |
float | GFXGetZPerspective (const float z) |
Given the current projection matrix, how much will the model be divided by. More... | |
float | GFXGetXInvPerspective () |
Screen to eye. More... | |
float | GFXGetYInvPerspective () |
void | GFXPerspective (float fov, float aspect, float znear, float zfar, float cockpit_offset) |
Sets the Projection matrix to have fov and aspect as follows (fov is field of view in radians, aspect is width/height znear and zfar are clip planes. More... | |
void | GFXParallel (float left, float right, float bottom, float top, float znear, float zfar) |
Sets the Projection matrix to a parallel view with given paramters. More... | |
void | GFXViewPort (int minx, int miny, int maxx, int maxy) |
Sets the final translation to screen coordinates, Also adjusts range of clearing. More... | |
void | GFXLookAt (Vector eye, QVector center, Vector up) |
Sets the VIEW matrix to look from center in direction of eye with up vector up. More... | |
void | GFXGetFrustum (double f[6][4]) |
Gets the 6 clip planes of the current Projection matrix. More... | |
void | GFXCalculateFrustum () |
Calculates frustum matrix (internal use) More... | |
void | GFXCalculateFrustum (double frustum[6][4], const Matrix &modlmatrix, const float *projection) |
Calculates the planes for a given frustum in 3space given a matrix and a projection. More... | |
void | GFXGetFrustumVars (bool, float *l, float *r, float *b, float *t, float *n, float *f) |
Saves and restores last used left,right,bot,top,near,far vals (internal use) More... | |
float | GFXSphereInFrustum (const QVector &Center, float Radius) |
checks if a sphere is in the currently loaded Frustum given its center and radius More... | |
float | GFXSphereInFrustum (double f[6][4], const QVector &Center, float Radius) |
Checks if a sphere is in the given frustum calculated by GFXCalculateFrustum. Used in Unit clipping. More... | |
void | GFXBoxInFrustumModel (const Matrix &model) |
CLIPSTATE | GFXBoxInFrustum (const Vector &min, const Vector &max) |
CLIPSTATE | GFXBoxInFrustum (double f[6][4], const Vector &min, const Vector &max) |
CLIPSTATE | GFXTransformedBoxInFrustum (const Vector &min, const Vector &max) |
CLIPSTATE | GFXSpherePartiallyInFrustum (const Vector ¢, const float r) |
CLIPSTATE | GFXTransformedSpherePartiallyInFrustum (const Vector ¢, const float r) |
CLIPSTATE | GFXSpherePartiallyInFrustum (double f[6][4], const Vector ¢, const float r) |
void | GFXFrustum (float *mat, float *inv, float left, float right, float bottom, float top, float nearval, float farval) |
Given matrices, calculates the matrix and inverse matrix of a projection matrix to go from screen to 3-space coordinates. More... | |
GFXBOOL | GFXCreateTexture (int width, int height, TEXTUREFORMAT externaltextureformat, int *handle, char *palette=0, int texturestage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET texture_target=TEXTURE2D, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE) |
void | GFXPrioritizeTexture (unsigned int handle, float priority) |
Sets the priority of the texture for memory management. More... | |
void | GFXAttachPalette (unsigned char *palette, int handle) |
Attaches a given palette to the current texture. More... | |
GFXBOOL | GFXTransferTexture (unsigned char *buffer, int handle, int inWidth, int inHeight, enum TEXTUREFORMAT internalformat, enum TEXTURE_IMAGE_TARGET image2D=TEXTURE_2D, int max_texture_dimension=65536, GFXBOOL detailtexture=GFXFALSE, unsigned int pageIndex=0) |
GFXBOOL | GFXTransferSubTexture (unsigned char *buffer, int handle, int x, int y, unsigned int width, unsigned int height, enum TEXTURE_IMAGE_TARGET image2D=TEXTURE_2D) |
void | GFXDeleteTexture (int handle) |
Deletes the texture from the graphics card. More... | |
void | GFXDestroyAllTextures () |
Cleans up all textures. More... | |
void | GFXSelectTexture (int handle, int stage=0) |
Selects the current texture as being "active" so further drawn objects will have it. More... | |
GFXBOOL | GFXCapture (char *filename) |
Screen capture (FIXME) More... | |
void | GFXEnable (const enum STATE) |
Enables and disables given state. More... | |
void | GFXDisable (const enum STATE) |
void | GFXToggleTexture (bool enable, int whichstage, enum TEXTURE_TARGET target=TEXTURE2D) |
void | GFXTextureAddressMode (const ADDRESSMODE mode, enum TEXTURE_TARGET target=TEXTURE2D) |
Sets texture to clamp or wrap texture coordinates. More... | |
void | GFXBlendMode (const enum BLENDFUNC src, const enum BLENDFUNC dst) |
Sets the current blend mode to src,dst. More... | |
void | GFXGetBlendMode (enum BLENDFUNC &src, enum BLENDFUNC &dst) |
Gets the current blend mode to src,dst. More... | |
void | GFXColorMaterial (int LIGHTTARG) |
void | GFXPointSize (const float size) |
Sets the size in pixels of a GFXPOINT. More... | |
void | GFXLineWidth (const float size) |
Sets the line width in pixels of a GFXLINE. More... | |
void | GFXPushBlendMode () |
Pushes and saves current blend mode. More... | |
void | GFXPopBlendMode () |
Restores previous blend mode. More... | |
void | GFXActiveTexture (const int stage) |
Sets the active texture stage in multitexture. More... | |
enum DEPTHFUNC | GFXDepthFunc () |
Returns the current depth function. More... | |
void | GFXDepthFunc (const enum DEPTHFUNC) |
Sets up depth compare function. More... | |
enum DEPTHFUNC | GFXStencilFunc () |
Returns the current stencil test function. More... | |
void | GFXStencilFunc (enum DEPTHFUNC *pFunc, int *pRef, int *pMask) |
Gets details about the current stancil compare function - Specify NULL for unwanted fields. More... | |
void | GFXStencilFunc (enum DEPTHFUNC sfunc, int ref, unsigned int mask) |
Sets up a stencil compare function. More... | |
void | GFXStencilOp (enum STENCILOP *pFail, enum STENCILOP *pZfail, enum STENCILOP *pZpass) |
Gets the current stencil write operations - Specify NULL for unwanted fields. More... | |
void | GFXStencilOp (enum STENCILOP fail, enum STENCILOP zfail, enum STENCILOP zpass) |
Sets up the stencil write operations. More... | |
unsigned int | GFXStencilMask () |
Returns the current stencil write mask. More... | |
void | GFXStencilMask (unsigned int mask) |
Sets the stencil write mask. More... | |
void | GFXAlphaTest (const enum DEPTHFUNC, const float ref) |
Turns on alpha testing mode (or turns if off if DEPTHFUNC is set to ALWAYS. More... | |
void | GFXTextureWrap (int stage, GFXTEXTUREWRAPMODES mode, enum TEXTURE_TARGET target=TEXTURE2D) |
void | GFXTextureEnv (int stage, GFXTEXTUREENVMODES mode, float arg2=0) |
bool | GFXMultiTexAvailable () |
void | GFXPolygonOffset (float factor, float units) |
Sets Depth Offset for polgyons. More... | |
void | GFXGetPolygonOffset (float *factor, float *units) |
void | GFXPolygonMode (const enum POLYMODE) |
Sets the polygon rasterization mode. More... | |
void | GFXCullFace (const enum POLYFACE) |
Sets the facecull mode. More... | |
void | GFXBegin (const enum POLYTYPE) |
Begins a polytype. More... | |
void | GFXColorf (const GFXColor &col) |
Specifies a color for henceforth drawn vertices to share. More... | |
void | GFXBlendColor (const GFXColor &col) |
specifies the current blend color More... | |
void | GFXColor4f (const float r, const float g, const float b, const float a=1.0) |
Specifies a color for henceforth drawn vertices to share. More... | |
GFXColor | GFXColorf () |
Gets the current color. More... | |
void | GFXTexCoord2f (const float s, const float t) |
Specifies a pair of texture coordinates for given vertex. More... | |
void | GFXTexCoord4f (const float s, const float t, const float u, const float v) |
Specifies four texture coordinates for a given vertex (2 textures) More... | |
void | GFXTexCoord224f (const float s, const float t, const float s2, const float t2, const float s3, const float t3, const float u3, const float v3) |
Specifies four texture coordinates for a given vertex (3 textures) More... | |
void | GFXNormal3f (const float i, const float j, const float k) |
Specifies a normal with 3 floats. More... | |
void | GFXNormal (const Vector &n) |
Specifies a notmal with 1 vector. More... | |
void | GFXVertex3f (const float x, const float y, const float z=1.0) |
Specifies a vertex with 3 floats. More... | |
void | GFXVertex3f (const double x, const double y, const double z=1.0) |
void | GFXVertex3d (const double x, const double y, const double z=1.0) |
void | GFXVertexf (const Vector &v) |
Specifies a vertex with a vector. More... | |
void | GFXVertexf (const QVector &v) |
void | GFXEnd () |
Ends the current set of polytypes. More... | |
void | GFXCircle (float x, float y, float r1, float r2) |
void | GFXOptimizeList (GFXVertex *old, int numV, GFXVertex **newlist, int *numnewVertices, unsigned int **indices) |
Optimizes a list to reuse repeated vertices! More... | |
void | GFXFogMode (const FOGMODE fog) |
void | GFXFogDensity (const float fogdensity) |
void | GFXFogLimits (const float fognear, const float fogfar) |
void | GFXFogColor (GFXColor c) |
void | GFXFogIndex (const int index) |
void | GFXCallList (int list) |
Draws a given display list. More... | |
void | GFXBeginPick (int x, int y, int xsize, int ysize) |
void | GFXSetPickName (int name) |
vector< PickData > * | GFXEndPick () |
void | GFXSubwindow (int x, int y, int xsize, int ysize) |
Creates a subwindow with the current parameters for center and size. More... | |
void | GFXSubwindow (float x, float y, float xsize, float ysize) |
Vector | GFXDeviceToEye (int x, int y) |
convertes eyespace to 3space at the near plane More... | |
void | GFXTextureCoordGenMode (int stage, GFXTEXTURECOORDMODE tex, const float params[4], const float paramt[4]) |
int | GFXCreateProgram (const char *vertex, const char *fragment, const char *extra_defines) |
void | GFXDestroyProgram (int program) |
int | GFXActivateShader (const char *program=NULL) |
int | GFXActivateShader (int program) |
void | GFXDeactivateShader () |
int | GFXNamedShaderConstant (char *progID, const char *name) |
int | GFXNamedShaderConstant (int progID, const char *name) |
int | GFXShaderConstant (int name, Vector value) |
int | GFXShaderConstant (int name, GFXColor value) |
int | GFXShaderConstant (int name, const float *value) |
int | GFXShaderConstanti (int name, int value) |
int | GFXShaderConstant (int name, float v1, float v2, float v3, float v4) |
int | GFXShaderConstant (int name, float v1) |
int | GFXShaderConstant4v (int name, unsigned int numvals, const float *value) |
int | GFXShaderConstantv (int name, unsigned int numvals, const float *value) |
int | GFXShaderConstantv (int name, unsigned int numvals, const int *value) |
bool | GFXDefaultShaderSupported () |
void | GFXReloadDefaultShader () |
void | GFXUploadLightState (int max_light_location, int active_light_array, int apparent_light_size_array, bool shader, vector< int >::const_iterator begin, vector< int >::const_iterator end) |
bool | GFXShaderReloaded () |
int | GFXGetProgramVersion () |
enum GFXTEXTURECOORDMODE |
enum GFXTEXTUREENVMODES |
enum GFXTEXTUREWRAPMODES |
int GFXActivateShader | ( | const char * | program = NULL ) |
Definition at line 519 of file gl_program.cpp.
References getDefaultProgram(), GFXActivateShader(), and GFXCreateProgram().
Referenced by GFXActivateShader(), GFXDeactivateShader(), and GFXShaderReloaded().
void GFXActiveTexture | ( | const int | stage) |
Sets the active texture stage in multitexture.
Definition at line 594 of file gl_state.cpp.
References activeTextureStage, gl_options, glActiveTextureARB_p, and gl_options_t::Multitexture.
Referenced by GameStarSystem::activateLightMap(), Background::Draw(), GFXCreateTexture(), GFXDisable(), GFXEnable(), GFXInit(), GFXSelectTexture(), GFXTextureCoordGenMode(), GFXTextureEnv(), GFXTextureWrap(), GFXToggleTexture(), LookAtHelper(), Texture::MakeActive(), RestoreSpecMapState(), and SetupSpecMapSecondPass().
void GFXAlphaTest | ( | const enum | DEPTHFUNC, |
const float | ref | ||
) |
Turns on alpha testing mode (or turns if off if DEPTHFUNC is set to ALWAYS.
Definition at line 606 of file gl_state.cpp.
References ALWAYS, EQUAL, GEQUAL, GREATER, LEQUAL, LESS, NEQUAL, and NEVER.
Referenced by Bolt::Draw(), Stars::Draw(), GameCockpit::Draw(), BaseInterface::Room::BaseVSSprite::Draw(), DrawHUDSprite(), and setupGLState().
void GFXAttachPalette | ( | unsigned char * | palette, |
int | handle | ||
) |
Attaches a given palette to the current texture.
Definition at line 410 of file gl_texture.cpp.
References ConvertPalette(), and textures.
void GFXBegin | ( | const enum | POLYTYPE) |
Begins a polytype.
Definition at line 152 of file gl_misc.cpp.
References GFXLINE, GFXLINESTRIP, GFXPOINT, GFXPOLY, GFXQUAD, GFXQUADSTRIP, GFXTRI, GFXTRIFAN, and GFXTRISTRIP.
Referenced by AnimationDraw(), ParticlePoint::Draw(), GuiTexture::draw(), Background::Draw(), VSSprite::Draw(), BaseInterface::Room::BaseText::Draw(), BaseInterface::Room::Draw(), ParticleTrail::DrawAndUpdate(), Animation::DrawAsVSSprite(), Radar::SphereDisplay::DrawBackground(), Radar::BubbleDisplay::DrawBackground(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDamageFlash(), DrawFrustum(), NavigationSystem::DrawGalaxy(), NavigationSystem::DrawGrid(), Radar::PlaneDisplay::DrawGround(), DrawGun(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), NavigationSystem::DrawJump(), NavigationSystem::DrawMissile(), NavigationSystem::DrawNavCircle(), Animation::DrawNoTransform(), Animation::DrawNow(), DrawOneTargetBox(), NavigationSystem::DrawPlanet(), DrawShield(), DrawSquare(), NavigationSystem::DrawStation(), Radar::PlaneDisplay::DrawTarget(), NavigationSystem::DrawTargetCorners(), Radar::SphereDisplay::DrawTargetMarker(), Radar::BubbleDisplay::DrawTargetMarker(), Radar::PlaneDisplay::DrawTargetMarker(), Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), GFXCircle(), and Box::ProcessDrawQueue().
Definition at line 18 of file gl_pick.cpp.
References GFXGetFrustumVars(), picked_objects, GFXMatrices::projection, selectbuf, and SELECTBUF_SIZE.
void GFXBeginScene | ( | ) |
resets all local lights and sets identity matrix
Definition at line 54 of file gl_misc.cpp.
References GFXLoadIdentity(), light_rekey_frame(), and MODEL.
Referenced by base_main_loop(), bootstrap_draw(), gamemenu_draw(), nav_main_loop(), GameUniverse::StartDraw(), and GameUniverse::StartGFX().
void GFXBlendColor | ( | const GFXColor & | col) |
specifies the current blend color
Sets the current blend mode to src,dst.
Definition at line 342 of file gl_state.cpp.
References blendToGL(), currBlendMode, BlendMode::dfactor, and BlendMode::sfactor.
Referenced by bootstrap_draw(), CoordinateSelect::Draw(), Bolt::Draw(), Background::Draw(), VDU::Draw(), Stars::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::BaseVSSprite::Draw(), BaseInterface::Room::Draw(), NavigationSystem::Draw(), GFXVertexList::Draw(), UnivMap::Draw(), ParticleTrail::DrawAndUpdate(), Animation::DrawAsVSSprite(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDamageFlash(), DrawDockingBoxes(), DrawFrustum(), NavigationSystem::DrawGalaxy(), DrawGlutMouse(), NavigationSystem::DrawGrid(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), NavigationSystem::DrawJump(), PaintText::drawLines(), NavigationSystem::DrawMissile(), NavigationSystem::DrawMission(), NavigationSystem::DrawNavCircle(), Animation::DrawNoTransform(), Mesh::DrawNow(), DrawOneTargetBox(), NavigationSystem::DrawPlanet(), NavigationSystem::DrawSectorList(), DrawShield(), NavigationSystem::DrawShip(), NavigationSystem::DrawStation(), NavigationSystem::DrawTargetCorners(), GFXInit(), GFXPopBlendMode(), Box::ProcessDrawQueue(), Halo::ProcessDrawQueue(), Logo::ProcessDrawQueue(), Animation::ProcessDrawQueue(), Beam::ProcessDrawQueue(), Animation::ProcessFarDrawQueue(), QuadTree::Render(), Briefing::Render(), SetupCloakState(), SetupDamageMapThirdPass(), SetupEnvmapPass(), SetupGlowMapFourthPass(), setupGLState(), SetupSpecMapFirstPass(), SetupSpecMapSecondPass(), StartGUIFrame(), TerrainMakeActive(), and TerrainMakeClearActive().
Definition at line 14 of file gl_clip.cpp.
References BoxFrust, and GFXBoxInFrustum().
Referenced by IdentityTransform::BoxInFrustum(), GFXBoxInFrustum(), and GFXTransformedBoxInFrustum().
Definition at line 48 of file gl_clip.cpp.
References GFX_NOT_VISIBLE, GFX_PARTIALLY_VISIBLE, GFX_TOTALLY_VISIBLE, i, j, v, and Vector.
void GFXBoxInFrustumModel | ( | const Matrix & | model) |
Definition at line 187 of file gl_clip.cpp.
References BoxFrust, GFXCalculateFrustum(), MultMatrix(), GFXMatrices::projection, and GFXMatrices::view.
Referenced by QuadTree::Render().
void GFXCalculateFrustum | ( | ) |
Calculates frustum matrix (internal use)
Definition at line 193 of file gl_clip.cpp.
References frust, GFXCalculateFrustum(), GFXMatrices::projection, and GFXMatrices::view.
Referenced by GFXBoxInFrustumModel(), GFXCalculateFrustum(), ClickList::requestIterator(), and Camera::UpdateGFX().
void GFXCalculateFrustum | ( | double | frustum[6][4], |
const Matrix & | modlmatrix, | ||
const float * | projection | ||
) |
Calculates the planes for a given frustum in 3space given a matrix and a projection.
Definition at line 223 of file gl_clip.cpp.
References UniverseUtil::sqrt(), and WackyMultFloatMatrix().
void GFXCallList | ( | int | list) |
Draws a given display list.
Definition at line 312 of file gl_misc.cpp.
Referenced by GFXVertexList::Draw().
GFXBOOL GFXCapture | ( | char * | filename) |
void GFXCenterCamera | ( | const bool | Enter) |
Definition at line 224 of file gl_matrix.cpp.
References GFXLoadIdentity(), MODEL, Matrix::p, QVector, and GFXMatrices::view.
Referenced by Background::Draw(), and Mesh::DrawNow().
Definition at line 37 of file gl_misc.cpp.
References UniverseUtil::cos(), f, g_game, VegaConfig::getVariable(), GFXBegin(), GFXEnd(), GFXLINESTRIP, GFXVertex3f(), i, int, M_PI, Magnitude(), XMLSupport::parse_float(), UniverseUtil::sin(), Vector, vs_config, game_data_t::x_resolution, and game_data_t::y_resolution.
Referenced by DrawCrosshairs().
void GFXClear | ( | const GFXBOOL | colorbuffer, |
const GFXBOOL | depthbuffer = GFXTRUE , |
||
const GFXBOOL | stencilbuffer = GFXTRUE |
||
) |
Clears the Z buffer. Also clears color buffer if GFXTRUE passed in.
Definition at line 66 of file gl_misc.cpp.
Referenced by bootstrap_draw(), Background::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::BaseShip::Draw(), Mesh::ProcessUndrawnMeshes(), Mesh::ProcessZFarMeshes(), Briefing::Render(), and StartGUIFrame().
Specifies a color for henceforth drawn vertices to share.
Definition at line 214 of file gl_misc.cpp.
Referenced by bootstrap_draw(), GuiTexture::draw(), Bolt::Draw(), GameStarSystem::Draw(), GameCockpit::Draw(), BaseInterface::Room::Draw(), NavigationSystem::Draw(), UnivMap::Draw(), DrawDamageFlash(), DrawDockingBoxes(), DrawGlutMouse(), DrawShield(), GFXVertexList::EndDrawState(), Box::ProcessDrawQueue(), Logo::ProcessDrawQueue(), SetupCloakState(), and StartGUIFrame().
void GFXColorf | ( | const GFXColor & | col) |
Specifies a color for henceforth drawn vertices to share.
Definition at line 192 of file gl_misc.cpp.
References GFXColor::r.
Referenced by ParticlePoint::Draw(), Background::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::BaseText::Draw(), Radar::SphereDisplay::DrawBackground(), Radar::BubbleDisplay::DrawBackground(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDockingBoxes(), DrawFrustum(), NavigationSystem::DrawGalaxy(), NavigationSystem::DrawGrid(), Radar::PlaneDisplay::DrawGround(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), NavigationSystem::DrawJump(), PaintText::drawLines(), NavigationSystem::DrawMissile(), NavigationSystem::DrawNavCircle(), NavigationSystem::DrawPlanet(), DrawShield(), NavigationSystem::DrawStation(), Radar::PlaneDisplay::DrawTarget(), NavigationSystem::DrawTargetCorners(), Radar::PlaneDisplay::DrawTargetMarker(), Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), AnimatedTexture::MakeActive(), Animation::ProcessDrawQueue(), SetupCloakState(), and AnimatedTexture::SetupPass().
GFXColor GFXColorf | ( | ) |
void GFXColorMaterial | ( | int | LIGHTTARG) |
Definition at line 365 of file gl_state.cpp.
References AMBIENT, DIFFUSE, EMISSION, and SPECULAR.
Referenced by PointStarVlist::BeginDrawState(), SpriteStarVlist::BeginDrawState(), PointStarVlist::EndDrawState(), SpriteStarVlist::EndDrawState(), quadsquare::Render(), RestoreCloakState(), and SetupCloakState().
GFXCreateLight gets a light as a parameter. It sets light to have the index of the created light for modification in the future. If the light is global, it will always affect objects in space. if the light is not global, it is local and goes into a 3d hashtable to be picked at a later point on a per object basis.
Definition at line 272 of file gl_light.cpp.
References _llights.
Referenced by Stars::Draw(), BaseInterface::Room::BaseShip::Draw(), Mesh::DrawNow(), SetupCloakState(), and Atmosphere::Update().
void GFXCreateLightContext | ( | int & | con_number) |
creates a light context (relevant to a star system) to add lights to
Definition at line 317 of file gl_light.cpp.
References _ambient_light, _currentContext, _local_lights_dat, GFXBOOL, GFXFALSE, GFXSetLightContext(), GFXTRUE, and SetupGLLightGlobals().
Referenced by GameStarSystem::GameStarSystem(), GFXInit(), and GameUniverse::StartGFX().
int GFXCreateProgram | ( | const char * | vertex, |
const char * | fragment, | ||
const char * | extra_defines | ||
) |
Definition at line 302 of file gl_program.cpp.
References cacheKey(), GFXCreateProgramNoCache(), programCache, and programICache.
Referenced by Technique::Pass::compile(), getDefaultProgram(), GFXActivateShader(), GFXCreateProgram(), and GFXReloadDefaultShader().
GFXBOOL GFXCreateTexture | ( | int | width, |
int | height, | ||
TEXTUREFORMAT | externaltextureformat, | ||
int * | handle, | ||
char * | palette = 0 , |
||
int | texturestage = 0 , |
||
enum FILTER | mipmap = MIPMAP , |
||
enum TEXTURE_TARGET | texture_target = TEXTURE2D , |
||
enum ADDRESSMODE | address_mode = DEFAULT_ADDRESS_MODE |
||
) |
Creates a texture with given w,h & tex format. Returns handle in handle var The palette may be specified but defaults to NULL. Texture Stage indicates Which texture unit the texture must reside on. The filter indicates If linear, bilinear, mipmapping or trilinear filterring should be used. Filtering is clamped to g_game.mipmap so hardware isn't abused (3dfx had trilinear troubles, and it might be a memory constraint) Texture target defines the type of texture it is for eventual cube mapping
Definition at line 312 of file gl_texture.cpp.
References activetexture, ConvertPalette(), CUBEMAP, GetUncompressedTextureFormat(), GFXActiveTexture(), GFXTextureAddressMode(), GFXTRUE, gl_options, GL_TEXTURE_CUBE_MAP_EXT, GL_TEXTURE_RECTANGLE_ARB, height, isPowerOfTwo(), gl_options_t::mipmap, MIPMAP, NEAREST, PALETTE8, TEXTURE1D, TEXTURE2D, TEXTURE3D, TEXTURERECT, textures, TRILINEAR, VSFileSystem::vs_dprintf(), and width.
Referenced by Texture::Bind(), PipelinedTexture::Clone(), PipelinedTexture::PipelinedTexture(), StreamTexture::StreamTexture(), and PipelinedTexture::Swap().
void GFXCullFace | ( | const enum | POLYFACE) |
Sets the facecull mode.
Definition at line 123 of file gl_misc.cpp.
References GFXBACK, GFXFRONT, and GFXFRONTANDBACK.
Referenced by setupGLState().
void GFXDeactivateShader | ( | ) |
Definition at line 528 of file gl_program.cpp.
References GFXActivateShader().
Referenced by Mesh::ProcessUndrawnMeshes(), and Mesh::ProcessZFarMeshes().
bool GFXDefaultShaderSupported | ( | ) |
Definition at line 499 of file gl_program.cpp.
References getDefaultProgram().
Referenced by init_opengl_extensions().
void GFXDeleteLight | ( | const int | light) |
Deletes a light, removing it from the light table if necessary.
Definition at line 282 of file gl_light.cpp.
Referenced by Atmosphere::Draw(), Stars::Draw(), BaseInterface::Room::BaseShip::Draw(), Mesh::DrawNow(), and GamePlanet::Kill().
void GFXDeleteLightContext | ( | const int | con_number) |
Deletes a light context (hence a star system)
Definition at line 331 of file gl_light.cpp.
References _local_lights_dat.
void GFXDeleteTexture | ( | int | handle) |
Deletes the texture from the graphics card.
Definition at line 1039 of file gl_texture.cpp.
References activetexture, GFXFALSE, i, and textures.
Referenced by GFXDestroyAllTextures(), Texture::UnBind(), PipelinedTexture::~PipelinedTexture(), and StreamTexture::~StreamTexture().
enum DEPTHFUNC GFXDepthFunc | ( | ) |
Returns the current depth function.
Definition at line 394 of file gl_state.cpp.
References cur_depth_func.
Referenced by RestoreEnvmapState(), RestoreFirstPassState(), RestoreGlowMapState(), RestoreSpecMapState(), SetupDamageMapThirdPass(), SetupEnvmapPass(), SetupGlowMapFourthPass(), setupGLState(), SetupSpecMapFirstPass(), and SetupSpecMapSecondPass().
void GFXDepthFunc | ( | const enum | DEPTHFUNC) |
void GFXDestroyAllTextures | ( | ) |
Cleans up all textures.
Definition at line 1069 of file gl_texture.cpp.
References GFXDeleteTexture(), and textures.
Referenced by GFXShutdown().
void GFXDestroyProgram | ( | int | program) |
Definition at line 318 of file gl_program.cpp.
References programCache, and programICache.
Referenced by Technique::Pass::compile().
convertes eyespace to 3space at the near plane
Definition at line 343 of file gl_misc.cpp.
References b, f, g_game, GFXGetFrustumVars(), Vector, game_data_t::x_resolution, and game_data_t::y_resolution.
Referenced by MouseCoordinate().
void GFXDisable | ( | const enum | STATE) |
Referenced by AnimationDraw(), SpriteStarVlist::BeginDrawState(), bootstrap_draw(), Radar::SphereDisplay::Draw(), Radar::BubbleDisplay::Draw(), Radar::PlaneDisplay::Draw(), Bolt::Draw(), Background::Draw(), VSSprite::Draw(), Atmosphere::Draw(), GameStarSystem::Draw(), VDU::Draw(), Stars::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::BaseShip::Draw(), BaseInterface::Room::Draw(), NavigationSystem::Draw(), GFXVertexList::Draw(), UnivMap::Draw(), ParticleTrail::DrawAndUpdate(), Animation::DrawAsVSSprite(), Radar::SphereDisplay::DrawBackground(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDamageFlash(), DrawDockingBoxes(), DrawFrustum(), NavigationSystem::DrawGalaxy(), DrawGlutMouse(), NavigationSystem::DrawGrid(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), NavigationSystem::DrawJump(), NavigationSystem::DrawMissile(), NavigationSystem::DrawMission(), NavigationSystem::DrawNavCircle(), Animation::DrawNoTransform(), Mesh::DrawNow(), DrawOneTargetBox(), NavigationSystem::DrawPlanet(), NavigationSystem::DrawSectorList(), DrawShield(), NavigationSystem::DrawShip(), NavigationSystem::DrawStation(), NavigationSystem::DrawTargetCorners(), Radar::SphereDisplay::DrawTargetMarker(), SpriteStarVlist::EndDrawState(), EndGUIFrame(), Box::ProcessDrawQueue(), Halo::ProcessDrawQueue(), Logo::ProcessDrawQueue(), Atmosphere::ProcessDrawQueue(), Animation::ProcessDrawQueue(), Beam::ProcessDrawQueue(), Animation::ProcessFarDrawQueue(), Mesh::ProcessUndrawnMeshes(), QuadTree::Render(), Briefing::Render(), Mesh::SelectCullFace(), SetupCloakState(), SetupDamageMapThirdPass(), SetupEnvmapPass(), SetupGlowMapFourthPass(), setupGLState(), SetupSpecMapFirstPass(), SetupSpecMapSecondPass(), StartGUIFrame(), and TerrainMakeActive().
Deactivates an active light.
Definition at line 306 of file gl_light.cpp.
References _llights, GFXFALSE, and GFXTRUE.
Referenced by GamePlanet::DisableLights(), and Atmosphere::Draw().
void GFXEnable | ( | const enum | STATE) |
Enables and disables given state.
Referenced by AnimationDraw(), SpriteStarVlist::BeginDrawState(), bootstrap_draw(), createObjects(), Radar::SphereDisplay::Draw(), Radar::BubbleDisplay::Draw(), Radar::PlaneDisplay::Draw(), Bolt::Draw(), Background::Draw(), VSSprite::Draw(), GameStarSystem::Draw(), VDU::Draw(), Stars::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::BaseShip::Draw(), BaseInterface::Room::BaseVSSprite::Draw(), BaseInterface::Room::Draw(), NavigationSystem::Draw(), GFXVertexList::Draw(), UnivMap::Draw(), ParticleTrail::DrawAndUpdate(), Animation::DrawAsVSSprite(), Radar::SphereDisplay::DrawBackground(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDamageFlash(), DrawDockingBoxes(), DrawFrustum(), DrawGlutMouse(), NavigationSystem::DrawGrid(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), NavigationSystem::DrawJump(), NavigationSystem::DrawMissile(), NavigationSystem::DrawMission(), NavigationSystem::DrawNavCircle(), Animation::DrawNoTransform(), Mesh::DrawNow(), DrawOneTargetBox(), NavigationSystem::DrawPlanet(), DrawShield(), NavigationSystem::DrawShip(), NavigationSystem::DrawStation(), NavigationSystem::DrawTargetCorners(), Radar::SphereDisplay::DrawTargetMarker(), SpriteStarVlist::EndDrawState(), EndGUIFrame(), Box::ProcessDrawQueue(), Halo::ProcessDrawQueue(), Logo::ProcessDrawQueue(), Atmosphere::ProcessDrawQueue(), Animation::ProcessDrawQueue(), Beam::ProcessDrawQueue(), Animation::ProcessFarDrawQueue(), Mesh::ProcessUndrawnMeshes(), QuadTree::Render(), Briefing::Render(), RestoreCloakState(), Mesh::RestoreCullFace(), RestoreEnvmapState(), RestoreGlowMapState(), RestoreSpecMapState(), SphereMesh::SelectCullFace(), Mesh::SelectCullFace(), SetupCloakState(), setupGLState(), SetupSpecMapSecondPass(), StartGUIFrame(), and TerrainMakeActive().
activates a light if not already activated
Definition at line 296 of file gl_light.cpp.
References _llights, GFXFALSE, and GFXTRUE.
Referenced by GamePlanet::EnableLights(), and Atmosphere::Update().
void GFXEnd | ( | ) |
Ends the current set of polytypes.
Definition at line 293 of file gl_misc.cpp.
Referenced by AnimationDraw(), ParticlePoint::Draw(), GuiTexture::draw(), Background::Draw(), VSSprite::Draw(), BaseInterface::Room::BaseText::Draw(), BaseInterface::Room::Draw(), ParticleTrail::DrawAndUpdate(), Animation::DrawAsVSSprite(), Radar::SphereDisplay::DrawBackground(), Radar::BubbleDisplay::DrawBackground(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDamageFlash(), DrawFrustum(), NavigationSystem::DrawGalaxy(), NavigationSystem::DrawGrid(), Radar::PlaneDisplay::DrawGround(), DrawGun(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), NavigationSystem::DrawJump(), NavigationSystem::DrawMissile(), NavigationSystem::DrawNavCircle(), Animation::DrawNoTransform(), Animation::DrawNow(), DrawOneTargetBox(), NavigationSystem::DrawPlanet(), DrawShield(), DrawSquare(), NavigationSystem::DrawStation(), Radar::PlaneDisplay::DrawTarget(), NavigationSystem::DrawTargetCorners(), Radar::SphereDisplay::DrawTargetMarker(), Radar::BubbleDisplay::DrawTargetMarker(), Radar::PlaneDisplay::DrawTargetMarker(), Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), GFXCircle(), and Box::ProcessDrawQueue().
vector< PickData >* GFXEndPick | ( | ) |
void GFXEndScene | ( | ) |
Flushes and Swaps buffers.
Definition at line 60 of file gl_misc.cpp.
References winsys_swap_buffers().
Referenced by base_main_loop(), bootstrap_draw(), gamemenu_draw(), nav_main_loop(), GameUniverse::StartDraw(), and GameUniverse::StartGFX().
void GFXFogColor | ( | GFXColor | c) |
Definition at line 69 of file gl_fog.cpp.
References GFXColor::a, GFXColor::b, _GFXFogState::c, c, GFXColor::g, GFXFogState, and GFXColor::r.
Referenced by GameNebula::SetFogState().
void GFXFogDensity | ( | const float | fogdensity) |
Definition at line 51 of file gl_fog.cpp.
References _GFXFogState::density, and GFXFogState.
Referenced by GameNebula::SetFogState().
void GFXFogIndex | ( | const int | index) |
Definition at line 77 of file gl_fog.cpp.
References GFXFogState, _GFXFogState::index, and index.
Referenced by GameNebula::SetFogState().
Definition at line 59 of file gl_fog.cpp.
References _GFXFogState::ffar, GFXFogState, and _GFXFogState::nnear.
Referenced by GameNebula::SetFogState().
void GFXFogMode | ( | const FOGMODE | fog) |
Definition at line 23 of file gl_fog.cpp.
References _GFXFogState::curmode, _GFXFogState::enabled, FOG_EXP, FOG_EXP2, FOG_LINEAR, FOG_OFF, and GFXFogState.
Referenced by GameStarSystem::Draw(), Mesh::DrawNow(), Animation::ProcessDrawQueue(), GameNebula::SetFogState(), and SetupFogState().
void GFXFrustum | ( | float * | mat, |
float * | inv, | ||
float | left, | ||
float | right, | ||
float | bottom, | ||
float | top, | ||
float | nearval, | ||
float | farval | ||
) |
Given matrices, calculates the matrix and inverse matrix of a projection matrix to go from screen to 3-space coordinates.
Definition at line 303 of file gl_matrix.cpp.
References a, b, c, d, float, M, x, and y.
Referenced by gl_Frustum(), and ClickList::requestIterator().
Gets the current blend mode to src,dst.
Definition at line 311 of file gl_state.cpp.
References currBlendMode, BlendMode::dfactor, and BlendMode::sfactor.
Referenced by VSSprite::Draw(), GFXVertexList::Draw(), Animation::DrawAsVSSprite(), Animation::DrawNoTransform(), and Animation::DrawNow().
void GFXGetFrustum | ( | double | f[6][4]) |
Gets the 6 clip planes of the current Projection matrix.
Definition at line 183 of file gl_clip.cpp.
References frust.
Saves and restores last used left,right,bot,top,near,far vals (internal use)
Definition at line 162 of file gl_clip.cpp.
References b.
Referenced by GFXBeginPick(), GFXDeviceToEye(), GFXGetZPerspective(), GFXParallel(), gl_Frustum(), ClickList::requestIterator(), and CoordinateSelect::UpdateMouse().
Gets the ambient light value.
Definition at line 264 of file gl_light.cpp.
References _ambient_light, _currentContext, GFXFALSE, and GFXTRUE.
Referenced by GameStarSystem::Draw(), SphereMesh::ProcessDrawQueue(), CityLights::ProcessDrawQueue(), Terrain::Render(), and Terrain::RenderAll().
GFXBOOL GFXGetMaterial | ( | const unsigned int | number, |
GFXMaterial & | material | ||
) |
Gets the statistics of the material stored in number.
Definition at line 67 of file gfxlib_struct_server.cpp.
References GFXFALSE, GFXTRUE, and materialinfo.
Referenced by Mission::call_unit_launch(), and Mesh::GetMaterial().
const GFXMaterial& GFXGetMaterial | ( | const unsigned int | number) |
void GFXGetMatrixModel | ( | Matrix & | matrix) |
retrieves the matrix for a given mode.
Definition at line 292 of file gl_matrix.cpp.
References CopyMatrix(), and GFXMatrices::model.
Referenced by LocationSelect::Draw(), and GFXUploadLightState().
void GFXGetMatrixView | ( | Matrix & | m) |
Definition at line 288 of file gl_matrix.cpp.
References CopyMatrix(), and GFXMatrices::view.
Referenced by LocationSelect::Draw(), and Camera::GetView().
Definition at line 81 of file gl_misc.cpp.
References last_factor, and last_units.
Referenced by SetupSpecMapFirstPass().
int GFXGetProgramVersion | ( | ) |
Definition at line 647 of file gl_program.cpp.
References programVersion.
Referenced by Technique::Pass::compile(), and Technique::compile().
float GFXGetXInvPerspective | ( | ) |
Screen to eye.
Definition at line 51 of file gl_matrix.cpp.
References GFXMatrices::invprojection.
Referenced by LocationSelect::Draw().
float GFXGetYInvPerspective | ( | ) |
Definition at line 56 of file gl_matrix.cpp.
References GFXMatrices::invprojection.
Referenced by LocationSelect::Draw().
Given the current projection matrix, how much will the model be divided by.
GFXGetZPerspective () returns the relative scale of an object placed at distance z from the camera with the current projection matrix.
GFXGetXPerspective () returns the number that x/z is multiplied by to land a pixel on the screen. | xs 0 a 0 |[x] [xs + az] [1/xs 0 0 a/xs][x] [x/xs+ aw/xs] | 0 ys b 0 |[y] = [ys + bz] ^-1 [ 0 1/ys 0 b/ys][y] = [y/ys+ bw/ys] | 0 0 c d |[z] [cz + dw] [ 0 0 0 -1 ][z] [0 ] | 0 0 -1 0 |[w] [-z ] [ 0 0 1/d c/d ][w] [z/d + cw/d ] therefore return 1/(xs *d) and 1/(ys * d) I'm not good with matrix math...tell me if I should ret 1/xs+c/d instead for test cases I can think of, it doesn't matter—
Definition at line 311 of file gl_clip.cpp.
References a, and GFXGetFrustumVars().
Referenced by perspectiveFactor().
void GFXHudMode | ( | const bool | Enter) |
Hud Mode saves the current matrices and sets projection and view matrices to identity. Caution: use of other matrix functions in HudMode could alter state.
Definition at line 246 of file gl_matrix.cpp.
Referenced by bootstrap_draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::BaseShip::Draw(), NavigationSystem::Draw(), EndGUIFrame(), and StartGUIFrame().
void GFXInit | ( | int | , |
char ** | |||
) |
Loads Glut and graphics drivers.
Definition at line 532 of file gl_init.cpp.
References gl_options_t::compression, CUBE_MAP_GEN, CUBEMAP, gl_options_t::display_lists, gl_options_t::ext_clamp_to_border, gl_options_t::ext_clamp_to_edge, g_game, VegaConfig::getColor(), VegaConfig::getVariable(), GFXActiveTexture(), GFXADDTEXTURE, GFXBlendMode(), GFXCreateLightContext(), GFXInitTextureManager(), GFXTextureCoordGenMode(), GFXTextureEnv(), GFXToggleTexture(), GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, gl_options, i, init_opengl_extensions(), initfov(), gl_options_t::max_movie_dimension, gl_options_t::max_rect_dimension, gl_options_t::max_texture_dimension, gl_options_t::mipmap, gl_options_t::Multitexture, ONE, gl_options_t::PaletteExt, XMLSupport::parse_bool(), XMLSupport::parse_int(), gl_options_t::pot_video_textures, gl_options_t::rect_textures, Reshape(), gl_options_t::s3tc, gl_options_t::smooth_lines, gl_options_t::smooth_points, gl_options_t::smooth_shade, SPHERE_MAP_GEN, TEXTURE2D, vs_config, VSFileSystem::vs_dprintf(), vsExtensionSupported(), vsVendorMatch(), winsys_enable_key_repeat(), winsys_init(), winsys_set_reshape_func(), winsys_show_cursor(), winsys_swap_buffers(), gl_options_t::wireframe, game_data_t::x_resolution, game_data_t::y_resolution, and ZERO.
Referenced by GameUniverse::Init().
Sets the ambient light value.
Definition at line 251 of file gl_light.cpp.
References _ambient_light, _currentContext, GFXColor::a, GFXColor::b, GFXColor::g, GFXFALSE, GFXTRUE, and GFXColor::r.
Referenced by GameStarSystem::Draw(), GFXPopGlobalEffects(), GFXPushGlobalEffects(), SphereMesh::ProcessDrawQueue(), CityLights::ProcessDrawQueue(), Terrain::Render(), Terrain::RenderAll(), and GameUniverse::StartGFX().
void GFXLineWidth | ( | const float | size) |
Sets the line width in pixels of a GFXLINE.
Definition at line 147 of file gl_misc.cpp.
Referenced by Radar::SphereDisplay::DrawBackground(), Radar::BubbleDisplay::DrawBackground(), Radar::PlaneDisplay::DrawGround(), DrawOneTargetBox(), Radar::PlaneDisplay::DrawTarget(), Radar::SphereDisplay::DrawTargetMarker(), Radar::BubbleDisplay::DrawTargetMarker(), Radar::PlaneDisplay::DrawTargetMarker(), and setupGLState().
void GFXLoadIdentity | ( | const MATRIXMODE | mode) |
Loads the identity matrix for the given mode.
Definition at line 263 of file gl_matrix.cpp.
References ConstructAndLoadProjection(), GFX_SCALE, Identity(), IdentityFloat(), GFXMatrices::model, MODEL, Matrix::p, GFXMatrices::projection, PROJECTION, GFXMatrices::rotview, GFXMatrices::view, VIEW, and ViewToModel().
Referenced by bootstrap_draw(), CoordinateSelect::Draw(), LocationSelect::Draw(), GamePlanet::Draw(), Stars::Draw(), GameCockpit::Draw(), ParticleTrail::DrawAndUpdate(), Mesh::DrawNow(), GamePlanet::DrawTerrain(), GFXBeginScene(), GFXCenterCamera(), GFXUploadLightState(), Halo::ProcessDrawQueue(), Camera::UpdateGFX(), and Camera::UpdateGLCenter().
void GFXLoadMatrixModel | ( | const Matrix & | matrix) |
loads a given matrix to the current "mode"
Definition at line 207 of file gl_matrix.cpp.
References CopyMatrix(), GFXMatrices::model, and ViewToModel().
Referenced by bootstrap_draw(), Bolt::Draw(), Background::Draw(), Atmosphere::Draw(), Animation::DrawNow(), Mesh::DrawNow(), GFXUploadLightState(), Box::ProcessDrawQueue(), Logo::ProcessDrawQueue(), Beam::ProcessDrawQueue(), and QuadTree::Render().
void GFXLoadMatrixProjection | ( | const float | matrix[16]) |
Definition at line 213 of file gl_matrix.cpp.
References ConstructAndLoadProjection(), VsnetOSS::memcpy(), and GFXMatrices::projection.
Referenced by GFXParallel().
void GFXLoadMatrixView | ( | const Matrix & | matrix) |
Definition at line 200 of file gl_matrix.cpp.
References ConstructAndLoadProjection(), CopyMatrix(), GFXMatrices::view, and ViewToModel().
Referenced by GFXLookAt().
Sets the VIEW matrix to look from center in direction of eye with up vector up.
Definition at line 495 of file gl_matrix.cpp.
References GFXLoadMatrixView(), LookAtHelper(), and GFXMatrices::view.
Referenced by Camera::UpdateGFX(), and Camera::UpdateGLCenter().
void GFXLoop | ( | void | main_loop()) |
loops on the function over and over
so we can call this function multiple times to change the display and idle functions
Definition at line 732 of file gl_init.cpp.
References main_loop(), winsys_process_events(), winsys_set_display_func(), and winsys_set_idle_func().
Referenced by BaseInterface::InitCallbacks(), GameUniverse::Loop(), GameMenu::processSinglePlayerButton(), restore_main_loop(), UniverseUtil::startMenuInterface(), and NavComputer::toggleVisibility().
void GFXModifyMaterial | ( | const unsigned int | number, |
const GFXMaterial & | material | ||
) |
Modifies the given material to be like the passed in structure.
Definition at line 45 of file gl_material.cpp.
References materialinfo.
bool GFXMultiTexAvailable | ( | ) |
Definition at line 32 of file gl_misc.cpp.
References gl_options, and gl_options_t::Multitexture.
void GFXMultMatrixModel | ( | const Matrix & | matrix) |
Multipliex the current "mode" matrix by a given matrix.
Definition at line 189 of file gl_matrix.cpp.
References CopyMatrix(), GFXMatrices::model, MultMatrix(), and ViewToModel().
Referenced by LocationSelect::Draw().
int GFXNamedShaderConstant | ( | char * | progID, |
const char * | name | ||
) |
Definition at line 639 of file gl_program.cpp.
References cacheKey(), defaultprog, GFXNamedShaderConstant(), and programCache.
Referenced by Technique::Pass::compile(), and GFXNamedShaderConstant().
void GFXNormal | ( | const Vector & | n) |
Specifies a notmal with 1 vector.
Definition at line 263 of file gl_misc.cpp.
Specifies a normal with 3 floats.
Definition at line 258 of file gl_misc.cpp.
void GFXOptimizeList | ( | GFXVertex * | old, |
int | numV, | ||
GFXVertex ** | newlist, | ||
int * | numnewVertices, | ||
unsigned int ** | indices | ||
) |
Optimizes a list to reuse repeated vertices!
Definition at line 68 of file gl_vertex_list.cpp.
References i, VsnetOSS::memcpy(), and VSFileSystem::vs_dprintf().
Referenced by Mesh::PostProcessLoading().
Sets the Projection matrix to a parallel view with given paramters.
Definition at line 376 of file gl_matrix.cpp.
References GFXGetFrustumVars(), GFXLoadMatrix(), GFXLoadMatrixProjection(), M, GFXMatrices::projection, PROJECTION, x, y, and z.
Referenced by Camera::UpdateGFX(), and Camera::UpdateGLCenter().
Sets the Projection matrix to have fov and aspect as follows (fov is field of view in radians, aspect is width/height znear and zfar are clip planes.
Definition at line 356 of file gl_matrix.cpp.
References ConstructAndLoadProjection(), GFX_SCALE, gl_Frustum(), M_PI, and GFXMatrices::projection.
Referenced by Camera::UpdateGFX(), and Camera::UpdateGLCenter().
picks and activates local lights near to "center"
Definition at line 173 of file gl_light_pick.cpp.
References gfx_light::dopickenables(), GFXPickLights(), newpicked, and swappicked().
Referenced by Mesh::DrawNow(), and GFXPickLights().
void GFXPickLights | ( | const Vector & | center, |
const float | radius, | ||
vector< int > & | lights, | ||
const int | maxlights, | ||
const bool | pickglobals | ||
) |
picks and does not activate local lights near to "center"
Definition at line 139 of file gl_light_pick.cpp.
References _GLLightsEnabled, GFX_MAX_LIGHTS, OpenGLL::GL_ENABLED, OpenGLL::GLL_LOCAL, GLLights, i, index, j, lighttable, picklight(), and QVector.
activates local lights picked by GFXPickLight
Definition at line 180 of file gl_light_pick.cpp.
References gfx_light::dopickenables(), newpicked, and swappicked().
void GFXPointSize | ( | const float | size) |
Sets the size in pixels of a GFXPOINT.
Definition at line 142 of file gl_misc.cpp.
Referenced by Radar::SphereDisplay::Draw(), Radar::BubbleDisplay::Draw(), Radar::PlaneDisplay::Draw(), ParticleTrail::DrawAndUpdate(), DrawGun(), Radar::PlaneDisplay::DrawTarget(), Radar::SphereDisplay::DrawTrack(), and Radar::BubbleDisplay::DrawTrack().
void GFXPolygonMode | ( | const enum | POLYMODE) |
Sets the polygon rasterization mode.
Definition at line 104 of file gl_misc.cpp.
References GFXFILLMODE, GFXLINEMODE, and GFXPOINTMODE.
Referenced by setupGLState().
Sets Depth Offset for polgyons.
Definition at line 87 of file gl_misc.cpp.
References last_factor, and last_units.
Referenced by Logo::ProcessDrawQueue(), SphereMesh::ProcessDrawQueue(), CityLights::ProcessDrawQueue(), quadsquare::Render(), setupGLState(), and SetupSpecMapFirstPass().
void GFXPopBlendMode | ( | ) |
Restores previous blend mode.
Definition at line 356 of file gl_state.cpp.
References blendstack, currBlendMode, BlendMode::dfactor, GFXBlendMode(), and BlendMode::sfactor.
Referenced by CoordinateSelect::Draw(), LocationSelect::Draw(), GFXVertexList::Draw(), Animation::DrawAsVSSprite(), DrawDamageFlash(), PaintText::drawLines(), DrawShield(), Halo::ProcessDrawQueue(), Beam::ProcessDrawQueue(), RestoreCloakState(), RestoreEnvmapState(), RestoreFirstPassState(), RestoreGlowMapState(), and RestoreSpecMapState().
GFXBOOL GFXPopGlobalEffects | ( | ) |
This function undoes the above function to restore the global lights after specialFX phase.
Definition at line 67 of file gl_light.cpp.
References GFX_MAX_LIGHTS, GFXLightContextAmbient(), GlobalEffects, GlobalEffectsAmbient, GlobalEffectsFreelist, and i.
Referenced by GameStarSystem::Draw(), Stars::Draw(), and Mesh::ProcessUndrawnMeshes().
Sets the priority of the texture for memory management.
Definition at line 401 of file gl_texture.cpp.
Referenced by Texture::Prioritize().
void GFXPushBlendMode | ( | ) |
Pushes and saves current blend mode.
Definition at line 351 of file gl_state.cpp.
References blendstack, and currBlendMode.
Referenced by CoordinateSelect::Draw(), GFXVertexList::Draw(), Animation::DrawAsVSSprite(), DrawDamageFlash(), PaintText::drawLines(), DrawShield(), Halo::ProcessDrawQueue(), Beam::ProcessDrawQueue(), SetupCloakState(), SetupDamageMapThirdPass(), SetupEnvmapPass(), SetupGlowMapFourthPass(), SetupSpecMapFirstPass(), and SetupSpecMapSecondPass().
void GFXPushGlobalEffects | ( | ) |
In the case of shields and other T&L based effects, the global lights must be disabled yet saved for later use while the selected lights are used shortly then disabled. This saves values of global lights
Definition at line 45 of file gl_light.cpp.
References _ambient_light, _currentContext, GFX_MAX_LIGHTS, GFXLightContextAmbient(), OpenGLL::GL_ENABLED, GlobalEffects, GlobalEffectsAmbient, GlobalEffectsFreelist, i, OpenGLLights::options, and unpicklights().
Referenced by Stars::Draw(), and Mesh::ProcessUndrawnMeshes().
void GFXReloadDefaultShader | ( | ) |
Definition at line 373 of file gl_program.cpp.
References defaultprog, GFXCreateProgram(), glDeleteProgram_p, hifiprog, hifiProgramName, lowfiprog, lowfiProgramName, programChanged, programVersion, and VSFileSystem::vs_fprintf().
Referenced by doReloadShader().
void GFXRestoreHudMode | ( | ) |
Definition at line 238 of file gl_matrix.cpp.
void GFXSelectMaterial | ( | const unsigned int | number) |
Definition at line 131 of file gl_material.cpp.
References materialinfo, power, and selectedmaterial.
Referenced by Stars::Draw(), Mesh::DrawNow(), setupGLState(), GameUniverse::StartGFX(), and TerrainMakeActive().
void GFXSelectMaterialHighlights | ( | const unsigned int | number, |
const GFXColor & | ambient, | ||
const GFXColor & | diffuse, | ||
const GFXColor & | specular, | ||
const GFXColor & | emmissive | ||
) |
Tells Graphics library which material to use on next polygon if lighting enabled.
Definition at line 96 of file gl_material.cpp.
References GFXColor::a, GFXColor::b, GFXColor::g, materialinfo, power, GFXColor::r, and selectedmaterial.
Referenced by SetupCloakState(), SetupEnvmapPass(), SetupGlowMapFourthPass(), SetupSpecMapFirstPass(), and SetupSpecMapSecondPass().
Selects the current texture as being "active" so further drawn objects will have it.
Definition at line 1126 of file gl_texture.cpp.
References activetexture, GFXActiveTexture(), gl_options, gl_options_t::Multitexture, and textures.
Referenced by StreamTexture::MakeActive(), PipelinedTexture::MakeActive(), Texture::MakeActive(), PipelinedTexture::MakeBothActive(), and PipelinedTexture::MakeLastActive().
Sets the intensity cutoff before picked lights are ignored.
Definition at line 214 of file gl_light.cpp.
References GFXFALSE, GFXTRUE, and intensity_cutoff.
Referenced by SetupGLLightGlobals().
Modifies the parameters of the given light.
Definition at line 287 of file gl_light.cpp.
References _llights, GFXFALSE, and GFXTRUE.
Referenced by GamePlanet::Draw().
void GFXSetLightContext | ( | const int | con_number) |
Sets active light context (restores all gllights in such context)
Definition at line 336 of file gl_light.cpp.
References _ambient_light, _currentContext, _llights, _local_lights_dat, GFX_MAX_LIGHTS, OpenGLL::GLL_OFF, i, OpenGLLights::index, lighttable, OpenGLLights::options, and unpicklights().
Referenced by ClientServerSetLightContext(), GFXCreateLightContext(), GameUniverse::StartGFX(), and GameStarSystem::SwapIn().
void GFXSetMaterial | ( | unsigned int & | number, |
const GFXMaterial & | material | ||
) |
Creates a new material given a material struct. Will search through already made materials for matching materials to minimize switching.
Definition at line 71 of file gfxlib_struct_server.cpp.
References i, int, and materialinfo.
Referenced by Mesh::PostProcessLoading(), Mesh::SetMaterial(), and GameUniverse::StartGFX().
Sets the optimal intensity given that Optimal number of lights is fulfilled.
Definition at line 222 of file gl_light.cpp.
References optintense, optsat, and saturate().
Referenced by SetupGLLightGlobals().
Sets number of lights graphics can handle optimally.
Definition at line 228 of file gl_light.cpp.
References GFX_MAX_LIGHTS, GFX_OPTIMAL_LIGHTS, GFXFALSE, and GFXTRUE.
Referenced by SetupGLLightGlobals().
void GFXSetPickName | ( | int | name) |
Definition at line 41 of file gl_pick.cpp.
Sets the light model to have separate specular color (if available)
Definition at line 236 of file gl_light.cpp.
References GFXFALSE, and GFXTRUE.
Referenced by RestoreEnvmapState(), RestoreSpecMapState(), SetupEnvmapPass(), SetupGLLightGlobals(), SetupSpecMapFirstPass(), and SetupSpecMapSecondPass().
Definition at line 556 of file gl_program.cpp.
References GFXShaderConstant().
Referenced by GFXShaderConstant().
Definition at line 551 of file gl_program.cpp.
References GFXColor::a, GFXColor::b, GFXColor::g, GFXShaderConstant(), and GFXColor::r.
Definition at line 546 of file gl_program.cpp.
References GFXShaderConstant().
Definition at line 587 of file gl_program.cpp.
References glUniform4fv_p.
Referenced by GFXUploadLightState().
Definition at line 600 of file gl_program.cpp.
References glUniform1i_p.
Referenced by GFXUploadLightState().
Definition at line 574 of file gl_program.cpp.
References glUniform1fv_p.
Referenced by GFXUploadLightState().
bool GFXShaderReloaded | ( | ) |
Definition at line 463 of file gl_program.cpp.
References defaultprog, VegaConfig::getVariable(), GFXActivateShader(), GFXGetFramerate(), hifiprog, lowfiprog, XMLSupport::parse_bool(), programChanged, TOOFAST, TOOSLOW, and vs_config.
void GFXShutdown | ( | ) |
Shuts down the graphics subsystem.
Definition at line 748 of file gl_init.cpp.
References gl_options_t::fullscreen, GFXDestroyAllLights(), GFXDestroyAllTextures(), gl_options, and winsys_shutdown().
Referenced by GameUniverse::~GameUniverse().
checks if a sphere is in the currently loaded Frustum given its center and radius
Definition at line 10 of file gl_clip.cpp.
References frust, and GFXSphereInFrustum().
Referenced by ContinuousTerrain::Draw(), GameUnit< UnitType >::Draw(), GameUnit< UnitType >::DrawNow(), GFXSphereInFrustum(), and GameUnit< UnitType >::queryFrustum().
Checks if a sphere is in the given frustum calculated by GFXCalculateFrustum. Used in Unit clipping.
Definition at line 140 of file gl_clip.cpp.
References d.
Definition at line 23 of file gl_clip.cpp.
References BoxFrust, and GFXSpherePartiallyInFrustum().
Referenced by SphericalTransform::BoxInFrustum(), GFXSpherePartiallyInFrustum(), and GFXTransformedSpherePartiallyInFrustum().
Definition at line 32 of file gl_clip.cpp.
References d, GFX_NOT_VISIBLE, GFX_PARTIALLY_VISIBLE, and GFX_TOTALLY_VISIBLE.
enum DEPTHFUNC GFXStencilFunc | ( | ) |
Returns the current stencil test function.
Definition at line 444 of file gl_state.cpp.
References cur_stencil_func.
Gets details about the current stancil compare function - Specify NULL for unwanted fields.
Definition at line 449 of file gl_state.cpp.
References cur_stencil_func, cur_stencil_func_mask, and cur_stencil_func_ref.
Sets up a stencil compare function.
Definition at line 456 of file gl_state.cpp.
References ALWAYS, cur_stencil_func, cur_stencil_func_mask, cur_stencil_func_ref, EQUAL, GEQUAL, GREATER, LEQUAL, LESS, NEQUAL, and NEVER.
unsigned int GFXStencilMask | ( | ) |
Returns the current stencil write mask.
Definition at line 583 of file gl_state.cpp.
References cur_stencil_mask.
void GFXStencilMask | ( | unsigned int | mask) |
Sets the stencil write mask.
Definition at line 588 of file gl_state.cpp.
References cur_stencil_mask.
Gets the current stencil write operations - Specify NULL for unwanted fields.
Definition at line 495 of file gl_state.cpp.
References cur_stencil_op_f, cur_stencil_op_zf, and cur_stencil_op_zp.
Sets up the stencil write operations.
Definition at line 502 of file gl_state.cpp.
References CLEAR, cur_stencil_op_f, cur_stencil_op_zf, cur_stencil_op_zp, DECR, INCR, INVERT, KEEP, and REPLACE.
Creates a subwindow with the current parameters for center and size.
Definition at line 327 of file gl_misc.cpp.
References g_game, game_data_t::x_resolution, and game_data_t::y_resolution.
Referenced by GFXSubwindow(), Camera::RestoreViewPort(), and Camera::UpdateGFX().
Definition at line 337 of file gl_misc.cpp.
References g_game, GFXSubwindow(), game_data_t::x_resolution, and game_data_t::y_resolution.
void GFXTexCoord224f | ( | const float | s, |
const float | t, | ||
const float | s2, | ||
const float | t2, | ||
const float | s3, | ||
const float | t3, | ||
const float | u3, | ||
const float | v3 | ||
) |
Specifies four texture coordinates for a given vertex (3 textures)
Definition at line 237 of file gl_misc.cpp.
References gl_options, glMultiTexCoord2fARB_p, glMultiTexCoord4fARB_p, and gl_options_t::Multitexture.
Referenced by GFXVertexList::RefreshDisplayList().
Specifies a pair of texture coordinates for given vertex.
Definition at line 219 of file gl_misc.cpp.
Referenced by AnimationDraw(), ParticlePoint::Draw(), GuiTexture::draw(), VSSprite::Draw(), Animation::DrawAsVSSprite(), DrawDamageFlash(), DrawHUDSprite(), Animation::DrawNoTransform(), and Animation::DrawNow().
Specifies four texture coordinates for a given vertex (2 textures)
Definition at line 224 of file gl_misc.cpp.
References gl_options, glMultiTexCoord2fARB_p, and gl_options_t::Multitexture.
Referenced by VSSprite::Draw(), Animation::DrawAsVSSprite(), Animation::DrawNoTransform(), and Animation::DrawNow().
void GFXTextureAddressMode | ( | const ADDRESSMODE | mode, |
enum TEXTURE_TARGET | target = TEXTURE2D |
||
) |
Sets texture to clamp or wrap texture coordinates.
Definition at line 258 of file gl_state.cpp.
References _GFXActiveTextureValid(), BORDER, CLAMP, CUBEMAP, DEFAULT_ADDRESS_MODE, GetGLTextureTarget(), GL_CLAMP_TO_BORDER_ARB, GL_CLAMP_TO_EDGE_EXT, MIRROR, TEXTURE1D, TEXTURE3D, and WRAP.
Referenced by Background::Draw(), GFXCreateTexture(), and Texture::MakeActive().
void GFXTextureCoordGenMode | ( | int | stage, |
GFXTEXTURECOORDMODE | tex, | ||
const float | params[4], | ||
const float | paramt[4] | ||
) |
Definition at line 1075 of file gl_texture.cpp.
References CUBE_MAP_GEN, EYE_LINEAR_GEN, GFXActiveTexture(), gl_options, gl_options_t::Multitexture, NO_GEN, OBJECT_LINEAR_GEN, and SPHERE_MAP_GEN.
Referenced by GameStarSystem::activateLightMap(), Background::Draw(), VSSprite::Draw(), Animation::DrawAsVSSprite(), Animation::DrawNoTransform(), Animation::DrawNow(), GFXInit(), RestoreEnvmapState(), RestoreSpecMapState(), and SetupSpecMapFirstPass().
void GFXTextureEnv | ( | int | stage, |
GFXTEXTUREENVMODES | mode, | ||
float | arg2 = 0 |
||
) |
Definition at line 1137 of file gl_texture.cpp.
References GFXActiveTexture(), GFXADDSIGNEDTEXTURE, GFXADDTEXTURE, GFXCOMPOSITETEXTURE, GFXDETAILTEXTURE, GFXINTERPOLATETEXTURE, GFXMODULATETEXTURE, GFXREPLACETEXTURE, gl_options, and gl_options_t::Multitexture.
Referenced by GameStarSystem::activateLightMap(), AnimationDraw(), Background::Draw(), VSSprite::Draw(), Animation::DrawAsVSSprite(), Animation::DrawNoTransform(), Animation::DrawNow(), Mesh::DrawNow(), GFXInit(), AnimatedTexture::MakeActive(), Beam::ProcessDrawQueue(), RestoreEnvmapState(), RestoreSpecMapState(), SetupEnvmapPass(), AnimatedTexture::SetupPass(), SetupSpecMapFirstPass(), and SetupSpecMapSecondPass().
void GFXTextureWrap | ( | int | stage, |
GFXTEXTUREWRAPMODES | mode, | ||
enum TEXTURE_TARGET | target = TEXTURE2D |
||
) |
Definition at line 1238 of file gl_texture.cpp.
References GetGLTextureTarget(), GFXActiveTexture(), GFXBORDERTEXTURE, GFXCLAMPTEXTURE, GFXREPEATTEXTURE, GL_CLAMP_TO_BORDER_ARB, GL_CLAMP_TO_EDGE_EXT, gl_options, gl_options_t::Multitexture, TEXTURE1D, and TEXTURE3D.
void GFXToggleTexture | ( | bool | enable, |
int | whichstage, | ||
enum TEXTURE_TARGET | target = TEXTURE2D |
||
) |
Definition at line 167 of file gl_state.cpp.
References bTex, GetGLTextureTarget(), GFXActiveTexture(), gl_options, and gl_options_t::Multitexture.
Referenced by GameStarSystem::activateLightMap(), Bolt::Draw(), Background::Draw(), VSSprite::Draw(), Animation::DrawAsVSSprite(), PaintText::drawLines(), Animation::DrawNoTransform(), Animation::DrawNow(), Mesh::DrawNow(), GFXInit(), Beam::ProcessDrawQueue(), Mesh::ProcessDrawQueue(), RestoreEnvmapState(), RestoreFirstPassState(), SetupEnvmapPass(), and SetupSpecMapFirstPass().
GFXBOOL GFXTransferSubTexture | ( | unsigned char * | buffer, |
int | handle, | ||
int | x, | ||
int | y, | ||
unsigned int | width, | ||
unsigned int | height, | ||
enum TEXTURE_IMAGE_TARGET | image2D = TEXTURE_2D |
||
) |
Definition at line 683 of file gl_texture.cpp.
References GetImageTarget(), GFXTRUE, and textures.
Referenced by PipelinedTexture::endMutate().
GFXBOOL GFXTransferTexture | ( | unsigned char * | buffer, |
int | handle, | ||
int | inWidth, | ||
int | inHeight, | ||
enum TEXTUREFORMAT | internalformat, | ||
enum TEXTURE_IMAGE_TARGET | image2D = TEXTURE_2D , |
||
int | max_texture_dimension = 65536 , |
||
GFXBOOL | detailtexture = GFXFALSE , |
||
unsigned int | pageIndex = 0 |
||
) |
Transfers texture to the graphics card with given buffer in previously specified format. Scales texture approrpiately to Max texture sizes gotten from vid card
Definition at line 700 of file gl_texture.cpp.
References gl_options_t::compression, ddsDecompress(), DownSampleTexture(), DXT1, DXT1RGBA, DXT3, DXT5, GetImageTarget(), GetImageTargetName(), GetTextureFormat(), VegaConfig::getVariable(), GFXFALSE, GFXTransferTexture(), GFXTRUE, gl_options, glColorTable_p, glCompressedTexImage2D_p, i, isPowerOfTwo(), j, gl_options_t::max_texture_dimension, MAX_TEXTURE_SIZE, gl_options_t::mipmap, MIPMAP, PALETTE8, gl_options_t::PaletteExt, XMLSupport::parse_bool(), XMLSupport::parse_int(), PNGPALETTE8, PNGRGB24, PNGRGBA32, RGB16, RGB24, RGB32, RGBA16, RGBA32, gl_options_t::s3tc, size, textures, TRILINEAR, vs_config, and VSFileSystem::vs_dprintf().
Referenced by PipelinedTexture::Clone(), GFXTransferTexture(), PipelinedTexture::PipelinedTexture(), StreamTexture::StreamTexture(), Texture::Transfer(), and StreamTexture::UnMap().
Definition at line 18 of file gl_clip.cpp.
References frust, and GFXBoxInFrustum().
Definition at line 27 of file gl_clip.cpp.
References frust, and GFXSpherePartiallyInFrustum().
void GFXTranslateModel | ( | const QVector & | r) |
Definition at line 175 of file gl_matrix.cpp.
References GFXMatrices::model, Matrix::p, TransformNormal(), and ViewToModel().
Referenced by Stars::Draw(), and ParticleTrail::DrawAndUpdate().
void GFXTranslateProjection | ( | const Vector & | r) |
Translates the current "mode" matrix by a given vector.
Definition at line 181 of file gl_matrix.cpp.
References ConstructAndLoadProjection(), and GFXMatrices::projection.
void GFXTranslateView | ( | const QVector & | r) |
Definition at line 165 of file gl_matrix.cpp.
References Matrix::p, TransformNormal(), GFXMatrices::view, and ViewToModel().
void GFXUploadLightState | ( | int | max_light_location, |
int | active_light_array, | ||
int | apparent_light_size_array, | ||
bool | shader, | ||
vector< int >::const_iterator | begin, | ||
vector< int >::const_iterator | end | ||
) |
Definition at line 14 of file gl_light_state.cpp.
References gfx_light::ContextSwitchClobberLight(), gfx_light::enabled(), float, GFXLight::getPosition(), GFXLight::getSize(), GFX_MAX_LIGHTS, GFXGetMatrixModel(), GFXLoadIdentity(), GFXLoadMatrixModel(), GFXShaderConstant4v(), GFXShaderConstanti(), GFXShaderConstantv(), i, M_PI, MODEL, Matrix::p, QVector, and UniverseUtil::sqrt().
void GFXVertex3d | ( | const double | x, |
const double | y, | ||
const double | z = 1.0 |
||
) |
Definition at line 278 of file gl_misc.cpp.
Referenced by ParticlePoint::Draw(), DrawGun(), and DrawShield().
Specifies a vertex with 3 floats.
Definition at line 268 of file gl_misc.cpp.
Referenced by AnimationDraw(), BaseInterface::Room::BaseText::Draw(), Radar::BubbleDisplay::DrawBackground(), NavigationSystem::DrawButtonOutline(), NavigationSystem::DrawCircle(), DrawCrosshairs(), NavigationSystem::DrawCursor(), DrawDamageFlash(), NavigationSystem::DrawGalaxy(), NavigationSystem::DrawGrid(), NavigationSystem::DrawHalfCircleBottom(), NavigationSystem::DrawHalfCircleTop(), NavigationSystem::DrawJump(), NavigationSystem::DrawMissile(), NavigationSystem::DrawNavCircle(), Animation::DrawNoTransform(), Animation::DrawNow(), NavigationSystem::DrawPlanet(), DrawSquare(), NavigationSystem::DrawStation(), NavigationSystem::DrawTargetCorners(), Radar::SphereDisplay::DrawTargetMarker(), Radar::BubbleDisplay::DrawTargetMarker(), Radar::PlaneDisplay::DrawTargetMarker(), GFXCircle(), and Box::ProcessDrawQueue().
void GFXVertex3f | ( | const double | x, |
const double | y, | ||
const double | z = 1.0 |
||
) |
Definition at line 273 of file gl_misc.cpp.
void GFXVertexf | ( | const Vector & | v) |
Specifies a vertex with a vector.
Definition at line 283 of file gl_misc.cpp.
Referenced by ParticlePoint::Draw(), GuiTexture::draw(), VSSprite::Draw(), BaseInterface::Room::Draw(), Animation::DrawAsVSSprite(), Radar::SphereDisplay::DrawBackground(), DrawFrustum(), Radar::PlaneDisplay::DrawGround(), DrawGun(), DrawHUDSprite(), DrawITTSLine(), DrawITTSMark(), DrawOneTargetBox(), Radar::PlaneDisplay::DrawTarget(), Radar::PlaneDisplay::DrawTargetMarker(), Radar::SphereDisplay::DrawTrack(), and Radar::BubbleDisplay::DrawTrack().
void GFXVertexf | ( | const QVector & | v) |
Definition at line 288 of file gl_misc.cpp.