aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-12-25 20:58:15 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:50 +0100
commitc731a59c47832590fc87a9b535ce5309cb11ffe7 (patch)
tree6f6cd263b0825272e01e294c6f28e9bb96b813bc /src/menu
parent15f658c357979fdea70e2074055912f13ac1fead (diff)
downloadusdx-c731a59c47832590fc87a9b535ce5309cb11ffe7.tar.gz
usdx-c731a59c47832590fc87a9b535ce5309cb11ffe7.tar.xz
usdx-c731a59c47832590fc87a9b535ce5309cb11ffe7.zip
menu: use 2d coordinates for opengl
Diffstat (limited to 'src/menu')
-rw-r--r--src/menu/frame_background_image.cpp14
-rw-r--r--src/menu/frame_background_image.hpp2
-rw-r--r--src/menu/software_mouse_pointer.cpp10
-rw-r--r--src/menu/software_mouse_pointer.hpp2
4 files changed, 10 insertions, 18 deletions
diff --git a/src/menu/frame_background_image.cpp b/src/menu/frame_background_image.cpp
index 53036541..893d573c 100644
--- a/src/menu/frame_background_image.cpp
+++ b/src/menu/frame_background_image.cpp
@@ -34,16 +34,12 @@ namespace usdx
this->vertices[0] = 0.0f;
this->vertices[1] = 600.0f;
- this->vertices[2] = 0.0f;
- this->vertices[3] = 800.0f;
- this->vertices[4] = 600.0f;
+ this->vertices[2] = 800.0f;
+ this->vertices[3] = 600.0f;
+ this->vertices[4] = 800.0f;
this->vertices[5] = 0.0f;
- this->vertices[6] = 800.0f;
+ this->vertices[6] = 0.0f;
this->vertices[7] = 0.0f;
- this->vertices[8] = 0.0f;
- this->vertices[9] = 0.0f;
- this->vertices[10] = 0.0f;
- this->vertices[11] = 0.0f;
this->color[0] = 255;
this->color[1] = 255;
@@ -89,7 +85,7 @@ namespace usdx
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, vertices);
+ glVertexPointer(2, GL_FLOAT, 0, vertices);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, color);
glTexCoordPointer(2, GL_FLOAT, 0, tex);
diff --git a/src/menu/frame_background_image.hpp b/src/menu/frame_background_image.hpp
index a3349574..5aaa58b6 100644
--- a/src/menu/frame_background_image.hpp
+++ b/src/menu/frame_background_image.hpp
@@ -40,7 +40,7 @@ namespace usdx
private:
Texture* texture;
- GLfloat vertices[12];
+ GLfloat vertices[8];
GLubyte color[16];
GLfloat tex[8];
diff --git a/src/menu/software_mouse_pointer.cpp b/src/menu/software_mouse_pointer.cpp
index 90171fa9..18de8de3 100644
--- a/src/menu/software_mouse_pointer.cpp
+++ b/src/menu/software_mouse_pointer.cpp
@@ -35,16 +35,12 @@ namespace usdx
{
this->vertices[0] = 0.0f;
this->vertices[1] = 40.0f;
- this->vertices[2] = 0.0f;
+ this->vertices[2] = 40.0f;
this->vertices[3] = 40.0f;
this->vertices[4] = 40.0f;
this->vertices[5] = 0.0f;
- this->vertices[6] = 40.0f;
+ this->vertices[6] = 0.0f;
this->vertices[7] = 0.0f;
- this->vertices[8] = 0.0f;
- this->vertices[9] = 0.0f;
- this->vertices[10] = 0.0f;
- this->vertices[11] = 0.0f;
this->color[0] = 255;
this->color[1] = 255;
@@ -105,7 +101,7 @@ namespace usdx
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, vertices);
+ glVertexPointer(2, GL_FLOAT, 0, vertices);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, color);
glTexCoordPointer(2, GL_FLOAT, 0, texture);
diff --git a/src/menu/software_mouse_pointer.hpp b/src/menu/software_mouse_pointer.hpp
index b63904a1..d2f8abb0 100644
--- a/src/menu/software_mouse_pointer.hpp
+++ b/src/menu/software_mouse_pointer.hpp
@@ -44,7 +44,7 @@ namespace usdx
int x;
int y;
- GLfloat vertices[12];
+ GLfloat vertices[8];
GLubyte color[16];
GLfloat texture[8];