Allink  v0.1
ProvaDraw.cpp
00001 #include "../../include/Draw.h"
00002 #ifdef __glut_h__
00003 
00004 Draw *Dr;
00005 void reshape(int w,int h){
00006   Dr->Dreshape(w,h);
00007 }
00008 void Timer(int v){
00009   Dr->DTimer(v);
00010 }
00011 void MouseMove(int x,int y){
00012   Dr->DMouseMove(x,y);
00013 }
00014 void mouse(int button, int state,int x,int y){
00015   Dr->Dmouse(button,state,x,y);
00016 };
00017 void special(int k, int x, int y){
00018   Dr->Dspecial(k,x,y);
00019 }
00020 void Slide(){}
00021 void ParticleRealTime(){}
00022 void ParticleList(){}
00023 void keyboard(unsigned char key,int x, int y){
00024   Dr->keyboardDraw(key);
00025 }
00026 void Menu(){}
00027 void Figure(){
00028   //Dr->Draw1();
00029   //Dr->ShowImage();
00030   Dr->Transform();
00031   //Dr->DrCube();
00032   Dr->DFigure();
00033 }
00034 void Figure1(){
00035   Dr->Draw1();
00036 }
00037 int main(int argc,char** argv){
00038   char nome[60];
00039   Dr = new Draw();
00040   if(argc > 1){
00041     sprintf(nome,"%s",argv[1]);
00042     Dr->OpenImage(nome);
00043   }
00044   else ;//Dr->ApplyTexture();
00045   Dr->Window(argc,argv);
00046   glutMainLoop();//Mantiene la finestra
00047   return 1;
00048 }
00049 #else
00050 int main(int argc,char** argv){
00051   printf("OpenGL not supported\n");
00052   return 0;
00053 }
00054 #endif// __glut_h__