Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Typedefs | Enumerations | Functions | Variables
Gfx Namespace Reference

Namespace for (new) graphics code. More...

Classes

struct  BuildingLevel
 Flat level for building. More...
 
struct  CachedFont
 Base TTF font with UTF-8 char cache. More...
 
class  CCamera
 Camera moving in 3D scene. More...
 
class  CCloud
 Cloud layer renderer. More...
 
class  CDevice
 Abstract interface of graphics device. More...
 
class  CEngine
 The graphics engine. More...
 
class  CGLDevice
 Implementation of CDevice interface in OpenGL. More...
 
struct  CharTexture
 Texture of font character. More...
 
class  CLightManager
 Manager for dynamic lights in 3D scene. More...
 
class  CLightning
 Lightning effect renderer. More...
 
struct  CloudLine
 Cloud strip. More...
 
class  CModelFile
 Model file reader/writer. More...
 
class  CModelManager
 Manager for static models. More...
 
struct  Color
 RGBA color. More...
 
struct  ColorHSV
 HSV color. More...
 
class  CParticle
 Particle engine. More...
 
class  CPlanet
 Planet manager. More...
 
class  CPyro
 Fire effect renderer. More...
 
class  CTerrain
 Terrain loader/generator and manager. More...
 
class  CText
 Text rendering engine. More...
 
class  CWater
 Water manager/renderer. More...
 
struct  DeviceConfig
 General config for graphics device. More...
 
struct  DynamicLight
 Dynamic light in 3D scene. More...
 
struct  EngineBaseObjDataTier
 Tier 4 of object tree (data) More...
 
struct  EngineBaseObject
 
struct  EngineBaseObjLODTier
 Tier 3 of base object tree (LOD) More...
 
struct  EngineBaseObjTexTier
 Tier 2 of base object tree (textures) More...
 
struct  EngineGroundMark
 A mark on ground drawn by the graphics engine. More...
 
struct  EngineGroundSpot
 A spot (large shadow) drawn on the ground by the graphics engine. More...
 
struct  EngineMouse
 Information about mouse cursor. More...
 
struct  EngineObject
 Object drawn by the graphics engine. More...
 
struct  EngineShadow
 Shadow drawn by the graphics engine. More...
 
struct  EngineTriangle
 A triangle drawn by the graphics engine. More...
 
struct  FlyingLimit
 Spherical limit of flight. More...
 
struct  GLDeviceConfig
 Additional config with OpenGL-specific settings. More...
 
struct  IntColor
 Color with integer values. More...
 
struct  Light
 Properties of light in 3D scene. More...
 
struct  LightProgression
 Describes the progression of light parameters change. More...
 
struct  Material
 Material of a surface. More...
 
struct  ModelTriangle
 Triangle of a 3D model. More...
 
struct  MultisizeFont
 Font with multiple possible sizes. More...
 
struct  NewModelHeader
 Header for new binary model file. More...
 
struct  NewModelTriangle1
 Triangle of new binary model file. More...
 
struct  OldModelHeader
 Colobot binary model header info. More...
 
struct  OldModelTriangle1
 Colobot binary model file version 1. More...
 
struct  OldModelTriangle2
 Colobot binary model file version 2. More...
 
struct  OldModelTriangle3
 Colobot binary model file version 3. More...
 
struct  Particle
 
struct  Planet
 Planet texture definition. More...
 
struct  PyroBurnPart
 
struct  PyroLightOper
 
struct  TerrainMaterial
 Material for ground surface. More...
 
struct  TerrainMaterialPoint
 Material used for terrain point. More...
 
struct  Texture
 Info about a texture. More...
 
struct  TextureCreateParams
 Parameters for texture creation. More...
 
struct  TextureStageParams
 Parameters for a texture unit. More...
 
struct  Track
 
struct  UTF8Char
 UTF-8 character in font cache. More...
 
struct  Vertex
 Vertex of a primitive. More...
 
struct  VertexCol
 Colored vertex. More...
 
struct  VertexTex2
 Vertex with secondary texture coordinates. More...
 
struct  WaterLine
 Water strip. More...
 
struct  WaterVapor
 Water particle effect. More...
 
struct  WheelTrace
 

Typedefs

typedef short FontMetaChar
 Type used for font character metainfo.
 

Enumerations

enum  TransformType { TRANSFORM_WORLD, TRANSFORM_VIEW, TRANSFORM_PROJECTION }
 Type of transformation in rendering pipeline. More...
 
enum  RenderState {
  RENDER_STATE_LIGHTING, RENDER_STATE_BLENDING, RENDER_STATE_FOG, RENDER_STATE_DEPTH_TEST,
  RENDER_STATE_DEPTH_WRITE, RENDER_STATE_ALPHA_TEST, RENDER_STATE_CULLING
}
 Render states that can be enabled/disabled.
 
enum  CompFunc {
  COMP_FUNC_NEVER, COMP_FUNC_LESS, COMP_FUNC_EQUAL, COMP_FUNC_NOTEQUAL,
  COMP_FUNC_LEQUAL, COMP_FUNC_GREATER, COMP_FUNC_GEQUAL, COMP_FUNC_ALWAYS
}
 Type of function used to compare values.
 
enum  BlendFunc {
  BLEND_ZERO, BLEND_ONE, BLEND_SRC_COLOR, BLEND_INV_SRC_COLOR,
  BLEND_DST_COLOR, BLEND_INV_DST_COLOR, BLEND_SRC_ALPHA, BLEND_INV_SRC_ALPHA,
  BLEND_DST_ALPHA, BLEND_INV_DST_ALPHA, BLEND_SRC_ALPHA_SATURATE
}
 Type of blending function.
 
enum  FogMode { FOG_LINEAR, FOG_EXP, FOG_EXP2 }
 Type of fog calculation function.
 
enum  CullMode { CULL_CW, CULL_CCW }
 Culling mode for polygons. More...
 
enum  ShadeModel { SHADE_FLAT, SHADE_SMOOTH }
 Shade model used in rendering.
 
enum  FillMode { FILL_POINT, FILL_LINES, FILL_POLY }
 Polygon fill mode. More...
 
enum  PrimitiveType {
  PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_TRIANGLES,
  PRIMITIVE_TRIANGLE_STRIP
}
 Type of primitive to render.
 
enum  FrustumPlane {
  FRUSTUM_PLANE_LEFT = 0x01, FRUSTUM_PLANE_RIGHT = 0x02, FRUSTUM_PLANE_TOP = 0x04, FRUSTUM_PLANE_BOTTOM = 0x08,
  FRUSTUM_PLANE_FRONT = 0x10, FRUSTUM_PLANE_BACK = 0x20, FRUSTUM_PLANE_ALL
}
 Planes of frustum space. More...
 
enum  LightType { LIGHT_POINT, LIGHT_SPOT, LIGHT_DIRECTIONAL }
 Type of light in 3D scene.
 
enum  TexImgFormat {
  TEX_IMG_AUTO, TEX_IMG_RGB, TEX_IMG_BGR, TEX_IMG_RGBA,
  TEX_IMG_BGRA
}
 Format of image data. More...
 
enum  TexMinFilter {
  TEX_MIN_FILTER_NEAREST, TEX_MIN_FILTER_LINEAR, TEX_MIN_FILTER_NEAREST_MIPMAP_NEAREST, TEX_MIN_FILTER_LINEAR_MIPMAP_NEAREST,
  TEX_MIN_FILTER_NEAREST_MIPMAP_LINEAR, TEX_MIN_FILTER_LINEAR_MIPMAP_LINEAR
}
 Texture minification filter. More...
 
enum  TexMagFilter { TEX_MAG_FILTER_NEAREST, TEX_MAG_FILTER_LINEAR }
 Texture magnification filter.
 
enum  TexWrapMode { TEX_WRAP_CLAMP, TEX_WRAP_REPEAT }
 Wrapping mode for texture coords.
 
enum  TexMixOperation {
  TEX_MIX_OPER_DEFAULT, TEX_MIX_OPER_REPLACE, TEX_MIX_OPER_MODULATE, TEX_MIX_OPER_ADD,
  TEX_MIX_OPER_SUBTRACT
}
 Multitexture mixing operation. More...
 
enum  TexMixArgument { TEX_MIX_ARG_TEXTURE, TEX_MIX_ARG_COMPUTED_COLOR, TEX_MIX_ARG_SRC_COLOR, TEX_MIX_ARG_FACTOR }
 Multitexture mixing argument. More...
 
enum  CameraType {
  CAM_TYPE_NULL = 0, CAM_TYPE_FREE = 1, CAM_TYPE_EDIT = 2, CAM_TYPE_ONBOARD = 3,
  CAM_TYPE_BACK = 4, CAM_TYPE_FIX = 5, CAM_TYPE_EXPLO = 6, CAM_TYPE_SCRIPT = 7,
  CAM_TYPE_INFO = 8, CAM_TYPE_VISIT = 9, CAM_TYPE_DIALOG = 10, CAM_TYPE_PLANE = 11
}
 Type of camera. More...
 
enum  CameraSmooth { CAM_SMOOTH_NONE = 0, CAM_SMOOTH_NORM = 1, CAM_SMOOTH_HARD = 2, CAM_SMOOTH_SPEC = 3 }
 
enum  CenteringPhase { CAM_PHASE_NULL = 0, CAM_PHASE_START = 1, CAM_PHASE_WAIT = 2, CAM_PHASE_STOP = 3 }
 
enum  CameraEffect {
  CAM_EFFECT_NULL = 0, CAM_EFFECT_TERRAFORM = 1, CAM_EFFECT_CRASH = 2, CAM_EFFECT_EXPLO = 3,
  CAM_EFFECT_SHOT = 4, CAM_EFFECT_VIBRATION = 5, CAM_EFFECT_PET = 6
}
 
enum  CameraOverEffect {
  CAM_OVER_EFFECT_NULL = 0, CAM_OVER_EFFECT_BLOOD = 1, CAM_OVER_EFFECT_FADEIN_WHITE = 2, CAM_OVER_EFFECT_FADEOUT_WHITE = 3,
  CAM_OVER_EFFECT_FADEOUT_BLACK = 4, CAM_OVER_EFFECT_LIGHTNING = 5
}
 
enum  EngineRenderState {
  ENG_RSTATE_NORMAL = 0, ENG_RSTATE_TTEXTURE_BLACK = (1<<0), ENG_RSTATE_TTEXTURE_WHITE = (1<<1), ENG_RSTATE_TDIFFUSE = (1<<2),
  ENG_RSTATE_WRAP = (1<<3), ENG_RSTATE_CLAMP = (1<<4), ENG_RSTATE_LIGHT = (1<<5), ENG_RSTATE_DUAL_BLACK = (1<<6),
  ENG_RSTATE_DUAL_WHITE = (1<<7), ENG_RSTATE_PART1 = (1<<8), ENG_RSTATE_PART2 = (1<<9), ENG_RSTATE_PART3 = (1<<10),
  ENG_RSTATE_PART4 = (1<<11), ENG_RSTATE_2FACE = (1<<12), ENG_RSTATE_ALPHA = (1<<13), ENG_RSTATE_SECOND = (1<<14),
  ENG_RSTATE_FOG = (1<<15), ENG_RSTATE_TCOLOR_BLACK = (1<<16), ENG_RSTATE_TCOLOR_WHITE = (1<<17), ENG_RSTATE_TEXT = (1<<18),
  ENG_RSTATE_OPAQUE_TEXTURE = (1<<19), ENG_RSTATE_OPAQUE_COLOR = (1<<20)
}
 Render state of graphics engine. More...
 
