Forgot to init the GL-Context -.-
This commit is contained in:
parent
ce055339ec
commit
18c36491f8
@ -15,6 +15,8 @@ smooth out vec4 fg_SmoothColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
uiaenuirtdaend
|
||||
vec3 fg_Normal = fg_NormalMatrix * fg_NormalIn; //vec3(0,1,0);
|
||||
//transform vec3 into vec4, setting w to 1
|
||||
vec4 fg_Vertex = vec4(fg_VertexIn, 1.0);
|
||||
|
@ -50,6 +50,7 @@ data Env = Env
|
||||
, envWindow :: !Window
|
||||
, envZDistClosest :: !Double
|
||||
, envZDistFarthest :: !Double
|
||||
--, envGLContext :: !GLContext
|
||||
}
|
||||
|
||||
--Mutable State
|
||||
@ -91,13 +92,14 @@ type Pioneers = RWST Env () State IO
|
||||
main :: IO ()
|
||||
main = do
|
||||
SDL.withInit [InitVideo, InitAudio] $ do --also: InitNoParachute -> faster, without parachute!
|
||||
window <- SDL.createWindow "Pioneers" (Position 1500 100) (Size 1024 768) [WindowOpengl -- we want openGL
|
||||
SDL.withWindow "Pioneers" (Position 1500 100) (Size 1024 768) [WindowOpengl -- we want openGL
|
||||
,WindowShown -- window should be visible
|
||||
,WindowResizable -- and resizable
|
||||
,WindowInputFocus -- focused (=> active)
|
||||
,WindowMouseFocus -- Mouse into it
|
||||
--,WindowInputGrabbed-- never let go of input (KB/Mouse)
|
||||
]
|
||||
] $ \window -> do
|
||||
withOpenGL window $ do
|
||||
(Size fbWidth fbHeight) <- glGetDrawableSize window
|
||||
initRendering
|
||||
--generate map vertices
|
||||
|
Loading…
Reference in New Issue
Block a user