TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BinaryFormat.h File Reference
#include "G3D/platform.h"
#include "G3D/g3dmath.h"
+ Include dependency graph for BinaryFormat.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  G3D::_internal::_BinaryFormat< T >
 

Namespaces

 G3D
 
 G3D::_internal
 

Macros

#define binaryFormatOf(T)   (G3D::_internal::_BinaryFormat<T>::x())
 
#define DECLARE_BINARYFORMATOF(CType, EnumType)
 

Enumerations

enum  G3D::BinaryFormat {
  G3D::FIRST_BINFMT = 1000, G3D::BOOL8_BINFMT, G3D::UINT8_BINFMT, G3D::INT8_BINFMT,
  G3D::UINT16_BINFMT, G3D::INT16_BINFMT, G3D::UINT32_BINFMT, G3D::INT32_BINFMT,
  G3D::UINT64_BINFMT, G3D::INT64_BINFMT, G3D::UINT128_BINFMT, G3D::INT128_BINFMT,
  G3D::FLOAT16_BINFMT, G3D::FLOAT32_BINFMT, G3D::FLOAT64_BINFMT, G3D::VECTOR2_BINFMT,
  G3D::VECTOR2INT16_BINFMT, G3D::VECTOR3_BINFMT, G3D::VECTOR3INT16_BINFMT, G3D::VECTOR4_BINFMT,
  G3D::VECTOR4INT16_BINFMT, G3D::COLOR3_BINFMT, G3D::COLOR3UINT8_BINFMT, G3D::COLOR3INT16_BINFMT,
  G3D::COLOR4_BINFMT, G3D::COLOR4UINT8_BINFMT, G3D::COLOR4INT16_BINFMT, G3D::STRING_BINFMT,
  G3D::STRINGEVEN_BINFMT, G3D::STRING8_BINFMT, G3D::STRING16_BINFMT, G3D::STRING32_BINFMT,
  G3D::CHUNK_BINFMT, G3D::CUSTOM_BINFMT, G3D::LAST_BINFMT
}
 

Functions

int32 G3D::byteSize (BinaryFormat f)
 

Detailed Description

Morgan McGuire, http://graphics.cs.williams.edu

Author
2005-06-03 2005-06-03

Copyright 2000-2005, Morgan McGuire. All rights reserved.

Macro Definition Documentation

#define binaryFormatOf (   T)    (G3D::_internal::_BinaryFormat<T>::x())

A macro that maps G3D types to format constants. (e.g. binaryFormatOf(Vector3) == VECTOR3_BINFMT).

#define DECLARE_BINARYFORMATOF (   CType,
  EnumType 
)
Value:
namespace G3D { \
namespace _internal { \
template<> class _BinaryFormat<CType> { \
public: \
static BinaryFormat x() { \
return EnumType; \
} \
}; \
} \
}
BinaryFormat
Definition: BinaryFormat.h:39
Definition: AABox.h:25
G3D::int16 x
Definition: Vector2int16.h:37

Macro to declare the underlying format (as will be returned by glFormatOf) of a type. For example,

   DECLARE_BINARYFORMATOF(Vector4, VECTOR4_BINFMT)
 

Use this so you can make vertex arrays of your own classes and not just the standard ones.