Skip to content

Commit 8936783

Browse files
committed
Adapted code after recent texture target changes.
1 parent 95e6c7f commit 8936783

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/RedBook4/CubeMap.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ withCheckImage (TextureSize2D w h) n f act =
3636
| otherwise = 255 ] $
3737
act. PixelData RGBA UnsignedByte
3838

39-
makeImage :: CubeMapTarget -> (GLubyte -> (Color4 GLubyte)) -> IO ()
39+
makeImage :: TextureTargetCubeMapFace -> (GLubyte -> (Color4 GLubyte)) -> IO ()
4040
makeImage target f =
4141
withCheckImage imageSize 0x1 f $
42-
texImage2D (TextureCubeMap target) NoProxy 0 RGBA' imageSize 0
42+
texImage2D target NoProxy 0 RGBA' imageSize 0
4343

4444
myInit :: IO ()
4545
myInit = do
@@ -48,10 +48,10 @@ myInit = do
4848
shadeModel $= Smooth
4949

5050
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)
5555

5656
makeImage TextureCubeMapPositiveX (\c -> Color4 c c c 255)
5757
makeImage TextureCubeMapNegativeX (\c -> Color4 0 c c 255)
@@ -66,7 +66,7 @@ myInit = do
6666

6767
textureFunction $= Modulate
6868

69-
texture (TextureCubeMap undefined) $= Enabled -- TODO: WRONG!!!
69+
texture TextureCubeMap $= Enabled
7070
lighting $= Enabled
7171
light (Light 0) $= Enabled
7272
autoNormal $= Enabled

0 commit comments

Comments
 (0)