Torque3D Documentation / _generateds / gfxStringEnumTranslate.h

gfxStringEnumTranslate.h

Engine/source/gfx/gfxStringEnumTranslate.h

More...

Namespaces:

Public Defines

define
GFXREVERSE_LOOKUP(tablearray, enumprefix, val)    (   = enumprefix##_FIRST;  < enumprefix##_COUNT; ++ ) \
      ( ()tablearray##[] == val ) \
      { \
         val = ; \
         break; \
      } \

Public Typedefs

const char *(*
StringValueLookupFn )(const U32 &value)

Public Variables

const char *
GFXStringBlend [GFXBlend_COUNT]
const char *
GFXStringBlendOp [GFXBlendOp_COUNT]
const char *
GFXStringCmpFunc [GFXCmp_COUNT]
const char *
GFXStringCullMode [GFXCull_COUNT]
const char *
GFXStringFillMode [GFXFill_COUNT]
const char *
GFXStringPrimType [GFXPT_COUNT]
const char *
GFXStringStencilOp [GFXStencilOp_COUNT]
const char *
GFXStringTextureAddress [GFXAddress_COUNT]
const char *
GFXStringTextureFilter [GFXTextureFilter_COUNT]
const char *
GFXStringTextureFormat [GFXFormat_COUNT]

Detailed Description

Public Defines

GFXREVERSE_LOOKUP(tablearray, enumprefix, val)    (   = enumprefix##_FIRST;  < enumprefix##_COUNT; ++ ) \
      ( ()tablearray##[] == val ) \
      { \
         val = ; \
         break; \
      } \

Public Typedefs

typedef const char *(* StringValueLookupFn )(const U32 &value)

Public Variables

const char * GFXStringBlend [GFXBlend_COUNT]
const char * GFXStringBlendOp [GFXBlendOp_COUNT]
const char * GFXStringCmpFunc [GFXCmp_COUNT]
const char * GFXStringCullMode [GFXCull_COUNT]
const char * GFXStringFillMode [GFXFill_COUNT]
const char * GFXStringPrimType [GFXPT_COUNT]
const char * GFXStringStencilOp [GFXStencilOp_COUNT]
const char * GFXStringTextureAddress [GFXAddress_COUNT]
const char * GFXStringTextureFilter [GFXTextureFilter_COUNT]
const char * GFXStringTextureFormat [GFXFormat_COUNT]
EnumTable gTextureArgumentEnumTable_M 
 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23#ifndef _GFXSTRINGENUMTRANSLATE_H_
24#define _GFXSTRINGENUMTRANSLATE_H_
25
26#ifndef _PLATFORM_H_
27   #include "platform/platform.h"
28#endif
29#ifndef _GFXENUMS_H_
30   #include "gfx/gfxEnums.h"
31#endif
32#ifndef _CONSOLE_H_
33   #include "console/console.h"
34#endif
35#ifndef _DYNAMIC_CONSOLETYPES_H_
36   #include "console/dynamicTypes.h"
37#endif
38#ifndef _GFXAPI_H_
39   #include "gfx/gfxAPI.h"
40#endif
41
42
43//------------------------------------------------------------------------------
44
45namespace GFXStringEnumTranslate
46{
47   void init();
48};
49
50//------------------------------------------------------------------------------
51
52extern const char *GFXStringTextureFormat[GFXFormat_COUNT];
53extern const char *GFXStringTextureFilter[GFXTextureFilter_COUNT];
54extern const char *GFXStringBlend[GFXBlend_COUNT];
55extern const char *GFXStringBlendOp[GFXBlendOp_COUNT];
56extern const char *GFXStringStencilOp[GFXStencilOp_COUNT];
57extern const char *GFXStringCmpFunc[GFXCmp_COUNT];
58extern const char *GFXStringCullMode[GFXCull_COUNT];
59extern const char *GFXStringPrimType[GFXPT_COUNT];
60extern const char *GFXStringTextureAddress[GFXAddress_COUNT];
61extern const char *GFXStringFillMode[GFXFill_COUNT];
62
63typedef const char *(*StringValueLookupFn)( const U32 &value );
64
65#define GFXREVERSE_LOOKUP( tablearray, enumprefix, val ) \
66   for( S32 i = enumprefix##_FIRST; i < enumprefix##_COUNT; i++ ) \
67      if( (S32)tablearray##[i] == val ) \
68      { \
69         val = i; \
70         break; \
71      } \
72
73
74// TODOS!
75extern EnumTable gTextureArgumentEnumTable_M;
76//extern EnumTable srcBlendFactorTable;
77//extern EnumTable dstBlendFactorTable;
78//extern EnumTable::Enums srcBlendFactorLookup[9];
79//extern EnumTable::Enums dstBlendFactorLookup[9];
80
81#endif
82