enum  EngineTriangleType { ENG_TRIANGLE_TYPE_TRIANGLES = 1, ENG_TRIANGLE_TYPE_SURFACE = 2 }
 Type of triangles drawn for engine objects. More...
 
enum  EngineObjectType {
  ENG_OBJTYPE_NULL = 0, ENG_OBJTYPE_TERRAIN = 1, ENG_OBJTYPE_FIX = 2, ENG_OBJTYPE_VEHICLE = 3,
  ENG_OBJTYPE_DESCENDANT = 4, ENG_OBJTYPE_QUARTZ = 5, ENG_OBJTYPE_METAL = 6
}
 Class of graphics engine object. More...
 
enum  EngineShadowType { ENG_SHADOW_NORM = 0, ENG_SHADOW_WORM = 1 }
 
enum  EngineGroundMarkPhase { ENG_GR_MARK_PHASE_NULL = 0, ENG_GR_MARK_PHASE_INC = 1, ENG_GR_MARK_PHASE_FIX = 2, ENG_GR_MARK_PHASE_DEC = 3 }
 Phase of life of an EngineGroundMark. More...
 
enum  EngineTextureMapping {
  ENG_TEX_MAPPING_X = 1, ENG_TEX_MAPPING_Y = 2, ENG_TEX_MAPPING_Z = 3, ENG_TEX_MAPPING_1X = 4,
  ENG_TEX_MAPPING_1Y = 5, ENG_TEX_MAPPING_1Z = 6
}
 Type of texture mapping.
 
enum  EngineMouseType {
  ENG_MOUSE_NORM = 0, ENG_MOUSE_WAIT = 1, ENG_MOUSE_EDIT = 2, ENG_MOUSE_HAND = 3,
  ENG_MOUSE_CROSS = 4, ENG_MOUSE_SHOW = 5, ENG_MOUSE_NO = 6, ENG_MOUSE_MOVE = 7,
  ENG_MOUSE_MOVEH = 8, ENG_MOUSE_MOVEV = 9, ENG_MOUSE_MOVED = 10, ENG_MOUSE_MOVEI = 11,
  ENG_MOUSE_SCROLLL = 12, ENG_MOUSE_SCROLLR = 13, ENG_MOUSE_SCROLLU = 14, ENG_MOUSE_SCROLLD = 15,
  ENG_MOUSE_TARGET = 16, ENG_MOUSE_COUNT
}
 Type of mouse cursor displayed in-game. More...
 
enum  LightPriority { LIGHT_PRI_HIGHEST = 0, LIGHT_PRI_HIGH = 1, LIGHT_PRI_LOW = 2 }
 Priority in light assignment. More...
 
enum  LODLevel { LOD_Constant = -1, LOD_Low = 1, LOD_Medium = 2, LOD_High = 4 }
 Level-of-detail. More...
 
