server/dep/include/g3dlite/G3D/constants.h
Lynx3d ae3ad10bcf [10097] Update G3D up to v8.0b4
+ Got rid of zip lib requirement in G3D...
  Still can re-enable code by defining _HAVE_ZIP...

+ Remove silly X11 lib dependency from G3D
  Code doesn't seem to do anything yet anyway, and even if, we don't want it :p

+ Fix another weird G3D build problem...

+ Remove some __asm usage in g3d, which is not available on Win64
  My editor also decided to remove a ton of trailing white spaces...tss...

+ Reapply G3D fixes for 64bit VC

+ not use SSE specific header when SSE not enabled in *nix

+ Updated project files

+ New vmap_assembler VC90/VC80 Project

+ vmap assembler binaries updates

NOTE: Old vmap fikes expected work (as tests show) with new library version.
      But better use new generated versions. Its different in small parts to bad or good...

(based on Lynx3d's repo commit 44798d3)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-23 06:45:25 +04:00

129 lines
3.5 KiB
C++

/**
@file G3D/constants.h
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
@created 2009-05-20
@edited 2009-05-20
*/
#ifndef G3D_constants_h
#define G3D_constants_h
#include "G3D/platform.h"
#include "G3D/enumclass.h"
namespace G3D {
/** These are defined to have the same value as the equivalent OpenGL
constant. */
class PrimitiveType {
public:
enum Value {
POINTS = 0x0000,
LINES = 0x0001,
LINE_STRIP = 0x0003,
TRIANGLES = 0x0004,
TRIANGLE_STRIP = 0x0005,
TRIANGLE_FAN = 0x0006,
QUADS = 0x0007,
QUAD_STRIP = 0x0008
};
private:
Value value;
public:
G3D_DECLARE_ENUM_CLASS_METHODS(PrimitiveType);
};
/** Values for SuperSurface::GPUGeom::refractionHint. */
class RefractionQuality {
public:
enum Value {
/** No refraction; a translucent object will appear as if it had the same index of refraction
as the surrounding medium and objects will be undistorted in the background. */
NONE = 0,
/** Use a static environment map (cube or paraboloid) for computing transmissivity.*/
STATIC_ENV = 25,
/** Use a dynamically rendered 2D environment map; distort the background. This looks good for many scenes
but avoids the cost of rendering a cube map for DYNAMIC_ENV. */
DYNAMIC_FLAT = 50,
/** Use a dynamically rendered 2D environment map that is re-captured per transparent object. This works well
for transparent objects that are separated by a significant camera space z distance but overlap in screen space.*/
DYNAMIC_FLAT_MULTILAYER = 55,
/** Render a dynamic environment map */
DYNAMIC_ENV = 75,
/** Use the best method available, ideally true ray tracing. */
BEST = 100
};
private:
/** Used for to/from string conversion. Last is the emtpy string as a sentinel */
static const std::string str[7];
static const Value enm[6];
Value value;
public:
G3D_DECLARE_ENUM_CLASS_METHODS(RefractionQuality);
RefractionQuality(const class Any&);
RefractionQuality& operator=(const Any&);
operator Any() const;
const std::string& toString() const;
};
/** Values for SuperSurface::GPUGeom::mirrorHint. */
class MirrorQuality {
public:
enum Value {
/** Reflections are black */
NONE = 0,
/** Use a static environment map. This is what most games use */
STATIC_ENV = 25,
/** Planar reflection, typically for water or glass windows. This assumes that the mirror is flat;
it is distinct from RefractionQuality::DYNAMIC_FLAT, which assumes the <i>background</i> is flat.*/
DYNAMIC_PLANAR = 50,
/** Render a dynamic environment map. */
DYNAMIC_ENV = 75,
/** Use the best method available, ideally true ray tracing. */
BEST = 100
};
private:
/** Used for to/from string conversion. Last is the emtpy string as a sentinel */
static const std::string str[6];
static const Value enm[5];
Value value;
public:
G3D_DECLARE_ENUM_CLASS_METHODS(MirrorQuality);
MirrorQuality(const class Any&);
MirrorQuality& operator=(const Any&);
operator Any() const;
const std::string& toString() const;
};
} // namespace G3D
G3D_DECLARE_ENUM_CLASS_HASHCODE(G3D::PrimitiveType)
G3D_DECLARE_ENUM_CLASS_HASHCODE(G3D::RefractionQuality)
G3D_DECLARE_ENUM_CLASS_HASHCODE(G3D::MirrorQuality)
#endif