Commit 223ff400 authored by Marc Coiffier's avatar Marc Coiffier
Browse files

Small tweaks to the Logos codebase; update a link in the Curly documentation

parent f3487e08
No preview for this file type
[curly-package]: pkg/curly.tar.xz
[curly-linux-x86-64]: pkg/curly.tar.xz
......@@ -39,8 +39,7 @@ setUniformMat u (V4 (V4 a b c d) (V4 e f g h) (V4 i j k l) (V4 m n o p)) = do
m <- GL.newMatrix GL.ColumnMajor [a,e,i,m, b,f,j,n, c,g,k,o, d,h,l,p]
GL.uniform u $= (m :: GL.GLmatrix GL.GLfloat)
loadTexture (conv,gltype,glpformat,glpbase) file = do
imgbytes <- readChunk file
loadTexture (conv,gltype,glpformat,glpbase) imgbytes = do
let img = conv <$> decodeImage imgbytes
tex@(GL.TextureObject texi) <- GL.genObjectName
case img of
......@@ -307,9 +306,10 @@ runLogos (Texture isFloat) = do
case st of
StackSymbol file:st' -> do
runStackState (put st')
textureLoaded <- liftIO $ if isFloat
then loadTexture (convertRGBF,GL.RGB32F,GL.RGB,GL.Float) file
else loadTexture (convertRGBA8,GL.RGBA8,GL.RGBA,GL.UnsignedByte) file
textureLoaded <- liftIO $ do
readChunk file >>= if isFloat
then loadTexture (convertRGBF,GL.RGB32F,GL.RGB,GL.Float)
else loadTexture (convertRGBA8,GL.RGBA8,GL.RGBA,GL.UnsignedByte)
case textureLoaded of
Just tex -> runStackState $ modify (StackExtra (Opaque (TI tex)):)
Nothing -> unit
......@@ -13,7 +13,7 @@ cabal-version: >=1.10
exposed-modules: Data.Matricial Data.Font
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7, freetype2
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7, freetype2, vector
default-extensions: TypeSynonymInstances, NoMonomorphismRestriction, StandaloneDeriving, GeneralizedNewtypeDeriving, TypeOperators, RebindableSyntax, FlexibleInstances, FlexibleContexts, FunctionalDependencies, TupleSections, MultiParamTypeClasses, Rank2Types, AllowAmbiguousTypes, RoleAnnotations, ViewPatterns, LambdaCase
hs-source-dirs: src
default-language: Haskell2010
make -C curly/doc || exit
make doc || exit
# make doc || exit
function has_cmd() { which "$1" 2>/dev/null; }
if has_cmd sass; then scss=sass
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment