TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
platform.h File Reference
#include <memory>
+ Include dependency graph for platform.h:

Go to the source code of this file.

Classes

class  G3D::G3DSpecification
 

Namespaces

 G3D
 
 G3D::_internal
 

Macros

#define G3D_VER   90000
 
#define G3D_WINSOCK_MAJOR_VERSION   2
 
#define G3D_WINSOCK_MINOR_VERSION   0
 
#define __fastcall
 Fast call is a register-based optimized calling convention supported only by Visual C++. More...
 
#define G3D_32BIT
 
#define G3D_START_AT_MAIN()
 
#define STR(x)   #x
 
#define PRAGMA(x)   _Pragma(#x)
 
#define G3D_BEGIN_PACKED_CLASS(byteAlign)   class
 
#define G3D_END_PACKED_CLASS(byteAlign)   ;
 
#define NUMBER_TO_STRING(x)   NUMBER_TO_STRING2(x)
 
#define NUMBER_TO_STRING2(x)   #x
 
#define __LINE_AS_STRING__   NUMBER_TO_STRING(__LINE__)
 

Functions

G3DSpecification & G3D::_internal::g3dInitializationSpecification ()
 

Detailed Description

#defines for platform specific issues.

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

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

2003-06-09 2013-01-03

Macro Definition Documentation

#define __fastcall

Fast call is a register-based optimized calling convention supported only by Visual C++.

#define __LINE_AS_STRING__   NUMBER_TO_STRING(__LINE__)
#define G3D_32BIT

Define the g++ thread-local syntax on all platforms (since the MSVC version would be hard to emulate with a macro)

#define G3D_BEGIN_PACKED_CLASS (   byteAlign)    class

Switch to tight alignment.

1 G3D_BEGIN_PACKED_CLASS(1)
2 ThreeBytes {
3 public:
4  uint8 a, b, c;
5 }
6 G3D_END_PACKED_CLASS(1)

See G3D::Color3uint8 for an example.

#define G3D_END_PACKED_CLASS (   byteAlign)    ;

End switch to tight alignment

See G3D::Color3uint8 for an example.

#define G3D_START_AT_MAIN ( )

Defines necessary wrapper around WinMain on Windows to allow transfer of execution to main().

#define G3D_VER   90000

The version number of G3D in the form: MmmBB -> version M.mm [beta BB]

#define G3D_WINSOCK_MAJOR_VERSION   2

These control the version of Winsock used by G3D. Version 2.0 is standard for G3D 6.09 and later. Version 1.1 is standard for G3D 6.08 and earlier.

#define G3D_WINSOCK_MINOR_VERSION   0
#define NUMBER_TO_STRING (   x)    NUMBER_TO_STRING2(x)
#define NUMBER_TO_STRING2 (   x)    #x
#define PRAGMA (   x)    _Pragma(#x)

#pragma may not appear inside a macro, so this uses the pragma operator to create an equivalent statement.

#define STR (   x)    #x

Creates a string from the expression. Frequently used with G3D::Shader to express shading programs inline.

STR(this becomes a string)

<PRE>

evaluates the same as

<CODE>

"this becomes a string"