tried lot of stuff.. nothing worked.
This commit is contained in:
parent
aedb5b5337
commit
138d16016b
@ -6,5 +6,5 @@ in vec3 vNormal;
|
|||||||
out vec4 fgColor;
|
out vec4 fgColor;
|
||||||
|
|
||||||
void main () {
|
void main () {
|
||||||
fgColor = vec4(1.0,0.0,1.0,1.0);
|
fgColor = vec4(1.0,0.0,1.0,0.5);
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
layout(location=0) in vec3 Position;
|
layout(location=0) in vec3 Position;
|
||||||
layout(location=1) in vec3 Normal;
|
layout(location=1) in vec3 Normal;
|
||||||
|
layout(location=2) in vec2 TexCoord;
|
||||||
uniform mat4 ProjectionMatrix;
|
uniform mat4 ProjectionMatrix;
|
||||||
uniform mat4 ViewMatrix;
|
uniform mat4 ViewMatrix;
|
||||||
uniform mat3 NormalMatrix;
|
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 TessLevelInner = 1.0; // controlled by keyboard buttons
|
||||||
uniform float TessLevelOuter = 1.0; // controlled by keyboard buttons
|
uniform float TessLevelOuter = 1.0; // controlled by keyboard buttons
|
||||||
|
|
||||||
@ -14,6 +15,6 @@ out vec3 vNormal;
|
|||||||
|
|
||||||
void main () {
|
void main () {
|
||||||
vPosition = Position;
|
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;
|
vNormal = Normal;
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ renderIQM m p@(L.V3 x y z) s@(L.V3 sx sy sz) = do
|
|||||||
bindVertexArrayObject $= Just (vertexArrayObject m)
|
bindVertexArrayObject $= Just (vertexArrayObject m)
|
||||||
let n = num_vertexes.header $ m
|
let n = num_vertexes.header $ m
|
||||||
--print $ concat ["drawing ", show n," triangles from object ",show 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"
|
checkError "drawing model"
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
@ -472,6 +472,7 @@ render = do
|
|||||||
drawMap
|
drawMap
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
---- RENDER MAPOBJECTS --------------------------------------------
|
---- RENDER MAPOBJECTS --------------------------------------------
|
||||||
|
checkError "clear buffer"
|
||||||
currentProgram $= Just (state ^. gl.glMap.objectProgram)
|
currentProgram $= Just (state ^. gl.glMap.objectProgram)
|
||||||
checkError "setting up shadowmap-program"
|
checkError "setting up shadowmap-program"
|
||||||
--set up projection (= copy from state)
|
--set up projection (= copy from state)
|
||||||
|
Loading…
Reference in New Issue
Block a user