git.ucc.asn.au
/
atyndall
/
cits2231.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[atyndall/cits2231.git]
/
scene.c
diff --git
a/scene.c
b/scene.c
index
55b1856
..
aabad99
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-122,6
+122,7
@@
void processObjectEvents(int id) {
void processTextureEvents(int id) {
\r
if ( curObject >= 0 ) {
\r
sceneObjs[curObject].texture.id = id;
\r
void processTextureEvents(int id) {
\r
if ( curObject >= 0 ) {
\r
sceneObjs[curObject].texture.id = id;
\r
+ sceneObjs[curObject].texture.scale = 1;
\r
glutPostRedisplay();
\r
}
\r
}
\r
glutPostRedisplay();
\r
}
\r
}
\r
@@
-278,8
+279,9
@@
void motion(int x, int y) {
sceneObjs[curObject].rotation.x += diffx * rotateFactor;
\r
\r
// h: texture scale
\r
sceneObjs[curObject].rotation.x += diffx * rotateFactor;
\r
\r
// h: texture scale
\r
+ // **NOTE: Seems to be problem with scaling, delayed action
\r
float max = (float)height/texscaleFactor;
\r
float max = (float)height/texscaleFactor;
\r
- float scaling = (diffy + max) / max;
\r
+ float scaling = (
-
diffy + max) / max;
\r
sceneObjs[curObject].texture.scale *= scaling;
\r
\r
}
\r
sceneObjs[curObject].texture.scale *= scaling;
\r
\r
}
\r
UCC
git Repository :: git.ucc.asn.au