typograffiti 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+6/−6 lines, 2 files
Files
- src/Typograffiti/GL.hs +4/−4
- typograffiti.cabal +2/−2
src/Typograffiti/GL.hs view
@@ -4,7 +4,8 @@ module Typograffiti.GL where import Control.Exception (assert)-import Control.Monad (forM_, when, replicateM)+import Control.Monad (forM_, replicateM, when)+import Control.Monad.Fail (MonadFail) import Control.Monad.IO.Class (MonadIO (..)) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B8@@ -24,7 +25,7 @@ import Linear.V (Finite, Size, dim, toV) -allocAndActivateTex :: MonadIO m => GLenum -> m GLuint+allocAndActivateTex :: (MonadIO m, MonadFail m) => GLenum -> m GLuint allocAndActivateTex u = do [t] <- liftIO $ allocaArray 1 $ \ptr -> do glGenTextures 1 ptr@@ -42,8 +43,7 @@ assert False $ return () -newBoundVAO- :: MonadIO m => m GLuint+newBoundVAO :: (MonadIO m, MonadFail m) => m GLuint newBoundVAO = do [vao] <- liftIO $ allocaArray 1 $ \ptr -> do glGenVertexArrays 1 ptr
typograffiti.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 055bf77ba100e5fea74a7d628f920e9b871482639d2d4be4f35e05f883b816ba+-- hash: 210575516c085c128b78c545ded6d51ae7050d3e4201946d0538efea8266888b name: typograffiti-version: 0.1.0.1+version: 0.1.0.2 synopsis: Just let me draw nice text already description: This is a text rendering library that uses OpenGL and freetype2 to render TTF font strings quickly. It is fast enough to render large chunks of text in real time. This library exists because text rendering is one of the biggest hurdles in Haskell graphics programming - and it shouldn't be! Typograffiti includes an MTL style typeclass and a default monad transformer. It does not assume you are using any specific windowing solution. It does assume you are using OpenGL 3.3+.