trying unholy resurrection
This commit is contained in:
parent
4b6e57c5a5
commit
b4e2e5060f
7 changed files with 101 additions and 87 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Blender v2.79 (sub 0) OBJ File: 'smallsphere.blend'
|
# Blender v2.81 (sub 16) OBJ File: 'smallsphere.blend'
|
||||||
# www.blender.org
|
# www.blender.org
|
||||||
v 0.000000 -1.000000 0.000000
|
v 0.000000 -1.000000 0.000000
|
||||||
v 0.723600 -0.447215 0.525720
|
v 0.723600 -0.447215 0.525720
|
||||||
|
@ -12,44 +12,24 @@ v -0.723600 0.447215 -0.525720
|
||||||
v 0.276385 0.447215 -0.850640
|
v 0.276385 0.447215 -0.850640
|
||||||
v 0.894425 0.447215 0.000000
|
v 0.894425 0.447215 0.000000
|
||||||
v 0.000000 1.000000 0.000000
|
v 0.000000 1.000000 0.000000
|
||||||
vn 0.1876 -0.7947 0.5774
|
|
||||||
vn 0.6071 -0.7947 0.0000
|
|
||||||
vn -0.4911 -0.7947 0.3568
|
|
||||||
vn -0.4911 -0.7947 -0.3568
|
|
||||||
vn 0.1876 -0.7947 -0.5774
|
|
||||||
vn 0.9822 -0.1876 0.0000
|
|
||||||
vn 0.3035 -0.1876 0.9342
|
|
||||||
vn -0.7946 -0.1876 0.5774
|
|
||||||
vn -0.7946 -0.1876 -0.5774
|
|
||||||
vn 0.3035 -0.1876 -0.9342
|
|
||||||
vn 0.7946 0.1876 0.5774
|
|
||||||
vn -0.3035 0.1876 0.9342
|
|
||||||
vn -0.9822 0.1876 0.0000
|
|
||||||
vn -0.3035 0.1876 -0.9342
|
|
||||||
vn 0.7946 0.1876 -0.5774
|
|
||||||
vn 0.4911 0.7947 0.3568
|
|
||||||
vn -0.1876 0.7947 0.5774
|
|
||||||
vn -0.6071 0.7947 0.0000
|
|
||||||
vn -0.1876 0.7947 -0.5774
|
|
||||||
vn 0.4911 0.7947 -0.3568
|
|
||||||
s off
|
s off
|
||||||
f 1//1 2//1 3//1
|
f 1 2 3
|
||||||
f 2//2 1//2 6//2
|
f 2 1 6
|
||||||
f 1//3 3//3 4//3
|
f 1 3 4
|
||||||
f 1//4 4//4 5//4
|
f 1 4 5
|
||||||
f 1//5 5//5 6//5
|
f 1 5 6
|
||||||
f 2//6 6//6 11//6
|
f 2 6 11
|
||||||
f 3//7 2//7 7//7
|
f 3 2 7
|
||||||
f 4//8 3//8 8//8
|
f 4 3 8
|
||||||
f 5//9 4//9 9//9
|
f 5 4 9
|
||||||
f 6//10 5//10 10//10
|
f 6 5 10
|
||||||
f 2//11 11//11 7//11
|
f 2 11 7
|
||||||
f 3//12 7//12 8//12
|
f 3 7 8
|
||||||
f 4//13 8//13 9//13
|
f 4 8 9
|
||||||
f 5//14 9//14 10//14
|
f 5 9 10
|
||||||
f 6//15 10//15 11//15
|
f 6 10 11
|
||||||
f 7//16 11//16 12//16
|
f 7 11 12
|
||||||
f 8//17 7//17 12//17
|
f 8 7 12
|
||||||
f 9//18 8//18 12//18
|
f 9 8 12
|
||||||
f 10//19 9//19 12//19
|
f 10 9 12
|
||||||
f 11//20 10//20 12//20
|
f 11 10 12
|
||||||
|
|
|
@ -31,12 +31,16 @@ main =
|
||||||
withAffection AffectionConfig
|
withAffection AffectionConfig
|
||||||
{ initComponents = All
|
{ initComponents = All
|
||||||
, windowTitle = "hw"
|
, windowTitle = "hw"
|
||||||
, windowConfig = SDL.defaultWindow
|
, windowConfigs =
|
||||||
{ SDL.windowInitialSize = SDL.V2 1600 900
|
[ ( 0
|
||||||
, SDL.windowOpenGL = Just SDL.defaultOpenGL
|
, SDL.defaultWindow
|
||||||
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
|
{ SDL.windowInitialSize = SDL.V2 1600 900
|
||||||
}
|
, SDL.windowGraphicsContext = SDL.OpenGLContext SDL.defaultOpenGL
|
||||||
}
|
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
, initScreenMode = SDL.Fullscreen
|
, initScreenMode = SDL.Fullscreen
|
||||||
, preLoop = return ()
|
, preLoop = return ()
|
||||||
, eventLoop = mapM_ handle
|
, eventLoop = mapM_ handle
|
||||||
|
|
|
@ -31,12 +31,16 @@ main =
|
||||||
withAffection AffectionConfig
|
withAffection AffectionConfig
|
||||||
{ initComponents = All
|
{ initComponents = All
|
||||||
, windowTitle = "hw"
|
, windowTitle = "hw"
|
||||||
, windowConfig = SDL.defaultWindow
|
, windowConfigs =
|
||||||
{ SDL.windowInitialSize = SDL.V2 1600 900
|
[ ( 0
|
||||||
, SDL.windowOpenGL = Just SDL.defaultOpenGL
|
, SDL.defaultWindow
|
||||||
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
|
{ SDL.windowInitialSize = SDL.V2 1600 900
|
||||||
}
|
, SDL.windowGraphicsContext = SDL.OpenGLContext SDL.defaultOpenGL
|
||||||
}
|
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
, initScreenMode = SDL.Fullscreen
|
, initScreenMode = SDL.Fullscreen
|
||||||
, preLoop = return ()
|
, preLoop = return ()
|
||||||
, eventLoop = mapM_ handle
|
, eventLoop = mapM_ handle
|
||||||
|
|
|
@ -31,13 +31,17 @@ main =
|
||||||
withAffection AffectionConfig
|
withAffection AffectionConfig
|
||||||
{ initComponents = All
|
{ initComponents = All
|
||||||
, windowTitle = "hw - example 02"
|
, windowTitle = "hw - example 02"
|
||||||
, windowConfig = SDL.defaultWindow
|
, windowConfigs =
|
||||||
{ SDL.windowInitialSize = SDL.V2 1600 900
|
[ ( 0
|
||||||
, SDL.windowOpenGL = Just SDL.defaultOpenGL
|
, SDL.defaultWindow
|
||||||
{ SDL.glProfile = SDL.Core SDL.Normal 3 0
|
{ SDL.windowInitialSize = SDL.V2 1920 1080
|
||||||
}
|
, SDL.windowGraphicsContext = SDL.OpenGLContext SDL.defaultOpenGL
|
||||||
}
|
{ SDL.glProfile = SDL.Core SDL.Normal 3 2
|
||||||
, initScreenMode = SDL.Fullscreen
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
|
, initScreenMode = SDL.FullscreenDesktop
|
||||||
, preLoop = return ()
|
, preLoop = return ()
|
||||||
, eventLoop = mapM_ handle
|
, eventLoop = mapM_ handle
|
||||||
, updateLoop = update
|
, updateLoop = update
|
||||||
|
@ -133,7 +137,7 @@ update dt = do
|
||||||
|
|
||||||
draw :: Affection StateData ()
|
draw :: Affection StateData ()
|
||||||
draw = do
|
draw = do
|
||||||
GL.viewport $= (GL.Position 0 0, GL.Size 1600 900)
|
GL.viewport $= (GL.Position 0 0, GL.Size 1920 1080)
|
||||||
StateData{..} <- getAffection
|
StateData{..} <- getAffection
|
||||||
drawThings program (planet : ships)
|
drawThings program (planet : ships)
|
||||||
-- drawThings program (ships)
|
-- drawThings program (ships)
|
||||||
|
|
16
hw.cabal
16
hw.cabal
|
@ -37,9 +37,9 @@ executable hw
|
||||||
, Init
|
, Init
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
default-extensions: OverloadedStrings
|
default-extensions: OverloadedStrings
|
||||||
build-depends: base >=4.9
|
build-depends: base >=4.12
|
||||||
, affection
|
, affection
|
||||||
, sdl2
|
, sdl2 >=2.5.0.0
|
||||||
, linear
|
, linear
|
||||||
, spatial-math
|
, spatial-math
|
||||||
, bytestring
|
, bytestring
|
||||||
|
@ -67,9 +67,9 @@ executable example00
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
default-extensions: OverloadedStrings
|
default-extensions: OverloadedStrings
|
||||||
if flag(examples)
|
if flag(examples)
|
||||||
build-depends: base >=4.9
|
build-depends: base >=4.12
|
||||||
, affection
|
, affection
|
||||||
, sdl2
|
, sdl2 >=2.5.0.0
|
||||||
, linear
|
, linear
|
||||||
, spatial-math
|
, spatial-math
|
||||||
, bytestring
|
, bytestring
|
||||||
|
@ -94,9 +94,9 @@ executable example01
|
||||||
, Init
|
, Init
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
default-extensions: OverloadedStrings
|
default-extensions: OverloadedStrings
|
||||||
build-depends: base >=4.9
|
build-depends: base >=4.12
|
||||||
, affection
|
, affection
|
||||||
, sdl2
|
, sdl2 >=2.5.0.0
|
||||||
, linear
|
, linear
|
||||||
, spatial-math
|
, spatial-math
|
||||||
, bytestring
|
, bytestring
|
||||||
|
@ -126,9 +126,9 @@ executable example02
|
||||||
, Logging
|
, Logging
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
default-extensions: OverloadedStrings
|
default-extensions: OverloadedStrings
|
||||||
build-depends: base >=4.9
|
build-depends: base >=4.12
|
||||||
, affection
|
, affection
|
||||||
, sdl2
|
, sdl2 >=2.5.0.0
|
||||||
, linear
|
, linear
|
||||||
, spatial-math
|
, spatial-math
|
||||||
, bytestring
|
, bytestring
|
||||||
|
|
42
shell.nix
42
shell.nix
|
@ -4,21 +4,17 @@ let
|
||||||
|
|
||||||
inherit (nixpkgs) pkgs;
|
inherit (nixpkgs) pkgs;
|
||||||
|
|
||||||
affectionNeko = with haskellPackages; callPackage ({ mkDerivation
|
affection = with haskellPackages; callPackage(
|
||||||
, base, bytestring, clock, containers, glib, linear, monad-loops, monad-parallel
|
{ mkDerivation, base, bytestring, clock, containers, glib, linear
|
||||||
, mtl, OpenGL, sdl2, stdenv, stm, text, uuid, vector }:
|
, monad-loops, monad-parallel, mtl, OpenGL, sdl2, stdenv, stm, text
|
||||||
|
, uuid, vector
|
||||||
|
}:
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
pname = "affection";
|
pname = "affection";
|
||||||
version = "0.0.0.9";
|
version = "0.0.0.9";
|
||||||
#src = pkgs.fetchFromGitHub {
|
|
||||||
# owner = "nek0";
|
|
||||||
# repo = "affection";
|
|
||||||
# rev = "33c99b8888328e4ed17f5c65ac49f5eab2645549";
|
|
||||||
# sha256 = "0psqxqj1a8l5fia49ay2pb72kjnw5i54m6dcmrpz5hi1654aznll";
|
|
||||||
#};
|
|
||||||
src = ../affection;
|
src = ../affection;
|
||||||
revision = "1";
|
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
libraryHaskellDepends = [
|
libraryHaskellDepends = [
|
||||||
base bytestring clock containers glib linear monad-loops
|
base bytestring clock containers glib linear monad-loops
|
||||||
monad-parallel mtl OpenGL sdl2 stm text uuid vector
|
monad-parallel mtl OpenGL sdl2 stm text uuid vector
|
||||||
|
@ -66,9 +62,26 @@ let
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
|
|
||||||
|
shoot = with haskellPackages; callPackage(
|
||||||
|
{ mkDerivation, base, inline-c, inline-c-cpp, linear
|
||||||
|
, stdenv, nbullet
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "shoot";
|
||||||
|
version = "0.0.0.0";
|
||||||
|
src = ../shoot;
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
libraryHaskellDepends = [ base inline-c inline-c-cpp linear ];
|
||||||
|
#librarySystemDepends = [ nbullet ];
|
||||||
|
libraryPkgconfigDepends = [ nbullet ];
|
||||||
|
description = "Haskell bindings to bullet library";
|
||||||
|
license = stdenv.lib.licenses.lgpl3;
|
||||||
|
}) {nbullet = pkgs.bullet;};
|
||||||
|
|
||||||
f = { mkDerivation, base, bytestring, GLUtil, linear
|
f = { mkDerivation, base, bytestring, GLUtil, linear
|
||||||
, OpenGL, OpenGLRaw, optparse-applicative, random, sdl2
|
, OpenGL, OpenGLRaw, random, sdl2, spatial-math, stdenv
|
||||||
, split, stdenv, vector, wavefront
|
, vector, wavefront
|
||||||
}:
|
}:
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
pname = "hw";
|
pname = "hw";
|
||||||
|
@ -81,6 +94,11 @@ let
|
||||||
affectionNeko base bytestring GLUtil linear OpenGL OpenGLRaw
|
affectionNeko base bytestring GLUtil linear OpenGL OpenGLRaw
|
||||||
optparse-applicative random sdl2 shootNeko spatial split vector
|
optparse-applicative random sdl2 shootNeko spatial split vector
|
||||||
wavefront
|
wavefront
|
||||||
|
isLibrary = false;
|
||||||
|
isExecutable = true;
|
||||||
|
executableHaskellDepends = [
|
||||||
|
affection base bytestring GLUtil linear OpenGL OpenGLRaw random
|
||||||
|
sdl2 shoot spatial-math vector wavefront
|
||||||
];
|
];
|
||||||
license = stdenv.lib.licenses.gpl3;
|
license = stdenv.lib.licenses.gpl3;
|
||||||
};
|
};
|
||||||
|
|
16
src/Main.hs
16
src/Main.hs
|
@ -31,12 +31,16 @@ main =
|
||||||
withAffection AffectionConfig
|
withAffection AffectionConfig
|
||||||
{ initComponents = All
|
{ initComponents = All
|
||||||
, windowTitle = "hw"
|
, windowTitle = "hw"
|
||||||
, windowConfig = SDL.defaultWindow
|
, windowConfigs =
|
||||||
{ SDL.windowInitialSize = SDL.V2 1600 900
|
[ ( 0
|
||||||
, SDL.windowOpenGL = Just SDL.defaultOpenGL
|
, SDL.defaultWindow
|
||||||
{ SDL.glProfile = SDL.Core SDL.Normal 3 3
|
{ SDL.windowInitialSize = SDL.V2 1600 900
|
||||||
}
|
, SDL.windowGraphicsContext = SDL.OpenGLContext SDL.defaultOpenGL
|
||||||
}
|
{ SDL.glProfile = SDL.Core SDL.Normal 3 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
, initScreenMode = SDL.Fullscreen
|
, initScreenMode = SDL.Fullscreen
|
||||||
, preLoop = return ()
|
, preLoop = return ()
|
||||||
, eventLoop = mapM_ handle
|
, eventLoop = mapM_ handle
|
||||||
|
|
Loading…
Reference in a new issue