Guiliani  Version 2.6 revision 7293 (documentation build 12)
GL_API_Mappings.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef __GL_API_MAPPINGS_H__
11#define __GL_API_MAPPINGS_H__
12
13#define GETGFX_GL static_cast<CGfxWrapGL&>(GETGFX)
14
15#if defined (GUILIANI_USE_OGL)
16 #include "OGL_API.h"
17#elif defined(GUILIANI_USE_OGLES11) || defined(GUILIANI_USE_OGLES2)
18 #include "OGLES_API.h"
19#endif
20
21// mapping for color-formats
22#ifndef GL_RGB5
23#define GL_RGB5 GL_RGB
24#endif
25#ifndef GL_RGB8
26#define GL_RGB8 GL_RGB
27#endif
28
29// Macro to simplify the call of the Switch3D function.
30#define SWITCH_TO_3D GETGFX_GL.Switch3D(GETGFX.GetVirtualScreenWidth(), \
31 GETGFX.GetVirtualScreenHeight(), GetAbsXPos(), GetAbsYPos(), GetRelZPos(), \
32 GetZeroZ(), GetWidth(), GetHeight(), GetInitWidth(), GetInitHeight(), \
33 GetRotateX(), GetRotateY(), GetRotateZ(), GetNearPlane(), GetFarPlane(), \
34 GetPerspectiveAngle())
35
36#if defined SYSTEM_NAME_DARWIN
37#define glBindBuffer_Guiliani glBindBuffer
38#define glBufferData_Guiliani glBufferData
39#define glGenBuffers_Guiliani glGenBuffers
40#define glDeleteBuffers_Guiliani glDeleteBuffers
41#define glGenFramebuffers_Guiliani glGenFramebuffers
42#define glBindFramebuffer_Guiliani glBindFramebuffer
43#define glFramebufferTexture2D_Guiliani glFramebufferTexture2D
44#define glCheckFramebufferStatus_Guiliani glCheckFramebufferStatus
45#define glDeleteFramebuffers_Guiliani glDeleteFramebuffers
46#endif
47
48// Type for the 3d matrix
49const eC_UByte cubNOFMatrixElements = 4;
50typedef eC_Value Matrix3D_t[cubNOFMatrixElements][cubNOFMatrixElements];
51
52// the identity matrix
53const Matrix3D_t cavIdentityMatrix =
54{
55 { eC_FromInt(1), eC_FromInt(0), eC_FromInt(0), eC_FromInt(0) },
56 { eC_FromInt(0), eC_FromInt(1), eC_FromInt(0), eC_FromInt(0) },
57 { eC_FromInt(0), eC_FromInt(0), eC_FromInt(1), eC_FromInt(0) },
58 { eC_FromInt(0), eC_FromInt(0), eC_FromInt(0), eC_FromInt(1) }
59};
60
61#endif //#ifndef __GL_API_MAPPINGS_H__