@@ -36,10 +36,10 @@ withCheckImage (TextureSize2D w h) n f act =
36
36
| otherwise = 255 ] $
37
37
act. PixelData RGBA UnsignedByte
38
38
39
- makeImage :: CubeMapTarget -> (GLubyte -> (Color4 GLubyte )) -> IO ()
39
+ makeImage :: TextureTargetCubeMapFace -> (GLubyte -> (Color4 GLubyte )) -> IO ()
40
40
makeImage target f =
41
41
withCheckImage imageSize 0x1 f $
42
- texImage2D ( TextureCubeMap target) NoProxy 0 RGBA' imageSize 0
42
+ texImage2D target NoProxy 0 RGBA' imageSize 0
43
43
44
44
myInit :: IO ()
45
45
myInit = do
@@ -48,10 +48,10 @@ myInit = do
48
48
shadeModel $= Smooth
49
49
50
50
rowAlignment Unpack $= 1
51
- textureWrapMode ( TextureCubeMap undefined ) S $= (Repeated , Repeat ) -- TODO: WRONG!!!
52
- textureWrapMode ( TextureCubeMap undefined ) T $= (Repeated , Repeat ) -- TODO: WRONG!!!
53
- textureWrapMode ( TextureCubeMap undefined ) R $= (Repeated , Repeat ) -- TODO: WRONG!!!
54
- textureFilter ( TextureCubeMap undefined ) $= ((Nearest , Nothing ), Nearest ) -- TODO: WRONG!!!
51
+ textureWrapMode TextureCubeMap S $= (Repeated , Repeat )
52
+ textureWrapMode TextureCubeMap T $= (Repeated , Repeat )
53
+ textureWrapMode TextureCubeMap R $= (Repeated , Repeat )
54
+ textureFilter TextureCubeMap $= ((Nearest , Nothing ), Nearest )
55
55
56
56
makeImage TextureCubeMapPositiveX (\ c -> Color4 c c c 255 )
57
57
makeImage TextureCubeMapNegativeX (\ c -> Color4 0 c c 255 )
@@ -66,7 +66,7 @@ myInit = do
66
66
67
67
textureFunction $= Modulate
68
68
69
- texture ( TextureCubeMap undefined ) $= Enabled -- TODO: WRONG!!!
69
+ texture TextureCubeMap $= Enabled
70
70
lighting $= Enabled
71
71
light (Light 0 ) $= Enabled
72
72
autoNormal $= Enabled
0 commit comments