module Graphics.Rendering.Ombra.Draw.Class (
MonadDraw(..),
MonadDrawBuffers(..),
MonadRead(..)
) where
import Data.Word
import Graphics.Rendering.Ombra.Color
import Graphics.Rendering.Ombra.OutBuffer.Types
import Graphics.Rendering.Ombra.Geometry.Draw
import Graphics.Rendering.Ombra.Texture.Draw
import Graphics.Rendering.Ombra.Shader.Program
import Graphics.Rendering.Ombra.Screen
import Graphics.Rendering.Ombra.Vector
class ( MonadGeometry (m o)
, MonadProgram (m o)
, MonadTexture (m o)
, MonadScreen (m o)
) => MonadDraw o m where
withColorMask :: (Bool, Bool, Bool, Bool) -> m o a -> m o a
withDepthTest :: Bool -> m o a -> m o a
withDepthMask :: Bool -> m o a -> m o a
class MonadDrawBuffers m where
drawBuffers :: Int
-> Int
-> Either (GBuffer t o)
(GBufferInfo o)
-> Either (DepthBuffer t')
DepthBufferInfo
-> m o a
-> (forall t. GBuffer t o -> DepthBuffer t -> a -> m o' b)
-> m o' b
drawBuffers' :: Int
-> Int
-> Either (GBuffer t o) (GBufferInfo o)
-> Either (DepthBuffer t1) DepthBufferInfo
-> m o a
-> m o' (a, GBuffer t2 o, DepthBuffer t3)
class MonadDraw o m => MonadRead o m where
readColor :: (Int, Int, Int, Int) -> m o [Color]
readColorFloat :: (Int, Int, Int, Int) -> m o [Vec4]
readDepth :: (Int, Int, Int, Int) -> m o [Word16]
readDepthFloat :: (Int, Int, Int, Int) -> m o [Float]
readStencil :: (Int, Int, Int, Int) -> m o [Word8]