enum  ParticleType {
  PARTIEXPLOT = 1, PARTIEXPLOO = 2, PARTIMOTOR = 3, PARTIGLINT = 4,
  PARTIBLITZ = 5, PARTICRASH = 6, PARTIGAS = 7, PARTIFIRE = 9,
  PARTIFIREZ = 10, PARTIBLUE = 11, PARTISELY = 12, PARTISELR = 13,
  PARTIGUN1 = 18, PARTIGUN2 = 19, PARTIGUN3 = 20, PARTIGUN4 = 21,
  PARTIFRAG = 22, PARTIQUEUE = 23, PARTIORGANIC1 = 24, PARTIORGANIC2 = 25,
  PARTISMOKE1 = 26, PARTISMOKE2 = 27, PARTISMOKE3 = 28, PARTISMOKE4 = 29,
  PARTIBLOOD = 30, PARTIBLOODM = 31, PARTIVAPOR = 32, PARTIVIRUS1 = 33,
  PARTIVIRUS2 = 34, PARTIVIRUS3 = 35, PARTIVIRUS4 = 36, PARTIVIRUS5 = 37,
  PARTIVIRUS6 = 38, PARTIVIRUS7 = 39, PARTIVIRUS8 = 40, PARTIVIRUS9 = 41,
  PARTIVIRUS10 = 42, PARTIRAY1 = 43, PARTIRAY2 = 44, PARTIRAY3 = 45,
  PARTIRAY4 = 46, PARTIFLAME = 47, PARTIBUBBLE = 48, PARTIFLIC = 49,
  PARTIEJECT = 50, PARTISCRAPS = 51, PARTITOTO = 52, PARTIERROR = 53,
  PARTIWARNING = 54, PARTIINFO = 54, PARTIQUARTZ = 55, PARTISPHERE0 = 56,
  PARTISPHERE1 = 57, PARTISPHERE2 = 58, PARTISPHERE3 = 59, PARTISPHERE4 = 60,
  PARTISPHERE5 = 61, PARTISPHERE6 = 62, PARTISPHERE7 = 63, PARTISPHERE8 = 64,
  PARTISPHERE9 = 65, PARTIGUNDEL = 66, PARTIPART = 67, PARTITRACK1 = 68,
  PARTITRACK2 = 69, PARTITRACK3 = 70, PARTITRACK4 = 71, PARTITRACK5 = 72,
  PARTITRACK6 = 73, PARTITRACK7 = 74, PARTITRACK8 = 75, PARTITRACK9 = 76,
  PARTITRACK10 = 77, PARTITRACK11 = 78, PARTITRACK12 = 79, PARTITRACK13 = 80,
  PARTITRACK14 = 81, PARTITRACK15 = 82, PARTITRACK16 = 83, PARTITRACK17 = 84,
  PARTITRACK18 = 85, PARTITRACK19 = 86, PARTITRACK20 = 87, PARTIGLINTb = 88,
  PARTIGLINTr = 89, PARTILENS1 = 90, PARTILENS2 = 91, PARTILENS3 = 92,
  PARTILENS4 = 93, PARTICONTROL = 94, PARTISHOW = 95, PARTICHOC = 96,
  PARTIGFLAT = 97, PARTIRECOVER = 98, PARTIROOT = 100, PARTIPLOUF0 = 101,
  PARTIPLOUF1 = 102, PARTIPLOUF2 = 103, PARTIPLOUF3 = 104, PARTIPLOUF4 = 105,
  PARTIDROP = 106, PARTIFOG0 = 107, PARTIFOG1 = 108, PARTIFOG2 = 109,
  PARTIFOG3 = 110, PARTIFOG4 = 111, PARTIFOG5 = 112, PARTIFOG6 = 113,
  PARTIFOG7 = 114, PARTIFOG8 = 115, PARTIFOG9 = 116, PARTILIMIT1 = 117,
  PARTILIMIT2 = 118, PARTILIMIT3 = 119, PARTILIMIT4 = 120, PARTIWATER = 121,
  PARTIEXPLOG1 = 122, PARTIEXPLOG2 = 123, PARTIBASE = 124, PARTITRACE0 = 140,
  PARTITRACE1 = 141, PARTITRACE2 = 142, PARTITRACE3 = 143, PARTITRACE4 = 144,
  PARTITRACE5 = 145, PARTITRACE6 = 146, PARTITRACE7 = 147, PARTITRACE8 = 148,
  PARTITRACE9 = 149, PARTITRACE10 = 150, PARTITRACE11 = 151, PARTITRACE12 = 152,
  PARTITRACE13 = 153, PARTITRACE14 = 154, PARTITRACE15 = 155, PARTITRACE16 = 156,
  PARTITRACE17 = 157, PARTITRACE18 = 158, PARTITRACE19 = 159
}
 
enum  ParticlePhase { PARPHSTART = 0, PARPHEND = 1 }
 
enum  PyroType {
  PT_NULL = 0, PT_FRAGT = 1, PT_FRAGO = 2, PT_FRAGW = 4,
  PT_EXPLOT = 5, PT_EXPLOO = 6, PT_EXPLOW = 8, PT_SHOTT = 9,
  PT_SHOTH = 10, PT_SHOTM = 11, PT_SHOTW = 12, PT_EGG = 13,
  PT_BURNT = 14, PT_BURNO = 15, PT_SPIDER = 16, PT_FALL = 17,
  PT_WPCHECK = 18, PT_FLCREATE = 19, PT_FLDELETE = 20, PT_RESET = 21,
  PT_WIN = 22, PT_LOST = 23, PT_DEADG = 24, PT_DEADW = 25,
  PT_FINDING = 26
}
 Type of pyro effect. More...
 
enum  TerrainRes {
  TR_NULL = 0, TR_STONE = 1, TR_URANIUM = 2, TR_POWER = 3,
  TR_KEY_A = 4, TR_KEY_B = 5, TR_KEY_C = 6, TR_KEY_D = 7
}
 Underground resource type. More...
 
enum  TextAlign { TEXT_ALIGN_RIGHT, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER }
 Type of text alignment.
 
enum  FontType {
  FONT_BOLD = 0x04, FONT_ITALIC = 0x08, FONT_COLOBOT = 0x00, FONT_COLOBOT_BOLD = FONT_COLOBOT | FONT_BOLD,
  FONT_COLOBOT_ITALIC = FONT_COLOBOT | FONT_ITALIC, FONT_COURIER = 0x01, FONT_COURIER_BOLD = FONT_COURIER | FONT_BOLD, FONT_BUTTON = 0x03
}
 Type of font. More...
 
enum  FontTitle { FONT_TITLE_BIG = 0x01 << 4, FONT_TITLE_NORM = 0x02 << 4, FONT_TITLE_LITTLE = 0x03 << 4 }
 Size of font title. More...
 
enum  FontHighlight {
  FONT_HIGHLIGHT_NONE = 0x00 << 6, FONT_HIGHLIGHT_LINK = 0x01 << 6, FONT_HIGHLIGHT_TOKEN = 0x02 << 6, FONT_HIGHLIGHT_TYPE = 0x03 << 6,
  FONT_HIGHLIGHT_CONST = 0x04 << 6, FONT_HIGHLIGHT_REM = 0x05 << 6, FONT_HIGHLIGHT_KEY = 0x06 << 6, FONT_HIGHLIGHT_TABLE = 0x07 << 6
}
 Type of color highlight for text. More...
 
enum  FontMask { FONT_MASK_FONT = 0x00f, FONT_MASK_TITLE = 0x030, FONT_MASK_HIGHLIGHT = 0x1c0, FONT_MASK_IMAGE = 0x200 }
 Masks in FontMetaChar for different attributes. More...
 
