Support Forum       G3D Web Page     
Classes | Namespaces | Macros | Enumerations | Functions
BinaryFormat.h File Reference

G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License. More...

Classes

class  G3D::_internal::_BinaryFormat< T >
 
class  G3D::_internal::_BinaryFormat< bool >
 
class  G3D::_internal::_BinaryFormat< Color3 >
 
class  G3D::_internal::_BinaryFormat< Color3unorm8 >
 
class  G3D::_internal::_BinaryFormat< Color4 >
 
class  G3D::_internal::_BinaryFormat< Color4unorm8 >
 
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 >
 
class  G3D::_internal::_BinaryFormat< Vector4uint16 >
 

Namespaces

 G3D
 
 G3D::_internal
 

Macros

#define binaryFormatOf(T)   (G3D::_internal::_BinaryFormat<T>::x())
 A macro that maps G3D types to format constants. More...
 
#define DECLARE_BINARYFORMATOF(CType, EnumType)
 
Macro to declare the underlying format (as will be returned by glFormatOf) of a type. More...
 

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::VECTOR4UINT16_BINFMT,
  G3D::COLOR3_BINFMT,
  G3D::COLOR3UNORM8_BINFMT,
  G3D::COLOR3INT16_BINFMT,
  G3D::COLOR4_BINFMT,
  G3D::COLOR4UNORM8_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
}
 
Some values like float16 and int128 have no current CPU data structure that implements them but are useful for file formats and for GPUs. More...
 

Functions

int32 G3D::byteSize (BinaryFormat f)
 Returns -1 if the format is custom, otherwise the byte size of a single element in this format. More...
 

Detailed Description

G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License.

Macro Definition Documentation

◆ binaryFormatOf

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

A macro that maps G3D types to format constants.

(e.g. binaryFormatOf(Vector3) == VECTOR3_BINFMT).

◆ DECLARE_BINARYFORMATOF

#define DECLARE_BINARYFORMATOF (   CType,
  EnumType 
)
Value:
namespace G3D { \
namespace _internal { \
template<> class _BinaryFormat<CType> { \
public: \
static BinaryFormat x() { \
return EnumType; \
} \
}; \
} \
}
Definition: AABox.h:20
BinaryFormat
Some values like float16 and int128 have no current CPU data structure that implements them but are ...
Definition: BinaryFormat.h:38


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.


documentation generated on Wed Nov 24 2021 08:01:50 using doxygen 1.8.15