XFcGLEnums.h File Reference

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcGLEnums.h File Reference

XFcGL enumerations. More...

This graph shows which files directly or indirectly include this file:

## Enumerations

enum

XFCGLERRORS {
XFCGLERR_OK = 0,
XFCGLERR_FAILED = -1,
XFCGLERR_UNSUPPORTED = -2,
XFCGLERR_BADPARAMS = -3,
XFCGLERR_OUTOFMEMORY = -4,
XFCGLERR_INVALIDBUFFER = -5,
XFCGLERR_INTERNALERROR = -6,
XFCGLERR_NOTREADY = -7
}

| XFcGL error codes. More...
enum | XFCGLLIGHTTYPES { XFCGLL_POINTLIGHT = 1, XFCGLL_DIRECTIONAL, XFCGLL_SPOT }
| XFcGL light types. More...

enum

XFCGLVERTEXFLAGS {
XFCGLVF_XYZ = 1,
XFCGLVF_RHW = 2,
XFCGLVF_NORMAL = 4,
XFCGLVF_DIFFUSECOLOR = 8,
XFCGLVF_SPECULARCOLOR = 16,
XFCGLVF_TEXTURE1 = 32,
XFCGLVF_TEXTURE2 = 64,
XFCGLVF_TEXTURE3 = 128,
XFCGLVF_TEXTURE4 = 256,
XFCGLVF_CLIPINFO = 512,
XFCGLVF_TRANSFORMINFO = 1024,
XFCGLVF_LOCKED = 65536
}

| XFcGL vertex buffer vertex type flags. More...
enum | XFCGLVBLOCKFLAGS { XFCGLVBLOCK_READ = 1, XFCGLVBLOCK_MODIFY = 2 }
| XFcGL vertex buffer locking modes. More...

enum

XFCGLVERTEXTRANSFORMFLAGS {
XFCGLVTF_TRANSFORMED = 1,
XFCGLVTF_PROJECTED = 2,
XFCGLVTF_CLIPNEAR = 4,
XFCGLVTF_CLIPFAR = 8,
XFCGLVTF_CLIPTOP = 16,
XFCGLVTF_CLIPBOTTOM = 32,
XFCGLVTF_CLIPLEFT = 64,
XFCGLVTF_CLIPRIGHT = 128
}

| XFcGL internal: vertex clipping and transformation state flags. More...

enum

XFCGLPRIMITIVETYPES {
XFCGLPT_TRIANGLELIST = 1,
XFCGLPT_TRIANGLESTRIP,
XFCGLPT_TRIANGLEFAN,
XFCGLPT_CUSTOM
}

| XFcGL primitive types. More...
enum | XFCGLMATRIXID { XFCGLMAT_WORLD = 1, XFCGLMAT_VIEW = 2, XFCGLMAT_PROJECTION = 3 }
| XFcGL matrix id's. More...

enum

XFCGLRENDERSTATES {
XFCGLRS_CLIPPING,
XFCGLRS_LIGHTING,
XFCGLRS_SHADING,
XFCGLRS_CULLING,
XFCGLRS_ALPHABLEND,
XFCGLRS_SRCBLEND,
XFCGLRS_TGTBLEND,
XFCGLRS_SORTING,
XFCGLRS_PERSPECTIVECORRECTION,
XFCGLRS_ORTHOGONALPROJECTION,
XFCGLRS_WIREFRAME,
XFCGLRS_AMBIENTLIGHT,
XFCGLRS_POLYGONOFFSET,
XFCGLRS_DEPTHTEST,
XFCGLRS_DEPTHFUNC,
XFCGLRS_DEPTHWRITE,
XFCGLRS_PERSPECTIVEDISABLEDISTANCE
}

| XFcGL render states - used in setrenderstate. More...

enum

XFCGLDEPTHFUNCMODES {
XFCGLDF_LESSEQUAL,
XFCGLDF_LESS,
XFCGLDF_NEVER,
XFCGLDF_NOTEQUAL,
XFCGLDF_EQUAL,
XFCGLDF_GREATEREQUAL,
XFCGLDF_GREATER,
XFCGLDF_ALWAYS
}

| XFcGL depth buffer depth function modes. More...
enum | XFCGLSORTINGMODES { XFCGLSORT_NONE = 1, XFCGLSORT_DESCENDING = 8, XFCGLSORT_ASCENDING = 16 }
| XFcGL sorting modes. More...

enum

XFCGLSHADINGMODES {
XFCGLSHADE_MATTE = 1,
XFCGLSHADE_FLAT = 2,
XFCGLSHADE_GOURAUD = 4,
XFCGLSHADE_GREYSCALE_GOURAUD = 8
}

| XFcGL shading modes. More...
enum | XFCGLCULLINGMODES { XFCGLCULL_CW = 4, XFCGLCULL_CCW = 8, XFCGLCULL_NONE = 16 }
| XFcGL culling modes. You can pick cw/ccw, or use NONE. More...

enum

XFCGLBLENDMODES {
XFCBLEND_ZERO = 1,
XFCBLEND_ONE,
XFCBLEND_SRCCOLOR,
XFCBLEND_INVSRCCOLOR,
XFCBLEND_SRCALPHA,
XFCBLEND_INVSRCALPHA,
XFCBLEND_DESTALPHA,
XFCBLEND_INVDESTALPHA,
XFCBLEND_DESTCOLOR,
XFCBLEND_INVDESTCOLOR
}

| XFcGL blending modes. More...

enum

XFCGLLEGALBLENDMODES {
XFCGLBLEND_NONE,
XFCGLBLEND_ALPHA,
XFCGLBLEND_MUL,
XFCGLBLEND_ADD,
XFCGLBLEND_INVMUL,
XFCGLBLEND_ILLEGAL
}

| XFcGL internally legal blend modes. More...

enum

XFCGLCREATEENUMS {
XFCGLC_DEFAULT = 0,
XFCGLC_REFERENCE = 1,
XFCGLC_PORTRAIT = 0x01000000,
XFCGLC_LANDSCAPE = 0x02000000,
XFCGLC_ROTATE_0 = 0x04000000,
XFCGLC_ROTATE_180 = 0x08000000,
XFCGLC_NO_CONTROL_ROTATE = 0x10000000,
XFCGLC_NO_POINTER_ROTATE = 0x20000000
}

| XFcGL flags for creation and recreation. More...
enum | XFCGLSURFACEFLAGS { XFCGLSF_FRAMEBUFFER = 1, XFCGLSF_VIDMEM = 2, XFCGLSF_CANTLOCK = 4 }
| XFcGL surface flags. More...

## Detailed Description

XFcGL enumerations.

X-Forge Core
Copyright 2000-2003 Fathammer Ltd

Id
  XFcGLEnums.h,v 1.23 2003/08/14 09:12:56 jouni Exp

Date
  2003/08/14 09:12:56

Revision
  1.23

## Enumeration Type Documentation

enum XFCGLBLENDMODES

XFcGL blending modes.

Each blend must be set for source and destination blends. For instance:

  src=XFCBLEND_ONE and dst=XFCBLEND_ONE cause this to happen:

       A = sA * 1 + dA * 1
       R = sR * 1 + dR * 1
       G = sG * 1 + dG * 1
       B = sB * 1 + dB * 1

  (i.e. additive blend)

  For more interesting effects such as cross fading alpha you might use:

  src=XFCBLEND_SRCALPHA and dst=XFCBLEND_INVSRCALPHA

       A = sA * sA + dA * (1-sA)
       R = sR * sA + dR * (1-sA)
       G = sG * sA + dG * (1-sA)
       B = sB * sA + dB * (1-sA)

See also:
  XFCGLLEGALBLENDMODES

Enumeration values:

  XFCBLEND_ZERO | Blend as zero (0 0 0 0).
  XFCBLEND_ONE | Blend as one (1 1 1 1).
  XFCBLEND_SRCCOLOR | Blend as source color (sA sR sG sB).
  XFCBLEND_INVSRCCOLOR | Blend as inverse source color (1-sA 1-sR 1-sG 1-sB).
  XFCBLEND_SRCALPHA | Blend as source alpha (sA sA sA sA).
  XFCBLEND_INVSRCALPHA | Blend as inverse source alpha (1-sA 1-sA 1-sA 1-sA).
  XFCBLEND_DESTALPHA | Blend as destination alpha (dA dA dA dA).
  XFCBLEND_INVDESTALPHA | Blend as inverse destination alpha (1-dA 1-dA 1-dA 1-dA).
  XFCBLEND_DESTCOLOR | Blend as destination color (dA dR dG dB).
  XFCBLEND_INVDESTCOLOR | Blend as inverse destination color (1-dA 1-dR 1-dG 1-dB).

enum XFCGLCREATEENUMS

XFcGL flags for creation and recreation.

Enumeration values:

  XFCGLC_DEFAULT | Create preferred device (best speed-wise).
  XFCGLC_REFERENCE | Create reference device (software rendering).
  XFCGLC_PORTRAIT | Create device in portrait mode.
  XFCGLC_LANDSCAPE | Create device in landscape mode.
  XFCGLC_ROTATE_0 | Create device in 0 degree rotated mode.
  XFCGLC_ROTATE_180 | Create device in 180 degree rotated mode.
  XFCGLC_NO_CONTROL_ROTATE | Don't rotate control events.
  XFCGLC_NO_POINTER_ROTATE | Don't rotate pointer events.

enum XFCGLCULLINGMODES

XFcGL culling modes. You can pick cw/ccw, or use NONE.

Enumeration values:

  XFCGLCULL_CW | Cull clockwise triangles. Default.
  XFCGLCULL_CCW | Cull counterclockwise triangles.
  XFCGLCULL_NONE | Do not perform culling.

enum XFCGLDEPTHFUNCMODES

XFcGL depth buffer depth function modes.

Enumeration values:

  XFCGLDF_LESSEQUAL |
  XFCGLDF_LESS |
  XFCGLDF_NEVER |
  XFCGLDF_NOTEQUAL |
  XFCGLDF_EQUAL |
  XFCGLDF_GREATEREQUAL |
  XFCGLDF_GREATER |
  XFCGLDF_ALWAYS |

enum XFCGLERRORS

XFcGL error codes.

Enumeration values:

  XFCGLERR_OK | No error.
  XFCGLERR_FAILED | General failure.
  XFCGLERR_UNSUPPORTED | Unsupported function.
  XFCGLERR_BADPARAMS | Bad parameters or bad combination of them.
  XFCGLERR_OUTOFMEMORY | Out of memory error.
  XFCGLERR_INVALIDBUFFER | Invalid buffer.
  XFCGLERR_INTERNALERROR | Internal error.
  XFCGLERR_NOTREADY | Hardware was not ready.

enum XFCGLLEGALBLENDMODES

XFcGL internally legal blend modes.

Enumeration values:

  XFCGLBLEND_NONE | src = ONE, tgt = ZERO
  XFCGLBLEND_ALPHA | src = SRCALPHA, tgt = INVSRCALPHA
  XFCGLBLEND_MUL | src = ZERO, tgt = SRCCOLOR (NOT IMPLEMENTED)
  XFCGLBLEND_ADD | src = ONE, tgt = ONE
  XFCGLBLEND_INVMUL | src = ZERO, tgt = INVSRCCOLOR
  XFCGLBLEND_ILLEGAL | Illegal blend mode specified.

enum XFCGLLIGHTTYPES

XFcGL light types.

