OpenGL-2.8.0.0: A binding for the OpenGL graphics system

Safe Haskell | None

Graphics.Rendering.OpenGL.GL.QueryObjects

Contents

- Conditional rendering

Description

Synopsis

- data QueryObject
- data QueryTarget
  - = SamplesPassed
  - | TransformFeedbackPrimitivesWritten
  - | PrimitivesGenerated
- marshalQueryTarget :: QueryTarget -> GLenum
- beginQuery :: QueryTarget -> QueryObject -> IO ()
- endQuery :: QueryTarget -> IO ()
- withQuery :: QueryTarget -> QueryObject -> IO a -> IO a
- queryCounterBits :: QueryTarget -> GettableStateVar GLsizei
- currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)
- queryResult :: QueryObject -> GettableStateVar GLuint
- queryResultAvailable :: QueryObject -> GettableStateVar Bool
- data ConditionalRenderMode
  - = QueryWait
  - | QueryNoWait
  - | QueryByRegionWait
  - | QueryByRegionNoWait
- beginConditionalRender :: QueryObject -> ConditionalRenderMode -> IO ()
- endConditionalRender :: IO ()
- withConditionalRender :: QueryObject -> ConditionalRenderMode -> IO a -> IO a

# Documentation

data QueryObject

Instances

Eq QueryObject |
Ord QueryObject |
Show QueryObject |
ObjectName QueryObject |

data QueryTarget

Constructors

SamplesPassed |
TransformFeedbackPrimitivesWritten |
PrimitivesGenerated |

Instances

Eq QueryTarget |
Ord QueryTarget |
Show QueryTarget |

marshalQueryTarget :: QueryTarget -> GLenum

beginQuery :: QueryTarget -> QueryObject -> IO ()

endQuery :: QueryTarget -> IO ()

withQuery :: QueryTarget -> QueryObject -> IO a -> IO a

Convenience function for an exception-safe combination of `beginQuery` and `endQuery`.

queryCounterBits :: QueryTarget -> GettableStateVar GLsizei

currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)

queryResult :: QueryObject -> GettableStateVar GLuint

queryResultAvailable :: QueryObject -> GettableStateVar Bool

# Conditional rendering

data ConditionalRenderMode

Constructors

QueryWait |
QueryNoWait |
QueryByRegionWait |
QueryByRegionNoWait |

beginConditionalRender :: QueryObject -> ConditionalRenderMode -> IO ()

endConditionalRender :: IO ()

withConditionalRender :: QueryObject -> ConditionalRenderMode -> IO a -> IO a