Back to index

nux  3.0.0
Classes | Namespaces | Defines | Typedefs | Enumerations | Functions
GLResource.h File Reference
#include "NuxCore/NuxCore.h"
#include "NuxCore/Error.h"
#include "NuxCore/FilePath.h"
#include "NuxCore/Color.h"
#include "NuxCore/Rect.h"
#include "NuxCore/Point.h"
#include "NuxCore/Size.h"
#include "BitmapFormats.h"
#include "NuxCore/Parsing.h"
#include "NuxCore/Object.h"
#include "NuxCore/ObjectPtr.h"
#include "NuxCore/Math/MathUtility.h"
#include "NuxCore/Math/Constants.h"
#include "NuxCore/Math/Vector3.h"
#include "NuxCore/Math/Vector4.h"
#include "NuxCore/Math/Matrix3.h"
#include "NuxCore/Math/Matrix4.h"
#include "NuxCore/Math/Spline.h"
#include "NuxCore/Math/MathFunctions.h"
#include "ImageSurface.h"
#include "RunTimeStats.h"
#include "NuxGraphicsResources.h"
#include "FontTexture.h"
#include "GlobalGraphicsInitializer.h"
#include "GLError.h"

Go to the source code of this file.

Classes

struct  nux::PixelFormatReadInfo
struct  nux::TEXTURE_DESC
struct  nux::_SURFACE_DESC
struct  nux::_VOLUME_DESC
struct  nux::_ANIMATEDTEXTURE_DESC
struct  nux::_VERTEXBUFFER_DESC
struct  nux::_INDEXBUFFER_DESC
struct  nux::_LOCKED_RECT
struct  nux::_SURFACE_RECT
struct  nux::_VOLUME_BOX
struct  nux::_VOLUME_LOCKED_BOX
struct  nux::VERTEXELEMENT

Namespaces

namespace  nux
 The Writer singleton is responsible for controlling where the logging message go.

Defines

#define NUX_ENABLE_CG_SHADERS   0
#define CG_FRAGMENT_PROFILE   CG_PROFILE_FP30
#define CG_VERTEX_PROFILE   CG_PROFILE_VP30
#define NUX_BUFFER_OFFSET(i)   ((BYTE *)NULL + (i))
#define OGL_OK   0
#define OGL_CALL(call)
#define ISSUE_END   (1 << 0)
#define ISSUE_BEGIN   (1 << 1)
#define DECL_END
#define MAXDECLLENGTH   64
#define MAX_NUM_STREAM   8

Typedefs

typedef struct nux::_SURFACE_DESC nux::SURFACE_DESC
typedef struct nux::_VOLUME_DESC nux::VOLUME_DESC
typedef struct
nux::_ANIMATEDTEXTURE_DESC 
nux::ANIMATEDTEXTURE_DESC
typedef struct
nux::_VERTEXBUFFER_DESC 
nux::VERTEXBUFFER_DESC
typedef struct
nux::_INDEXBUFFER_DESC 
nux::INDEXBUFFER_DESC
typedef struct nux::_LOCKED_RECT nux::SURFACE_LOCKED_RECT
typedef struct nux::_SURFACE_RECT nux::SURFACE_RECT
typedef struct nux::_VOLUME_BOX nux::VOLUME_BOX
typedef struct
nux::_VOLUME_LOCKED_BOX 
nux::VOLUME_LOCKED_BOX
typedef enum nux::_ATTRIB_DECL_TYPE nux::ATTRIB_DECL_TYPE
typedef enum
nux::_ATTRIB_COMPONENT_TYPE 
nux::ATTRIB_COMPONENT_TYPE

Enumerations

