Allink  v0.1
ProvaDraw.cpp
1 #include "../../include/Draw.h"
2 #ifdef __glut_h__
3 
4 Draw *Dr;
5 void reshape(int w,int h){
6  Dr->Dreshape(w,h);
7 }
8 void Timer(int v){
9  Dr->DTimer(v);
10 }
11 void MouseMove(int x,int y){
12  Dr->DMouseMove(x,y);
13 }
14 void mouse(int button, int state,int x,int y){
15  Dr->Dmouse(button,state,x,y);
16 };
17 void special(int k, int x, int y){
18  Dr->Dspecial(k,x,y);
19 }
20 void Slide(){}
21 void ParticleRealTime(){}
22 void ParticleList(){}
23 void keyboard(unsigned char key,int x, int y){
24  Dr->keyboardDraw(key);
25 }
26 void Menu(){}
27 void Figure(){
28  //Dr->Draw1();
29  //Dr->ShowImage();
30  Dr->Transform();
31  //Dr->DrCube();
32  Dr->DFigure();
33 }
34 void Figure1(){
35  Dr->Draw1();
36 }
37 int main(int argc,char** argv){
38  char nome[60];
39  Dr = new Draw();
40  if(argc > 1){
41  sprintf(nome,"%s",argv[1]);
42  Dr->OpenImage(nome);
43  }
44  else ;//Dr->ApplyTexture();
45  Dr->Window(argc,argv);
46  glutMainLoop();//Mantiene la finestra
47  return 1;
48 }
49 #else
50 int main(int argc,char** argv){
51  printf("OpenGL not supported\n");
52  return 0;
53 }
54 #endif// __glut_h__
void DMouseMove(int x, int y)
How the scene rotate (Camera view should be implemented)
Definition: DrawControl.cpp:63
void Dreshape(int w, int h)
Principal reshape function.
Definition: Draw.cpp:237
Draw provides the basic configuration of the openGL libraries used in every derived program...
Definition: Draw.h:15
void DFigure(void)
Definition of the scene on which the objects will be drawn.
Definition: DrawScene.cpp:35
void Dspecial(int k, int x, int y)
Boh.
void keyboardDraw(unsigned char key)
Combines the key with the functions.
void DTimer(int v)
Not working.
Definition: Draw.cpp:144
int OpenImage(const char *FileName)
Open a image to be store in pixel.
Definition: DrawFile.cpp:180
void Draw1(void)
A scene for debugging.
Definition: DrawScene.cpp:122
void Transform()
Transform the system coordinates.
Definition: DrawScene.cpp:244
void Window(int argc, char **argv)
Initial definition of the window.
Definition: Draw.cpp:108
void Dmouse(int button, int state, int x, int y)
To launch the menu.
Definition: DrawControl.cpp:86