OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
index.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef INDEX_H
19 #define INDEX_H
20 
21 #include "stdafx.h"
22 #include "vector.h"
23 #include "logmanager.h"
24 
25 #define OPEN_POLY_VERSION 0.30
26 
38 typedef unsigned int uint;
39 typedef unsigned char uchar;
40 typedef unsigned short ushort;
41 
47 namespace Engine
48 {
49 
50  enum
51  {
52  //VBO Resets
53 
54  RESET_VERTEX_ARRAY = 0x0 ,
55  RESET_ARRAY_BUFFER = 0x0 ,
56 
57  //Attribute Locations
58 
59  ATTR_BUFFER_VERTICES = 0x0 ,
60  ATTR_BUFFER_TEXCOORD = 0x1 ,
61  ATTR_BUFFER_COLOR = 0x2 ,
62  ATTR_BUFFER_NORMAL = 0x3 ,
63  ATTR_BUFFER_TEXTURE = 0x4 ,
64  ATTR_BUFFER_INDICES = 0x5 ,
65  ATTR_BUFFER_DRAW_ID = 0x6 ,
66  ATTR_BUFFER_GROUP = 0x7 ,
67  ATTR_BUFFER_CUSTOM = 0x8 ,
68 
69  //Vector Size
70 
71  VECTOR_SIZE_1 = 0x1 ,
72  VECTOR_SIZE_2 = 0x2 ,
73  VECTOR_SIZE_3 = 0x3 ,
74  VECTOR_SIZE_4 = 0x4 ,
75 
76  //Shader Types
77  FRAGMENT = 0x01 ,
78  VERTEX = 0x02 ,
79  GEOMETRY = 0x04 ,
80  TESSELLATION = 0x08 ,
81  COMPUTE = 0x10 ,
82 
83  //const Shader Error | Uniform
84 
85  SHADER_COMPILE_ERROR = 0x0 ,
86  UNIFORM_UNIT = 0x1
87  };
88 
89 
90  // Default Names
91  static const std::string MAIN_CAMERA = "Main";
92  static const std::string MAIN_LIGHT = "Main";
93  static const std::string SHADER_SOURCE_PATH = "./Shaders/v3/";
94 
95  static boost::mutex thread_mutex;
96  static boost::mutex editor_update_mutex;
97  static boost::mutex thread_ticks;
98 
99  class Bone;
100  class Utils;
101  class Entity;
102  class Element;
103  class Scene;
104  class Mesh;
105  class DrawEvent;
106  class IShader;
107  class Shader;
108  class ShaderARB;
109  class ShadowEvent;
110  class FrameBuffer;
111  class DeferredScreen;
112  class Position;
113  class Texture;
114  class RenderEntity;
115  class RenderElement;
116  class Overlay;
117  class Editor;
118  class IEditorAddon;
119  class EntityObject;
120  class Technique;
121 
122  class TechniqueManager;
123  class RenderEntityManager;
124  class StateManager;
125  class AnimationManager;
126  class CameraManager;
127  class EntityManager;
128  class OverlayManager;
129  class MeshManager;
130  class ComponentManager;
131  class ShaderManager;
132  class EditorManager;
133  class SceneManager;
134  class RenderManager;
135  class SystemManager;
136  class RenderSystem;
137 
138  class VertexGroup;
139  class OpenPolygon;
140 
141  using VertexGroups = std::vector< VertexGroup *>;
142  using Textures = std::vector< Texture * >;
143  using Shaders = std::vector< Shader * >;
144  using Numbers = std::vector< int >;
145 
146  using Bones = std::list< Bone * >;
147  using TransformMap = std::map < int , Bones >;
148 
149 }
150 
155 typedef std::vector< int > Indices;
156 
161 typedef std::vector< std::string> Strings;
162 
167 typedef std::vector< Vector2f > Vector2fv;
168 
173 typedef std::vector< Vector3f > Vector3fv;
174 
179 typedef std::vector< Vector4f > Vector4fv;
180 
185 typedef std::vector< Vector4i > Vector4iv;
186 
187 #include "eutils.h"
188 
189 #endif // INDEX_H
Definition: element.h:23