From a1968ca31a7eeb04f3f009c24ee8b4813ff6be39 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Sun, 5 Jan 2014 19:13:27 +0100 Subject: [PATCH] doh! fragment-shader war rot zu testzwecken -.- --- shaders/fragment.shader | 2 +- shaders/vertex.shader | 2 +- src/Map/Map.hs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shaders/fragment.shader b/shaders/fragment.shader index 3482b68..7ae05d4 100644 --- a/shaders/fragment.shader +++ b/shaders/fragment.shader @@ -8,5 +8,5 @@ out vec4 fg_FragColor; void main(void) { //copy-shader - fg_FragColor = vec4(1,0,0,1) + 0.01* fg_SmoothColor; + fg_FragColor = fg_SmoothColor; } \ No newline at end of file diff --git a/shaders/vertex.shader b/shaders/vertex.shader index 12a80cd..46b623a 100644 --- a/shaders/vertex.shader +++ b/shaders/vertex.shader @@ -11,7 +11,7 @@ in vec3 fg_VertexIn; in vec3 fg_NormalIn; //output-data for later stages -out vec4 fg_SmoothColor; +smooth out vec4 fg_SmoothColor; void main() { diff --git a/src/Map/Map.hs b/src/Map/Map.hs index 3bab58f..89d4023 100644 --- a/src/Map/Map.hs +++ b/src/Map/Map.hs @@ -71,10 +71,10 @@ fgVertexIndex = (ToFloat, mapVertexArrayDescriptor 3 7) --vertex after normal getMapBufferObject :: IO (BufferObject, NumArrayIndices) getMapBufferObject = do map' <- testmap - ! map' <- return $ P.map (*1) (generateTriangles map') - putStrLn $ P.unlines $ P.map show (prettyMap map') + ! map' <- return $ generateTriangles map' + --putStrLn $ P.unlines $ P.map show (prettyMap map') 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 bindBuffer ArrayBuffer $= Just bo -- bind buffer withArray map' $ \buffer ->