enum  SpecialChar {
  CHAR_TAB = '\t', CHAR_NEWLINE = '\n', CHAR_DOT = 1, CHAR_SQUARE = 2,
  CHAR_SKIP_RIGHT = 5, CHAR_SKIP_LEFT = 6
}
 Special codes for certain characters. More...
 
enum  WaterType {
  WATER_NULL = 0, WATER_TT = 1, WATER_TO = 2, WATER_CT = 3,
  WATER_CO = 4
}
 Mode of water display. More...
 
enum  VBOMode { VBO_MODE_ENABLE, VBO_MODE_DISABLE, VBO_MODE_AUTO }
 VBO autodetect/override. More...
 

Functions

ColorHSV RGB2HSV (Color color)
 Converts a RGB color to HSV color.
 
Color HSV2RGB (ColorHSV color)
 Converts a HSV color to RGB color.
 
Color IntColorToColor (IntColor color)
 
IntColor ColorToIntColor (Color color)
 
Color IntensityToColor (float intensity)
 
void SetTransparency (CObject *obj, float value)
 Changes the level of transparency of an object and objects transported (battery & cargo)
 
bool IsExcludeColor (Math::Point *exclude, int x, int y)
 
bool ReadBinaryVertex (std::istream &stream, Vertex &vertex)
 
bool WriteBinaryVertex (Vertex vertex, std::ostream &stream)
 
bool ReadBinaryVertexTex2 (std::istream &stream, VertexTex2 &vertex)
 
bool WriteBinaryVertexTex2 (VertexTex2 vertex, std::ostream &stream)
 
bool ReadTextVertexTex2 (const std::string &text, VertexTex2 &vertex)
 
bool WriteTextVertexTex2 (const VertexTex2 &vertex, std::ostream &stream)
 
bool ReadBinaryMaterial (std::istream &stream, Material &material)
 
bool WriteBinaryMaterial (const Material &material, std::ostream &stream)
 
bool ReadTextMaterial (const std::string &text, Material &material)
 
bool WriteTextMaterial (const Material &material, std::ostream &stream)
 
template<typename T >
bool ReadLineValue (std::istream &stream, const std::string &prefix, T &value)
 
bool ReadLineString (std::istream &stream, const std::string &prefix, std::string &value)
 
bool IsSoft (ObjectType type)
 Check if an object can be destroyed, but is not an enemy.
 
bool IsAlien (ObjectType type)
 Check if an object is a destroyable enemy.
 
float GetDecay (ObjectType type)
 Returns the damping factor for friendly fire.
 
void NameParticle (std::string &name, int num)
 Returns file name of the effect effectNN.png, with NN = number.
 
float ProgressCylinder (float progress)
 Returns the height depending on the progress.
 
GLenum TranslateGfxPrimitive (PrimitiveType type)
 
bool InPlane (Math::Vector normal, float originPlane, Math::Vector center, float radius)
 
CompFunc TranslateGLCompFunc (GLenum flag)
 
GLenum TranslateGfxCompFunc (CompFunc func)
 
BlendFunc TranslateGLBlendFunc (GLenum flag)
 
GLenum TranslateGfxBlendFunc (BlendFunc func)
 

Variables

const int CLOUD_LINE_PREALLOCATE_COUNT = 100
 
const int CLOUD_SIZE_EXPAND = 4
 Extension of the bricks dimensions.
 
const float LTNG_PROTECTION_RADIUS = 200.0f
 Radius of lightning protection.
 
const float FOG_HSUP = 10.0f
 
const float FOG_HINF = 100.0f
 
const short MAXPARTICULE = 500
 
const short MAXPARTITYPE = 5
 
const short MAXTRACK = 100
 
const short MAXTRACKLEN = 10
 
const short MAXPARTIFOG = 100
 
const short MAXWHEELTRACE = 1000
 
const short SH_WORLD = 0
 
const short SH_FRONT = 1
 
const short SH_INTERFACE = 2
 
const short SH_MAX = 3
 
const int PLANET_PREALLOCATE_COUNT = 10
 
const float TERRAIN_FLATLIMIT = (5.0f*Math::PI/180.0f)
 Limit of slope considered a flat piece of land.
 
const Math::IntPoint REFERENCE_SIZE (800, 600)
 
const float FONT_SIZE_SMALL = 12.0f
 Standard small font size.
 
const float FONT_SIZE_BIG = 18.0f
 Standard big font size.
 
const int WATERLINE_PREALLOCATE_COUNT = 500
 
const int VAPOR_SIZE = 10
 

Detailed Description

Namespace for (new) graphics code.

This namespace was created to avoid clashing with old code, but now it still serves, defining a border between pure graphics engine and other parts of application.

Enumeration Type Documentation

Enumerator
CAM_EFFECT_NULL 

No effect.

CAM_EFFECT_TERRAFORM 

Digging in.

CAM_EFFECT_CRASH 

? Vehicle driving is severely ?

CAM_EFFECT_EXPLO 

Explosion.

CAM_EFFECT_SHOT 

? Not mortal shot ?

CAM_EFFECT_VIBRATION 

Vibration during construction.

CAM_EFFECT_PET 

? Spleen reactor ?

Enumerator
CAM_OVER_EFFECT_NULL 

No effect.

CAM_OVER_EFFECT_BLOOD 

Flash red.

CAM_OVER_EFFECT_FADEIN_WHITE 

White -> nothing.

CAM_OVER_EFFECT_FADEOUT_WHITE 

Nothing -> white.

CAM_OVER_EFFECT_FADEOUT_BLACK 

Nothing -> blue.

CAM_OVER_EFFECT_LIGHTNING 

