25 #include "glm/mat4x4.hpp" 26 #include "glm/gtc/matrix_transform.hpp" 85 for (
int i = 0; i < 6; i++)
94 for (
int i = 0; i < 6; i++)
102 _list = glGenLists(1);
104 glNewList(
_list, GL_COMPILE);
106 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
109 glTexCoord2f(0.0f, 0.0f);
110 glVertex3f(-1.00f, -1.00f, 0.00f);
111 glTexCoord2f(1.0f, 0.0f);
112 glVertex3f( 1.00f, -1.00f, 0.00f);
113 glTexCoord2f(1.0f, 1.0f);
114 glVertex3f( 1.00f, 1.00f, 0.00f);
115 glTexCoord2f(0.0f, 1.0f);
116 glVertex3f(-1.00f, 1.00f, 0.00f);
118 glTexCoord2f(0.0f, 0.0f);
119 glVertex3f(-1.00f, -1.00f, 0.00f);
120 glTexCoord2f(0.0f, 1.0f);
121 glVertex3f(-1.00f, 1.00f, 0.00f);
122 glTexCoord2f(1.0f, 1.0f);
123 glVertex3f( 1.00f, 1.00f, 0.00f);
124 glTexCoord2f(1.0f, 0.0f);
125 glVertex3f( 1.00f, -1.00f, 0.00f);
135 glDeleteLists(
_list, 1);
153 glTranslatef(0.0f, 0.0f, -3.0f);
159 glScalef(0.5f, 0.5f, 0.5f);
163 glTranslatef(0.0f, 0.0f, 1.0f);
166 glTranslatef(0.0f, 0.0f, -1.0f);
169 glRotatef(90.0f, 0.0f, 1.0f, 0.0f);
170 glTranslatef(0.0f, 0.0f, 1.0f);
173 glRotatef(90.0f, 0.0f, 1.0f, 0.0f);
174 glTranslatef(0.0f, 0.0f, -1.0f);
177 glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
178 glTranslatef(0.0f, 0.0f, 1.0f);
181 glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
182 glTranslatef(0.0f, 0.0f, -1.0f);
188 m = glm::translate(m, glm::vec3(0.0f, 0.0f, -3.0f));
194 m = glm::scale(m, glm::vec3(0.5f, 0.5f, 0.5f));
198 m = glm::translate(m, glm::vec3(0.0f, 0.0f, 1.0f));
201 m = glm::translate(m, glm::vec3(0.0f, 0.0f, -1.0f));
204 m = glm::rotate(m,
Common::deg2rad(90.0f), glm::vec3(0.0f, 1.0f, 0.0f));
205 m = glm::translate(m, glm::vec3(0.0f, 0.0f, 1.0f));
208 m = glm::rotate(m,
Common::deg2rad(90.0f), glm::vec3(0.0f, 1.0f, 0.0f));
209 m = glm::translate(m, glm::vec3(0.0f, 0.0f, -1.0f));
212 m = glm::rotate(m,
Common::deg2rad(90.0f), glm::vec3(1.0f, 0.0f, 0.0f));
213 m = glm::translate(m, glm::vec3(0.0f, 0.0f, 1.0f));
216 m = glm::rotate(m,
Common::deg2rad(90.0f), glm::vec3(1.0f, 0.0f, 0.0f));
217 m = glm::translate(m, glm::vec3(0.0f, 0.0f, -1.0f));
virtual void show()
Show the object.
Inter-thread request events.
Only render transparent parts.
The global graphics manager.
Texture & getTexture() const
virtual void hide()
Hide the object.
An object containing OpenGL structures.
A class holding an UTF-8 string.
#define TextureMan
Shortcut for accessing the texture manager.
double _distance
The distance of the object from the viewer.
The Aurora texture manager.
A simple cube object, for testing.
CubeSide(Cube &parent, int n)
void render(RenderPass pass)
Render the object.
void calculateDistance()
Calculate the object's distance.
Utility templates and functions.
void applyTransformation(int n)
The global events manager.
RequestList::iterator RequestID
void removeFromQueue(QueueType queue)
Basic reading stream interfaces.
#define EventMan
Shortcut for accessing the events manager.
Decoding TGA (TarGa) images.
A texture as used in the Aurora engines.
#define RequestMan
Shortcut for accessing the request manager.
Cube(const Common::UString &texture)
static float deg2rad(float deg)
#define GfxMan
Shortcut for accessing the graphics manager.
Only render opaque parts.