enum  {
  nux::OGL_OK = 0, nux::OGL_ERROR, nux::OGL_ERROR_UNKNOWN, nux::OGL_INVALID_SURFACE_LEVEL,
  nux::OGL_INVALID_CALL, nux::OGL_INVALID_LOCK, nux::OGL_INVALID_UNLOCK, nux::OGL_INVALID_TEXTURE,
  nux::OGL_FORCE_DWORD = 0x7fffffff
}
enum  nux::TEXTURE_FORMAT {
  nux::TEXTURE_FMT_UNKNOWN = 0, nux::TEXTURE_FMT_ALPHA = GL_ALPHA, nux::TEXTURE_FMT_ALPHA8 = GL_ALPHA8, nux::TEXTURE_FMT_ALPHA16 = GL_ALPHA16,
  nux::TEXTURE_FMT_LUMINANCE = GL_LUMINANCE, nux::TEXTURE_FMT_LUMINANCE8 = GL_LUMINANCE8, nux::TEXTURE_FMT_LUMINANCE16 = GL_LUMINANCE16, nux::TEXTURE_FMT_LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA,
  nux::TEXTURE_FMT_LUMINANCE8_ALPHA8 = GL_LUMINANCE8_ALPHA8, nux::TEXTURE_FMT_LUMINANCE16_ALPHA16 = GL_LUMINANCE16_ALPHA16, nux::TEXTURE_FMT_INTENSITY = GL_INTENSITY, nux::TEXTURE_FMT_INTENSITY8 = GL_INTENSITY8,
  nux::TEXTURE_FMT_INTENSITY16 = GL_INTENSITY16, nux::TEXTURE_FMT_GL_DEPTH_COMPONENT = GL_DEPTH_COMPONENT, nux::TEXTURE_FMT_GL_DEPTH_COMPONENT24 = GL_DEPTH_COMPONENT24, nux::TEXTURE_FMT_RGBA = GL_RGBA,
  nux::TEXTURE_FMT_RGBA8 = GL_RGBA8, nux::TEXTURE_FMT_RGBA16 = GL_RGBA16, nux::TEXTURE_FMT_RGBA16F_ARB = GL_RGBA16F_ARB, nux::TEXTURE_FMT_RGBA32F_ARB = GL_RGBA32F_ARB,
  nux::TEXTURE_FMT_RGB = GL_RGB, nux::TEXTURE_FMT_RGB8 = GL_RGB8, nux::TEXTURE_FMT_RGB16 = GL_RGB16, nux::TEXTURE_FMT_RGB16F_ARB = GL_RGB16F_ARB,
  nux::TEXTURE_FMT_RGB32F_ARB = GL_RGB32F_ARB, nux::TEXTURE_FMT_COMPRESSED_RGB_S3TC_DXT1_EXT = GL_COMPRESSED_RGB_S3TC_DXT1_EXT, nux::TEXTURE_FMT_COMPRESSED_RGBA_S3TC_DXT1_EXT = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, nux::TEXTURE_FMT_COMPRESSED_RGBA_S3TC_DXT3_EXT = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
  nux::TEXTURE_FMT_COMPRESSED_RGBA_S3TC_DXT5_EXT = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, nux::TEXTURE_FMT_FORCE_DWORD = 0x7fffffff
}
enum  nux::eCUBEMAP_FACES {
  nux::CUBEMAP_FACE_POSITIVE_X = GL_TEXTURE_CUBE_MAP_POSITIVE_X, nux::CUBEMAP_FACE_NEGATIVE_X = GL_TEXTURE_CUBE_MAP_NEGATIVE_X, nux::CUBEMAP_FACE_POSITIVE_Y = GL_TEXTURE_CUBE_MAP_POSITIVE_Y, nux::CUBEMAP_FACE_NEGATIVE_Y = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
  nux::CUBEMAP_FACE_POSITIVE_Z = GL_TEXTURE_CUBE_MAP_POSITIVE_Z, nux::CUBEMAP_FACE_NEGATIVE_Z = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, nux::CUBEMAP_FACE_FORCE_DWORD = 0x7fffffff
}
enum  nux::VBO_USAGE {
  nux::VBO_USAGE_UNKNOWN = 0, nux::VBO_USAGE_STATIC = GL_STATIC_DRAW, nux::VBO_USAGE_DYNAMIC = GL_DYNAMIC_DRAW, nux::VBO_USAGE_STREAM = GL_STREAM_DRAW,
  nux::VBO_USAGE_FORCE_DWORD = 0x7fffffff
}
enum  nux::INDEX_FORMAT { nux::INDEX_FORMAT_UNKNOWN = 0, nux::INDEX_FORMAT_USHORT = GL_UNSIGNED_SHORT, nux::INDEX_FORMAT_UINT = GL_UNSIGNED_INT, nux::INDEX_FORMAT_FORCE_DWORD = 0x7fffffff }
enum  nux::PRIMITIVE_TYPE {
  nux::PRIMITIVE_TYPE_POINTLIST = GL_POINTS, nux::PRIMITIVE_TYPE_LINELIST = GL_LINES, nux::PRIMITIVE_TYPE_LINESTRIP = GL_LINE_STRIP, nux::PRIMITIVE_TYPE_TRIANGLELIST = GL_TRIANGLES,
  nux::PRIMITIVE_TYPE_TRIANGLESTRIP = GL_TRIANGLE_STRIP, nux::PRIMITIVE_TYPE_TRIANGLEFAN = GL_TRIANGLE_FAN, nux::PRIMITIVE_TYPE_QUADLIST = GL_QUADS, nux::PRIMITIVE_TYPE_QUADSTRIP = GL_QUAD_STRIP,
  nux::PRIMITIVE_TYPE_FORCE_DWORD = 0x7fffffff
}
enum  nux::OpenGLResourceType {
  nux::RTINDEXBUFFER, nux::RTVERTEXBUFFER, nux::RTSURFACE, nux::RTVOLUME,
  nux::RTBASETEXTURE, nux::RTTEXTURE, nux::RTTEXTURERECTANGLE, nux::RTCUBETEXTURE,
  nux::RTVOLUMETEXTURE, nux::RTANIMATEDTEXTURE, nux::RTVERTEXDECLARATION, nux::RTQUERY,
  nux::RTFRAMEBUFFEROBJECT, nux::RT_GLSL_VERTEXSHADER, nux::RT_GLSL_PIXELSHADER, nux::RT_GLSL_GEOMETRYSHADER,
  nux::RT_GLSL_SHADERPROGRAM, nux::RT_CG_VERTEXSHADER, nux::RT_CG_PIXELSHADER, nux::RT_FORCE_DWORD = 0x7fffffff
}
enum  nux::MULTISAMPLE_TYPE {
  nux::MULTISAMPLE_TYPE_NONE = 0, nux::MULTISAMPLE_TYPE_NONMASKABLE = 1, nux::MULTISAMPLE_TYPE_2_SAMPLES = 2, nux::MULTISAMPLE_TYPE_3_SAMPLES = 3,
  nux::MULTISAMPLE_TYPE_4_SAMPLES = 4, nux::MULTISAMPLE_TYPE_5_SAMPLES = 5, nux::MULTISAMPLE_TYPE_6_SAMPLES = 6, nux::MULTISAMPLE_TYPE_7_SAMPLES = 7,
  nux::MULTISAMPLE_TYPE_8_SAMPLES = 8, nux::MULTISAMPLE_TYPE_9_SAMPLES = 9, nux::MULTISAMPLE_TYPE_10_SAMPLES = 10, nux::MULTISAMPLE_TYPE_11_SAMPLES = 11,
  nux::MULTISAMPLE_TYPE_12_SAMPLES = 12, nux::MULTISAMPLE_TYPE_13_SAMPLES = 13, nux::MULTISAMPLE_TYPE_14_SAMPLES = 14, nux::MULTISAMPLE_TYPE_15_SAMPLES = 15,
  nux::MULTISAMPLE_TYPE_16_SAMPLES = 16, nux::MULTISAMPLE_TYPE_FORCE_DWORD = 0x7fffffff
}
enum  nux::MEM_POOL {
  nux::MEM_POOL_DEFAULT = 0, nux::MEM_POOL_MANAGED = 1, nux::MEM_POOL_SYSTEMMEM = 2, nux::MEM_POOL_SCRATCH = 3,
  nux::MEM_POOL_FORCE_DWORD = 0x7fffffff
}
enum  nux::_ATTRIB_DECL_TYPE {
  nux::ATTRIB_DECLTYPE_UNKNOWN = 0, nux::ATTRIB_DECLTYPE_FLOAT1, nux::ATTRIB_DECLTYPE_FLOAT2, nux::ATTRIB_DECLTYPE_FLOAT3,
  nux::ATTRIB_DECLTYPE_FLOAT4, nux::ATTRIB_DECLTYPE_COLOR, nux::ATTRIB_DECLTYPE_UBYTE4, nux::ATTRIB_DECLTYPE_SHORT2,
  nux::ATTRIB_DECLTYPE_SHORT4, nux::ATTRIB_DECLTYPE_UBYTE4N, nux::ATTRIB_DECLTYPE_SHORT2N, nux::ATTRIB_DECLTYPE_SHORT4N,
  nux::ATTRIB_DECLTYPE_USHORT2N, nux::ATTRIB_DECLTYPE_USHORT4N, nux::ATTRIB_DECLTYPE_UDEC3, nux::ATTRIB_DECLTYPE_DEC3N,
  nux::ATTRIB_DECLTYPE_FLOAT16_2, nux::ATTRIB_DECLTYPE_FLOAT16_4, nux::ATTRIB_DECLTYPE_UNUSED, nux::ATTRIB_DECLTYPE_FORCE_DWORD = 0x7fffffff
}
enum  nux::_ATTRIB_COMPONENT_TYPE {
  nux::ATTRIB_CT_UNKNOWN = 0, nux::ATTRIB_CT_BYTE = GL_BYTE, nux::ATTRIB_CT_UNSIGNED_BYTE = GL_UNSIGNED_BYTE, nux::ATTRIB_CT_SHORT = GL_SHORT,
  nux::ATTRIB_CT_UNSIGNED_SHORT = GL_UNSIGNED_SHORT, nux::ATTRIB_CT_INT = GL_INT, nux::ATTRIB_CT_UNSIGNED_INT = GL_UNSIGNED_INT, nux::ATTRIB_CT_FLOAT = GL_FLOAT,
  nux::ATTRIB_CT_HALF_FLOAT = GL_HALF_FLOAT_ARB, nux::ATTRIB_CT_DOUBLE = GL_DOUBLE, nux::ATTRIB_CT_FORCE_DWORD = 0x7fffffff
}
enum  nux::ATTRIB_USAGE_DECL {
  nux::ATTRIB_USAGE_DECL_POSITION = 0, nux::ATTRIB_USAGE_DECL_BLENDWEIGHT = 1, nux::ATTRIB_USAGE_DECL_NORMAL = 2, nux::ATTRIB_USAGE_DECL_COLOR = 3,
  nux::ATTRIB_USAGE_DECL_COLOR1 = 4, nux::ATTRIB_USAGE_DECL_FOGCOORD = 5, nux::ATTRIB_USAGE_DECL_PSIZE = 6, nux::ATTRIB_USAGE_DECL_BLENDINDICES = 7,
  nux::ATTRIB_USAGE_DECL_TEXCOORD = 8, nux::ATTRIB_USAGE_DECL_TEXCOORD0 = 8, nux::ATTRIB_USAGE_DECL_TEXCOORD1 = 9, nux::ATTRIB_USAGE_DECL_TEXCOORD2 = 10,
  nux::ATTRIB_USAGE_DECL_TEXCOORD3 = 11, nux::ATTRIB_USAGE_DECL_TEXCOORD4 = 12, nux::ATTRIB_USAGE_DECL_TEXCOORD5 = 13, nux::ATTRIB_USAGE_DECL_TEXCOORD6 = 14,
  nux::ATTRIB_USAGE_DECL_TEXCOORD7 = 15, nux::ATTRIB_USAGE_DECL_TANGENT = 14, nux::ATTRIB_USAGE_DECL_BINORMAL = 15, nux::ATTRIB_USAGE_DECL_FORCE_DWORD = 0x7fffffff
}
enum  nux::QUERY_TYPE {
  nux::QUERY_TYPE_VCACHE = 4, nux::QUERY_TYPE_RESOURCEMANAGER = 5, nux::QUERY_TYPE_VERTEXSTATS = 6, nux::QUERY_TYPE_EVENT = 8,
  nux::QUERY_TYPE_OCCLUSION = 9, nux::QUERY_TYPE_SCREENEXTENT = 10, nux::QUERY_TYPE_FORCE_DWORD = 0x7fffffff
}