Lightning.

Enumerator
CAM_SMOOTH_NONE 

Sharp.

CAM_SMOOTH_NORM 

Normal.

CAM_SMOOTH_HARD 

Hard.

CAM_SMOOTH_SPEC 

Special.

Type of camera.

Enumerator
CAM_TYPE_NULL 

Undefined.

CAM_TYPE_FREE 

Free camera (? never in principle ?)

CAM_TYPE_EDIT 

Camera while editing a program.

CAM_TYPE_ONBOARD 

Camera on board a robot.

CAM_TYPE_BACK 

Camera behind a robot.

CAM_TYPE_FIX 

Static camera following robot.

CAM_TYPE_EXPLO 

Camera steady after explosion.

CAM_TYPE_SCRIPT 

Camera during a film script.

CAM_TYPE_INFO 

Camera for displaying information.

CAM_TYPE_VISIT 

Visit instead of an error.

CAM_TYPE_DIALOG 

Camera for dialog.

CAM_TYPE_PLANE 

Static camera height.

Culling mode for polygons.

Enumerator
CULL_CW 

Cull clockwise faces.

CULL_CCW 

Cull counter-clockwise faces.

Phase of life of an EngineGroundMark.

Enumerator
ENG_GR_MARK_PHASE_NULL 

Null phase.

ENG_GR_MARK_PHASE_INC 

Increase.

ENG_GR_MARK_PHASE_FIX 

Fixed.

ENG_GR_MARK_PHASE_DEC 

Decrease.

Type of mouse cursor displayed in-game.

Enumerator
ENG_MOUSE_NORM 

Normal cursor (arrow)

ENG_MOUSE_WAIT 

Busy.

ENG_MOUSE_EDIT 

Edit (I-beam)

ENG_MOUSE_HAND 

Hand.

ENG_MOUSE_CROSS 

Small cross.

ENG_MOUSE_SHOW 

TODO: ?

ENG_MOUSE_NO 

Crossed out sign.

ENG_MOUSE_MOVE 

Resize.

ENG_MOUSE_MOVEH 

Resize horizontally.

ENG_MOUSE_MOVEV 

Resize vertically.

ENG_MOUSE_MOVED 

Resize diagonally bottom-left to top-right.

ENG_MOUSE_MOVEI 

Resize diagonally top-left to bottom-right.

ENG_MOUSE_SCROLLL 

Scroll to the left.

ENG_MOUSE_SCROLLR 

Scroll to the right.

ENG_MOUSE_SCROLLU 

Scroll up.

ENG_MOUSE_SCROLLD 

Scroll down.

ENG_MOUSE_TARGET 

Larger crosshair.

ENG_MOUSE_COUNT 

Number of items in enum.

Class of graphics engine object.

Enumerator
ENG_OBJTYPE_NULL 

Object doesn't exist.

ENG_OBJTYPE_TERRAIN 

Terrain.

ENG_OBJTYPE_FIX 

Fixed object.

ENG_OBJTYPE_VEHICLE 

Moving object.

ENG_OBJTYPE_DESCENDANT 

Part of a moving object.

ENG_OBJTYPE_QUARTZ 

Fixed object type quartz.

ENG_OBJTYPE_METAL 

Fixed object type metal.

Render state of graphics engine.

States are used for settings certain modes, for instance texturing and blending. The enum is a bitmask and some of the states can be OR'd together.

Enumerator
ENG_RSTATE_NORMAL 

Normal opaque materials.

ENG_RSTATE_TTEXTURE_BLACK 

The transparent texture (black = no)

ENG_RSTATE_TTEXTURE_WHITE 

The transparent texture (white = no)

ENG_RSTATE_TDIFFUSE 

The transparent diffuse color.

ENG_RSTATE_WRAP 

Texture wrap.

ENG_RSTATE_CLAMP 

Texture borders with solid color.

ENG_RSTATE_LIGHT 

Light texture (ambient max)

ENG_RSTATE_DUAL_BLACK 

Double black texturing.

ENG_RSTATE_DUAL_WHITE 

Double white texturing.

ENG_RSTATE_PART1 

Part 1 (no change in. MOD!)

ENG_RSTATE_PART2 

Part 2.

ENG_RSTATE_PART3 

Part 3.

ENG_RSTATE_PART4 

Part 4.

ENG_RSTATE_2FACE 

Double-sided face.

ENG_RSTATE_ALPHA 

Image using alpha channel.

ENG_RSTATE_SECOND 

Always use 2nd floor texturing.

ENG_RSTATE_FOG 

Causes the fog.

ENG_RSTATE_TCOLOR_BLACK 

The transparent color (black = no)

ENG_RSTATE_TCOLOR_WHITE 

The transparent color (white = no)

ENG_RSTATE_TEXT 

Mode for rendering text.

ENG_RSTATE_OPAQUE_TEXTURE 

Only opaque texture, no blending, etc.

ENG_RSTATE_OPAQUE_COLOR 

Only opaque color, no texture, blending, etc.

Enumerator
ENG_SHADOW_NORM 

Normal shadow.

ENG_SHADOW_WORM 

TODO: ?

Type of triangles drawn for engine objects.

Enumerator
ENG_TRIANGLE_TYPE_TRIANGLES 

Triangles.

ENG_TRIANGLE_TYPE_SURFACE 

Surfaces.

Polygon fill mode.

Enumerator
FILL_POINT 

Draw only points.

FILL_LINES 

Draw only lines.

FILL_POLY 

Draw full polygons.

Type of color highlight for text.

Bitmask in 3 bits left shifted 6 (mask 0x1c0)