Enumeration values:

  XFCGLL_POINTLIGHT | Point-, or omni light.
  XFCGLL_DIRECTIONAL | Directional light.
  XFCGLL_SPOT | Spotlight. Not supported currently.

enum XFCGLMATRIXID

XFcGL matrix id's.

Enumeration values:

  XFCGLMAT_WORLD | Object -> world space.
  XFCGLMAT_VIEW | World -> camera space.
  XFCGLMAT_PROJECTION | Camera -> projection space.

enum XFCGLPRIMITIVETYPES

XFcGL primitive types.

      Triangle list.
      Every 3 vertices make a new triangle:

      1.        4.
      |  .      |  .
      |    .    |    .
      2-----3   5-----6

      Triangle strip.
      Every vertex after the 2 initial ones create a new triangle:

      2.----4.    6
      |  .  |  .
      |    .|    .
      1-----3-----5

      Triangle fan.
      Same as above, except that first vertex is used in every triangle:

      3.----4----.5
      |  .  |  .
      |    .|.
      2-----1     6

Enumeration values:

  XFCGLPT_TRIANGLELIST | 3 vertices = 1 triangle.
  XFCGLPT_TRIANGLESTRIP | 3 vertices = first triangle, every following vertex = new triangle.
  XFCGLPT_TRIANGLEFAN | 3 vertices = first triangle, every following vertex = new triangle.
  XFCGLPT_CUSTOM | 1 vertex = 1 custom primitive.

enum XFCGLRENDERSTATES

XFcGL render states - used in setrenderstate.

See also:
  XFcGL

Enumeration values:

  XFCGLRS_CLIPPING | Perform clipping. Values 0 and 1. Defaults to 1.
  XFCGLRS_LIGHTING | Perform lighting. Values 0 and 1. Defaults to 0.

  XFCGLRS_SHADING

  Shading mode; see XFCGLSHADINGMODES. Defaults to XFCGLSHADE_FLAT.

  See also:
    XFCGLSHADINGMODES

  XFCGLRS_CULLING

  Culling mode; see XFCGLCULLINGMODES. Defaults to XFCGLCULL_CW.

  See also:
    XFCGLCULLINGMODES

  XFCGLRS_ALPHABLEND | Alpha blending. Values 0 and 1. Defaults to 0.

  XFCGLRS_SRCBLEND

  Source blend. Only certain combinations of src/tgtblend are valid. Defaults to XFCBLEND_ONE.

  See also:
    XFCGLBLENDMODES

    XFCGLLEGALBLENDMODES

  XFCGLRS_TGTBLEND

  Target blend. Only certain combinations of src/tgtblend are valid. Defaults to XFCBLEND_ZERO.

  See also:
    XFCGLBLENDMODES

    XFCGLLEGALBLENDMODES

  XFCGLRS_SORTING

  Sorting mode. See XFCGLSORTINGMODES. Defaults to XFCGLSORT_DESCENDING.

  See also:
    XFCGLSORTINGMODES

  XFCGLRS_PERSPECTIVECORRECTION | Perspective correction. Values 0 and 1. Defaults to 0.
  XFCGLRS_ORTHOGONALPROJECTION | Orthogonal projection. Values 0 and 1. Defaults to 0.
  XFCGLRS_WIREFRAME | Wireframe mode. Values 0 and 1. Mainly meant for debugging. Defaults to 0.
  XFCGLRS_AMBIENTLIGHT | Takes 0RGB dword color. Defaults to 0.
  XFCGLRS_POLYGONOFFSET | Polygon offset, a REAL. Only affects sorting. Defaults to 0. Typically used to fight sorting problems.
  XFCGLRS_DEPTHTEST | Depth testing. Only supported by devices that list it in their capabilities. Legal values 0 and 1. Defaults to 0. Default rasterizer has no depth buffering.
  XFCGLRS_DEPTHFUNC | Depth testing function. See XFCGLDEPTHFUNCMODES. Defaults to LESSEQUAL.
  XFCGLRS_DEPTHWRITE | Decides whether z-buffer should be written to or not. Defaults to 1. Legal values 0 and 1. If depth testing is on but depth writing is off, everything happens as usual, except that the z-buffer is not updated.
  XFCGLRS_PERSPECTIVEDISABLEDISTANCE |