Functions

UINT nux::GetVertexElementSize (VERTEXELEMENT vtxelement)
void nux::DecomposeTypeDeclaraction (ATTRIB_DECL_TYPE Type, BYTE &NumComponent, ATTRIB_COMPONENT_TYPE &ComponentType)
GLenum nux::GetGLPrimitiveType (PRIMITIVE_TYPE InPrimitiveType)
unsigned int nux::GetGLElementCount (PRIMITIVE_TYPE InPrimitiveType, unsigned int InPrimitiveCount)

Class Documentation

struct nux::PixelFormatReadInfo

Definition at line 218 of file GLResource.h.

Class Members
DWORD Flags
GLenum Format
const char * Name
bool Supported
GLenum type
struct nux::TEXTURE_DESC

Definition at line 330 of file GLResource.h.

Class Members
unsigned int BitsPerPixel
unsigned int BytesPerBlock
unsigned int Depth
unsigned int DepthInBlocks
int ExpBias
DWORD Flags
unsigned int Height
unsigned int HeightInBlocks
MULTISAMPLE_TYPE MultiSampleType
BitmapFormat PixelFormat
OpenGLResourceType ResourceType
unsigned int RowPitch
unsigned int SlicePitch
unsigned int Width
unsigned int WidthInBlocks
struct nux::_SURFACE_DESC