Masks in FontMetaChar for different attributes.

Enumerator
FONT_MASK_FONT 

Mask for FontType.

FONT_MASK_TITLE 

Mask for FontTitle.

FONT_MASK_HIGHLIGHT 

Mask for FontHighlight.

FONT_MASK_IMAGE 

Mask for image bit (TODO: not used?)

Size of font title.

Used internally by CEdit

Bitmask in 2 bits left shifted 4 (mask 0x030)

Type of font.

Bitmask in lower 4 bits (mask 0x00f)

Enumerator
FONT_BOLD 

Flag for bold font subtype.

FONT_ITALIC 

Flag for italic font subtype.

FONT_COLOBOT 

Default colobot font used for interface.

FONT_COLOBOT_BOLD 

Alias for bold colobot font.

FONT_COLOBOT_ITALIC 

Alias for italic colobot font.

FONT_COURIER 

Courier (monospace) font used mainly in code editor (only regular & bold)

FONT_COURIER_BOLD 

Alias for bold courier font.

FONT_BUTTON 

Pseudo-font loaded from textures for buttons, icons, etc.

Planes of frustum space.

Bitset of flags - can be OR'd together.

Priority in light assignment.

Enumerator
LIGHT_PRI_HIGHEST 

always highest weight (always picked)

LIGHT_PRI_HIGH 

high weight

LIGHT_PRI_LOW 

low weight

Level-of-detail.

A quantified replacement for older values of min/max.

Enumerator
LOD_Constant 

triangle is always visible, no matter at what distance

LOD_Low 

triangle is visible at farthest distance (lowest quality)

LOD_Medium 

triangle is visible at medium distance (medium quality)

LOD_High 

triangle is visible at closest distance (highest quality)

Enumerator
PARTIEXPLOO 

< technology explosion

PARTIMOTOR 

< organic explosion

PARTIGLINT 

< the engine exhaust gas

PARTIBLITZ 

< reflection

PARTICRASH 

< lightning recharging battery

PARTIGAS 

< dust after fall

PARTIFIRE 

< gas from the reactor

PARTIFIREZ 

< fireball shrinks

PARTIBLUE 

< fireball grows

PARTISELY 

< blue ball

PARTISELR 

< yellow selection

PARTIGUN1 

< red selection

PARTIGUN2 

< a bullet (fireball)

PARTIGUN3 

< bullet 2 (ant)

PARTIGUN4 

< bullet 3 (spider)

PARTIFRAG 

< bullet 4 (orgaball)

PARTIQUEUE 

< triangular fragment

PARTIORGANIC1 

< inflamed tail

PARTIORGANIC2 

< organic ball mother

PARTISMOKE1 

< organic ball daughter

PARTISMOKE2 

< black smoke

PARTISMOKE3 

< black smoke

PARTISMOKE4 

< black smoke

PARTIBLOOD 

< black smoke

PARTIBLOODM 

< human blood

PARTIVAPOR 

< blood laying

PARTIVIRUS1 

< steam

PARTIVIRUS2 

< virus 1

PARTIVIRUS3 

< virus 2

PARTIVIRUS4 

< virus 3

PARTIVIRUS5 

< virus 4

PARTIVIRUS6 

< virus 5

PARTIVIRUS7 

< virus 6

PARTIVIRUS8 

< virus 7

PARTIVIRUS9 

< virus 8

PARTIVIRUS10 

< virus 9

PARTIRAY1 

< virus 10

PARTIRAY2 

< ray 1 (turn)

PARTIRAY3 

< ray 2 (electric arc)

PARTIRAY4 

< ray 3

PARTIFLAME 

< ray 4

PARTIBUBBLE 

< flame

PARTIFLIC 

< bubble

PARTIEJECT 

< circles in the water

PARTISCRAPS 

< ejection from the reactor

PARTITOTO 

< waste from the reactor

PARTIERROR 

< reactor of tot

PARTIWARNING 

< toto says no

PARTIINFO 

< foo says blah

PARTIQUARTZ 

< toto says yes

PARTISPHERE0 

< reflection crystal

PARTISPHERE1 

< explosion sphere

PARTISPHERE2 

< energy sphere

PARTISPHERE3 

< analysis sphere

PARTISPHERE4 

< shield sphere

PARTISPHERE5 

< information sphere (emit)

PARTISPHERE6 

< botanical sphere (gravity root)

PARTISPHERE7 

< information sphere (receive)

PARTISPHERE8 

< sphere

PARTISPHERE9 

< sphere

PARTIGUNDEL 

< sphere

PARTIPART 

< bullet destroyed by shield

PARTITRACK1 

< object part

PARTITRACK2 

< drag 1

PARTITRACK3 

< drag 2

PARTITRACK4 

< drag 3

PARTITRACK5 

< drag 4

PARTITRACK6 

< drag 5

PARTITRACK7 

< drag 6

PARTITRACK8 

< drag 7

PARTITRACK9 

< drag 8

PARTITRACK10 

< drag 9

PARTITRACK11 

< drag 10

PARTITRACK12 

< drag 11

PARTITRACK13 

< drag 12

PARTITRACK14 

< drag 13

PARTITRACK15 

< drag 14

PARTITRACK16 

< drag 15

PARTITRACK17 

< drag 16

PARTITRACK18 

< drag 17

PARTITRACK19 

< drag 18

PARTITRACK20 

< drag 19

PARTIGLINTb 

< drag 20

PARTIGLINTr 

< blue reflection

PARTILENS1 

< red reflection

PARTILENS2 

< brilliance 1 (orange)

PARTILENS3 

