new example

This commit is contained in:
nek0 2017-11-03 01:33:12 +01:00
parent e2e025afb5
commit 69dc80707f
4 changed files with 38 additions and 7 deletions

View file

@ -13,6 +13,7 @@ import qualified Graphics.GLUtil as GLU
import Physics.Bullet.Raw
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import Linear as L
@ -31,8 +32,8 @@ main =
{ initComponents = All
, windowTitle = "hw"
, windowConfig = SDL.defaultWindow
{ windowInitialSize = SDL.V2 1600 900
, windowOpenGL = Just SDL.defaultOpenGL
{ SDL.windowInitialSize = SDL.V2 1600 900
, SDL.windowOpenGL = Just SDL.defaultOpenGL
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
}
}

View file

@ -13,6 +13,7 @@ import qualified Graphics.GLUtil as GLU
import Physics.Bullet.Raw
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import Linear as L
@ -31,8 +32,8 @@ main =
{ initComponents = All
, windowTitle = "hw"
, windowConfig = SDL.defaultWindow
{ windowInitialSize = SDL.V2 1600 900
, windowOpenGL = Just SDL.defaultOpenGL
{ SDL.windowInitialSize = SDL.V2 1600 900
, SDL.windowOpenGL = Just SDL.defaultOpenGL
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
}
}

View file

@ -96,3 +96,31 @@ executable example01
default-language: Haskell2010
ghc-options: -Wall
extra-libraries: stdc++
executable example02
main-is: Main.hs
other-modules: Util
, Types
, Init
-- other-extensions:
default-extensions: OverloadedStrings
if flag(examples)
build-depends: base >=4.9
, affection
, sdl2
, linear
, spatial-math
, bytestring
, OpenGL
, OpenGLRaw
, GLUtil
, random
, vector
, wavefront
, shoot
else
buildable: False
hs-source-dirs: examples/example02
default-language: Haskell2010
ghc-options: -Wall
extra-libraries: stdc++

View file

@ -13,6 +13,7 @@ import qualified Graphics.GLUtil as GLU
import Physics.Bullet.Raw
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import Linear as L
@ -31,9 +32,9 @@ main =
{ initComponents = All
, windowTitle = "hw"
, windowConfig = SDL.defaultWindow
{ windowInitialSize = SDL.V2 1600 900
, windowOpenGL = Just SDL.defaultOpenGL
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
{ SDL.windowInitialSize = SDL.V2 1600 900
, SDL.windowOpenGL = Just SDL.defaultOpenGL
{ SDL.glProfile = SDL.Core SDL.Normal 3 3
}
}
, initScreenMode = SDL.Fullscreen