Definition at line 349 of file GLResource.h.

Class Members
unsigned int Height
DWORD MultiSampleQuality
MULTISAMPLE_TYPE MultiSampleType
BitmapFormat PixelFormat
MEM_POOL Pool
OpenGLResourceType Type
DWORD Usage
unsigned int Width
struct nux::_VOLUME_DESC

Definition at line 362 of file GLResource.h.

Class Members
unsigned int Depth
unsigned int Height
BitmapFormat PixelFormat
MEM_POOL Pool
OpenGLResourceType Type
DWORD Usage
unsigned int Width
struct nux::_ANIMATEDTEXTURE_DESC

Definition at line 373 of file GLResource.h.

Class Members
unsigned int Depth
unsigned int Height
BitmapFormat PixelFormat
MEM_POOL Pool
OpenGLResourceType Type
DWORD Usage
unsigned int Width
struct nux::_VERTEXBUFFER_DESC

Definition at line 384 of file GLResource.h.

Class Members
unsigned int Size
VBO_USAGE Usage
struct nux::_INDEXBUFFER_DESC

Definition at line 390 of file GLResource.h.

Class Members
INDEX_FORMAT Format
unsigned int Size
VBO_USAGE Usage
struct nux::_LOCKED_RECT

Definition at line 397 of file GLResource.h.

