-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpick.cpp
executable file
·47 lines (36 loc) · 930 Bytes
/
pick.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "pick.h"
using namespace myglut;
void extern myglut::pick(GLint name){
if(name < 0) return;
printf("Pick(%d)\n", name);
PickThis = name;
lastpick = PickThis;
/*
int tmp = laststate;
laststate = beforelaststate;
beforelaststate = tmp;
*/
printf("Pick: %d\n", name);
fflush(stdout);
myglut2d->draw2d();
myglut3d->draw3d();
/*
source = (GLvoid *)(&((myglut2d->datBinary.elements)[0]));
myglut2d->recalc_binary_quick(PickThis);
myglut2d->quickdraw();
*/
//int tmp = laststate;
//laststate = beforelaststate;
//beforelaststate = tmp;
/*if(PickThis != laststate)*/
if(false){
// only recalculate classes if we change K
myglut2d->recalc_classes();
}
// myglut2d->recalc_binary_quick(PickThis);
source = (GLvoid *)(&((myglut2d->datBinary.elements)[0]));
myglut2d->quickdraw();
PickThis = lastpick;
beforelaststate = laststate;
laststate = PickThis;
}