module Graphics.Rendering.Ombra.Draw (
module Graphics.Rendering.Ombra.OutBuffer,
Draw,
Ctx,
runDraw,
MonadDraw( withColorMask
, withDepthTest
, withDepthMask
, clearColor
, clearColorWith
, clearDepth
, clearDepthWith
, clearStencil
, clearStencilWith
),
MonadDrawBuffers(..),
MonadRead(..),
MonadScreen(resizeViewport),
CullFace(..),
MonadCulling(withCulling),
ResStatus(..),
preloadGeometry,
preloadTexture,
removeGeometry,
removeTexture,
checkGeometry,
checkTexture,
) where
import Graphics.Rendering.Ombra.Backend
import Graphics.Rendering.Ombra.Culling.Draw
import Graphics.Rendering.Ombra.Culling.Types
import Graphics.Rendering.Ombra.Draw.Class
import Graphics.Rendering.Ombra.Draw.Monad
import Graphics.Rendering.Ombra.Internal.GL (evalGL)
import Graphics.Rendering.Ombra.OutBuffer
import Graphics.Rendering.Ombra.Shader.Language.Types (GVec4)
import Graphics.Rendering.Ombra.Screen
runDraw :: GLES
=> Int
-> Int
-> Ctx
-> Draw GVec4 a
-> IO a
runDraw w h ctx a = flip evalGL ctx . evalDraw (drawInit >> a) $ drawState w h