Class Members
void * pBits
int Pitch
struct nux::_SURFACE_RECT

Definition at line 403 of file GLResource.h.

Class Members
long bottom
long left
long right
long top
struct nux::_VOLUME_BOX

Definition at line 413 of file GLResource.h.

Class Members
int Back
int Bottom
int Front
int Left
int Right
int Top
struct nux::_VOLUME_LOCKED_BOX

Definition at line 423 of file GLResource.h.

Class Members
void * pBits
int RowPitch
int SlicePitch

Define Documentation

#define CG_FRAGMENT_PROFILE   CG_PROFILE_FP30

Definition at line 124 of file GLResource.h.

#define CG_VERTEX_PROFILE   CG_PROFILE_VP30

Definition at line 125 of file GLResource.h.

#define DECL_END
Value:
VERTEXELEMENT( \
  0xFF,                       \
  0,                          \
  ATTRIB_CT_UNKNOWN,          \
  0, 0)

Definition at line 549 of file GLResource.h.

#define ISSUE_BEGIN   (1 << 1)

Definition at line 513 of file GLResource.h.

#define ISSUE_END   (1 << 0)

Definition at line 512 of file GLResource.h.

#define MAX_NUM_STREAM   8

Definition at line 558 of file GLResource.h.

#define MAXDECLLENGTH   64

Definition at line 557 of file GLResource.h.

#define NUX_BUFFER_OFFSET (   i)    ((BYTE *)NULL + (i))

Definition at line 127 of file GLResource.h.

#define NUX_ENABLE_CG_SHADERS   0

Definition at line 72 of file GLResource.h.

#define OGL_CALL (   call)
Value:
{                               \
        int Result = call;          \
        if (Result != OGL_OK)          \
        {nuxError("OGL Object Error: Error # %d - (%s) ", Result,  *OGLDeviceErrorMessages[Result] );}   \
    }

Definition at line 149 of file GLResource.h.

#define OGL_OK   0

Definition at line 148 of file GLResource.h.