enum XFCGLSHADINGMODES

XFcGL shading modes.

Enumeration values:

  XFCGLSHADE_MATTE | No shading. Meaningful for textured surfaces only; non-textured are flat.
  XFCGLSHADE_FLAT | Flat shading; color taken from the first vertex of the triangle.
  XFCGLSHADE_GOURAUD | Gouraud shading.
  XFCGLSHADE_GREYSCALE_GOURAUD | Greyscale gouraud shading.

enum XFCGLSORTINGMODES

XFcGL sorting modes.

Unlike hardware-based rendering architectures, we must support sorting, as our primary target in the near future is pure software rendering, using painter's algorithm.

Enumeration values:

  XFCGLSORT_NONE | No sorting; default.
  XFCGLSORT_DESCENDING | Sort in descending order.
  XFCGLSORT_ASCENDING | Sort in ascending (reverse) order.

enum XFCGLSURFACEFLAGS

XFcGL surface flags.

Enumeration values:

  XFCGLSF_FRAMEBUFFER | Internal: surface is a framebuffer surface.
  XFCGLSF_VIDMEM | Internal: surface is not in system memory.
  XFCGLSF_CANTLOCK | Internal: surface cannot be locked for direct access.

enum XFCGLVBLOCKFLAGS

XFcGL vertex buffer locking modes.

Enumeration values:

  XFCGLVBLOCK_READ | Lock an array for read only access.
  XFCGLVBLOCK_MODIFY | Lock an array for modification.

enum XFCGLVERTEXFLAGS

XFcGL vertex buffer vertex type flags.

Enumeration values:

  XFCGLVF_XYZ | Vertex x, y, z info; always available (3x REAL).

  XFCGLVF_RHW

  Contains rhw component (1x REAL).

  Note:
    also means that xyz values are in screen space.

  XFCGLVF_NORMAL | Contains nx, ny, nz normal info (3x REAL).
  XFCGLVF_DIFFUSECOLOR | Contains diffuse color component (1x UINT32).
  XFCGLVF_SPECULARCOLOR | Contains specular color component (ignored) (1x UINT32).
  XFCGLVF_TEXTURE1 | Contains texture UV coordinates (2x REAL).
  XFCGLVF_TEXTURE2 | Contains texture UV coordinates (2x REAL) (for multitexturing).
  XFCGLVF_TEXTURE3 | Contains texture UV coordinates (2x REAL) (for multitexturing).
  XFCGLVF_TEXTURE4 | Contains texture UV coordinates (2x REAL) (for multitexturing).
  XFCGLVF_CLIPINFO | Contains clipping information (.x UINT32; 6b needed, 26b padding).
  XFCGLVF_TRANSFORMINFO | Contains transform information.
  XFCGLVF_LOCKED | Internal.

enum XFCGLVERTEXTRANSFORMFLAGS

XFcGL internal: vertex clipping and transformation state flags.

Enumeration values:

  XFCGLVTF_TRANSFORMED | Transformation information.
  XFCGLVTF_PROJECTED | Projection information.
  XFCGLVTF_CLIPNEAR | Needs near clipping.
  XFCGLVTF_CLIPFAR | Needs far clipping.
  XFCGLVTF_CLIPTOP | Needs top clipping.
  XFCGLVTF_CLIPBOTTOM | Needs bottom clipping.
  XFCGLVTF_CLIPLEFT | Needs left clipping.
  XFCGLVTF_CLIPRIGHT | Needs right clipping.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch