doh! fragment-shader war rot zu testzwecken -.-

This commit is contained in:
Nicole Dresselhaus 2014-01-05 19:13:27 +01:00
parent 2b2108ab87
commit a1968ca31a
3 changed files with 5 additions and 5 deletions

View File

@ -8,5 +8,5 @@ out vec4 fg_FragColor;
void main(void) void main(void)
{ {
//copy-shader //copy-shader
fg_FragColor = vec4(1,0,0,1) + 0.01* fg_SmoothColor; fg_FragColor = fg_SmoothColor;
} }

View File

@ -11,7 +11,7 @@ in vec3 fg_VertexIn;
in vec3 fg_NormalIn; in vec3 fg_NormalIn;
//output-data for later stages //output-data for later stages
out vec4 fg_SmoothColor; smooth out vec4 fg_SmoothColor;
void main() void main()
{ {

View File

@ -71,10 +71,10 @@ fgVertexIndex = (ToFloat, mapVertexArrayDescriptor 3 7) --vertex after normal
getMapBufferObject :: IO (BufferObject, NumArrayIndices) getMapBufferObject :: IO (BufferObject, NumArrayIndices)
getMapBufferObject = do getMapBufferObject = do
map' <- testmap map' <- testmap
! map' <- return $ P.map (*1) (generateTriangles map') ! map' <- return $ generateTriangles map'
putStrLn $ P.unlines $ P.map show (prettyMap map') --putStrLn $ P.unlines $ P.map show (prettyMap map')
len <- return $ fromIntegral $ P.length map' `div` numComponents len <- return $ fromIntegral $ P.length map' `div` numComponents
putStrLn $ P.unwords ["num verts",show len] putStrLn $ P.unwords ["num verts in map:",show len]
bo <- genObjectName -- create a new buffer bo <- genObjectName -- create a new buffer
bindBuffer ArrayBuffer $= Just bo -- bind buffer bindBuffer ArrayBuffer $= Just bo -- bind buffer
withArray map' $ \buffer -> withArray map' $ \buffer ->