summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/ui/liveView.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/ui/liveView.cc')
-rw-r--r--2005/i/robert/src/ovision/ui/liveView.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/2005/i/robert/src/ovision/ui/liveView.cc b/2005/i/robert/src/ovision/ui/liveView.cc
index 39b7832..0357456 100644
--- a/2005/i/robert/src/ovision/ui/liveView.cc
+++ b/2005/i/robert/src/ovision/ui/liveView.cc
@@ -15,13 +15,9 @@
using namespace std;
-#define IMG_WIDTH 360
-#define IMG_HEIGHT 296
-#define WIDTH 718
-#define HEIGHT 592
+int width, height;
int window;
Live *live;
-int width=538; int height=395;
static const unsigned nbImg = 4;
std::vector<std::string> *fileList;
Live::ImageInput ii;
@@ -66,7 +62,7 @@ initGL(int width, int height)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// Plan de projection en 2D
- glOrtho(0.0, WIDTH, 0.0, HEIGHT, -1.0, 1.0);
+ glOrtho(0.0, width, 0.0, height, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
}
@@ -85,7 +81,7 @@ reSizeGLScene(int w, int h)
glMatrixMode(GL_PROJECTION);
// Remise a zero et mode 2D
glLoadIdentity();
- glOrtho(0.0, WIDTH, 0.0, HEIGHT, -1.0, 1.0);
+ glOrtho(0.0, width, 0.0, height, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
}
@@ -102,8 +98,8 @@ drawImage(GLuint texId)
// Calcul des coordonnees de l'image
wMin = BORDER+(texId%3)*(352+BORDER);
wMax = 352+BORDER+(texId%3)*(352+BORDER);
- hMin = HEIGHT-288-BORDER-(int)(texId/3)*(288+BORDER);
- hMax = HEIGHT-BORDER-(int)(texId/3)*(288+BORDER);
+ hMin = height-288-BORDER-(int)(texId/3)*(288+BORDER);
+ hMax = height-BORDER-(int)(texId/3)*(288+BORDER);
// Dessine un carre contenant l'image
glBegin(GL_QUADS);
glNormal3f( 0.0f, 0.0f, 1.0f);
@@ -267,6 +263,7 @@ parseCommandLine (int argc, char **argv, Live::ImageInput &ii, std::vector<std::
int
main(int argc, char **argv)
{
+ width=718; height=592;
fileList = new std::vector<std::string>;
parseCommandLine (argc, argv, ii, *fileList);
// Initialisation de l'OpenGL
@@ -279,7 +276,7 @@ main(int argc, char **argv)
glutReshapeFunc(&reSizeGLScene);
glutKeyboardFunc(&keyPressed);
glutMouseFunc(&mouseFunc);
- initGL(WIDTH, HEIGHT);
+ initGL(width, height);
iFileList = 0;
nnNbColor = 6;