< brilliance 2 (yellow)

PARTILENS4 

< brilliance 3 (red)

PARTICONTROL 

< brilliance 4 (violet)

PARTISHOW 

< reflection on button

PARTICHOC 

< shows a place

PARTIGFLAT 

< shock wave

PARTIRECOVER 

< shows if the ground is flat

PARTIROOT 

< blue ball recycler

PARTIPLOUF0 

< gravity root smoke

PARTIPLOUF1 

< splash

PARTIPLOUF2 

< splash

PARTIPLOUF3 

< splash

PARTIPLOUF4 

< splash

PARTIDROP 

< splash

PARTIFOG0 

< drop

PARTIFOG1 

< fog 0

PARTIFOG2 

< fog 1

PARTIFOG3 

< fog 2

PARTIFOG4 

< fog 3

PARTIFOG5 

< fog 4

PARTIFOG6 

< fog 5

PARTIFOG7 

< fog 6

PARTIFOG8 

< fog 7

PARTIFOG9 

< fog 8

PARTILIMIT1 

< fog 9

PARTILIMIT2 

< shows the limits 1

PARTILIMIT3 

< shows the limits 2

PARTILIMIT4 

< shows the limits 3

PARTIWATER 

< shows the limits 4

PARTIEXPLOG1 

< drop of water

PARTIEXPLOG2 

< ball explosion 1

PARTIBASE 

< ball explosion 2

PARTITRACE0 

< gases of spaceship

PARTITRACE1 

< trace

PARTITRACE2 

< trace

PARTITRACE3 

< trace

PARTITRACE4 

< trace

PARTITRACE5 

< trace

PARTITRACE6 

< trace

PARTITRACE7 

< trace

PARTITRACE8 

< trace

PARTITRACE9 

< trace

PARTITRACE10 

< trace

PARTITRACE11 

< trace

PARTITRACE12 

< trace

PARTITRACE13 

< trace

PARTITRACE14 

< trace

PARTITRACE15 

< trace

PARTITRACE16 

< trace

PARTITRACE17 

< trace

PARTITRACE18 

< trace

PARTITRACE19 

< trace

Type of pyro effect.

Enumerator
PT_FRAGO 

< fragmentation of technical object

PT_FRAGW 

< fragmentation of organic object

PT_EXPLOT 

< fragmentation of object under water

PT_EXPLOO 

< explosion of technical object

PT_EXPLOW 

< explosion of organic object

PT_SHOTT 

< explosion of object under water

PT_SHOTH 

< hit technical object

PT_SHOTM 

< hit human

PT_SHOTW 

< hit queen

PT_EGG 

< hit under water

PT_BURNT 

< break the egg

PT_BURNO 

< burning of technical object

PT_SPIDER 

< burning of organic object

PT_FALL 

< spider explosion

PT_WPCHECK 

< cargo falling

PT_FLCREATE 

< indicator reaches

PT_FLDELETE 

< flag create

PT_RESET 

< flag destroy

PT_WIN 

< reset position of the object

PT_LOST 

< fireworks

PT_DEADG 

< black smoke

PT_DEADW 

< shooting death

PT_FINDING 

< drowning death

Special codes for certain characters.

Enumerator
CHAR_NEWLINE 

Tab character - :

CHAR_DOT 

Newline character - arrow pointing down and left.

CHAR_SQUARE 

Single dot in the middle.

CHAR_SKIP_RIGHT 

Square.

CHAR_SKIP_LEFT 

Filled triangle pointing right.

Underground resource type.

Enumerator
TR_NULL 

No resource.

TR_STONE 

Titanium.

TR_URANIUM 

Uranium.

TR_POWER 

Energy.

TR_KEY_A 

Vault keys.

Format of image data.

Enumerator
TEX_IMG_AUTO 

Try to determine automatically (may not work)

TEX_IMG_RGB 

RGB triplet, 3 bytes.

TEX_IMG_BGR 

BGR triplet, 3 bytes.

TEX_IMG_RGBA 

RGBA triplet, 4 bytes.

TEX_IMG_BGRA 

BGRA triplet, 4 bytes.

Texture minification filter.

Corresponds to OpenGL modes but should translate to DirectX too.

Multitexture mixing argument.

Enumerator
TEX_MIX_ARG_TEXTURE 

Color from current texture.

TEX_MIX_ARG_COMPUTED_COLOR 

Color computed by previous texture unit (current in DirectX; previous in OpenGL)

TEX_MIX_ARG_SRC_COLOR 

(Source) color of textured fragment (diffuse in DirectX; primary color in OpenGL)

TEX_MIX_ARG_FACTOR 

Constant color (texture factor in DirectX; texture env color in OpenGL)

Multitexture mixing operation.

Enumerator
TEX_MIX_OPER_DEFAULT 

Default operation on default params (modulate on computed & texture)

TEX_MIX_OPER_REPLACE 

= Arg1

TEX_MIX_OPER_MODULATE 

= Arg1 * Arg2

TEX_MIX_OPER_ADD 

= Arg1 + Arg2

TEX_MIX_OPER_SUBTRACT 

= Arg1 - Arg2

Type of transformation in rendering pipeline.

These correspond to DirectX's three transformation matrices.

VBO autodetect/override.

Enumerator
VBO_MODE_DISABLE 

< override: enable

VBO_MODE_AUTO 

< override: disable

< autodetect

Mode of water display.

Enumerator
WATER_NULL 

No water.

WATER_TT 

Transparent texture.

WATER_TO 

Opaque texture.

WATER_CT 

Transparent color.

WATER_CO 

Opaque color.