Contents User Forum Source Index APIs by Task APIs by Level Data


BinaryFormat.h File Reference

Maintainer:
Morgan McGuire, matrix@graphics3d.com
More...

#include "G3D/platform.h"
#include "G3D/g3dmath.h"

Namespaces

namespace  G3D
namespace  G3D::_internal

Classes

class  G3D::_internal::_BinaryFormat< T >
class  G3D::_internal::_BinaryFormat< bool >
class  G3D::_internal::_BinaryFormat< Color3 >
class  G3D::_internal::_BinaryFormat< Color3uint8 >
class  G3D::_internal::_BinaryFormat< Color4 >
class  G3D::_internal::_BinaryFormat< Color4uint8 >
class  G3D::_internal::_BinaryFormat< float32 >
class  G3D::_internal::_BinaryFormat< float64 >
class  G3D::_internal::_BinaryFormat< int16 >
class  G3D::_internal::_BinaryFormat< int32 >
class  G3D::_internal::_BinaryFormat< int64 >
class  G3D::_internal::_BinaryFormat< int8 >
class  G3D::_internal::_BinaryFormat< uint16 >
class  G3D::_internal::_BinaryFormat< uint32 >
class  G3D::_internal::_BinaryFormat< uint64 >
class  G3D::_internal::_BinaryFormat< uint8 >
class  G3D::_internal::_BinaryFormat< Vector2 >
class  G3D::_internal::_BinaryFormat< Vector2int16 >
class  G3D::_internal::_BinaryFormat< Vector3 >
class  G3D::_internal::_BinaryFormat< Vector3int16 >
class  G3D::_internal::_BinaryFormat< Vector4 >
class  G3D::_internal::_BinaryFormat< Vector4int16 >

Defines

#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

Maintainer:
Morgan McGuire, matrix@graphics3d.com

Author:
2005-06-03
Last modified:
2005-06-03
Copyright 2000-2005, Morgan McGuire. All rights reserved.

Define Documentation

#define binaryFormatOf (  )     (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;                     \
            }                                        \
        };                                           \
    }                                                \
}
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.


Generated on Thu Aug 2 11:40:42 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo