Skip to content

Commit dfcb392

Browse files
committed
Improve transforms
1 parent f8aa968 commit dfcb392

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common3dlighting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,12 @@ def draw(params, aspect):
194194
identityMvMatrix = np.array([[1.0, 0.0, 0.0, 0.0],
195195
[0.0, 1.0, 0.0, 0.0],
196196
[0.0, 0.0, 1.0, 0.0],
197-
[0.0, 0.0, -5.0, 1.0]])
197+
[0.0, 0.0, 0.0, 1.0]])
198198
mvRotate1 = glutils.rotation_matrix((1., 0., 0.), time.time())
199199
mvMatrix = np.dot(mvRotate1, identityMvMatrix)
200+
mvRotate2 = glutils.rotation_matrix((0., 1., 0.), time.time()/ 5.)
201+
mvMatrix = np.dot(mvRotate2, mvMatrix)
202+
mvMatrix[3,2] = -5. #Translate
200203
mvMatrix = np.array(mvMatrix.reshape((16,)), np.float32)
201204

202205
# use shader

0 commit comments

Comments
 (0)