tried lot of stuff.. nothing worked.

This commit is contained in:
Nicole Dresselhaus 2014-07-08 15:32:14 +02:00
parent aedb5b5337
commit 138d16016b
No known key found for this signature in database
GPG Key ID: BC16D887851A1A80
3 changed files with 6 additions and 4 deletions

View File

@ -6,5 +6,5 @@ in vec3 vNormal;
out vec4 fgColor;
void main () {
fgColor = vec4(1.0,0.0,1.0,1.0);
fgColor = vec4(1.0,0.0,1.0,0.5);
}

View File

@ -2,10 +2,11 @@
layout(location=0) in vec3 Position;
layout(location=1) in vec3 Normal;
layout(location=2) in vec2 TexCoord;
uniform mat4 ProjectionMatrix;
uniform mat4 ViewMatrix;
uniform mat3 NormalMatrix;
uniform vec3 PositionOffset = vec3(25,5,25);
uniform vec3 PositionOffset = vec3(5,5,5);
uniform float TessLevelInner = 1.0; // controlled by keyboard buttons
uniform float TessLevelOuter = 1.0; // controlled by keyboard buttons
@ -14,6 +15,6 @@ out vec3 vNormal;
void main () {
vPosition = Position;
gl_Position = ProjectionMatrix * ViewMatrix * vec4(PositionOffset + 10*Position, 1);
gl_Position = vec4(10*Position,1);//ProjectionMatrix * ViewMatrix * vec4(PositionOffset + Position, 1);
vNormal = Normal;
}

View File

@ -288,7 +288,7 @@ renderIQM m p@(L.V3 x y z) s@(L.V3 sx sy sz) = do
bindVertexArrayObject $= Just (vertexArrayObject m)
let n = num_vertexes.header $ m
--print $ concat ["drawing ", show n," triangles from object ",show m]
glDrawArrays gl_TRIANGLES 0 (fromIntegral n)
drawArrays Triangles 0 (fromIntegral n)
checkError "drawing model"
return ()
@ -472,6 +472,7 @@ render = do
drawMap
liftIO $ do
---- RENDER MAPOBJECTS --------------------------------------------
checkError "clear buffer"
currentProgram $= Just (state ^. gl.glMap.objectProgram)
checkError "setting up shadowmap-program"
--set up projection (= copy from state)