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 Source

Instances

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

data QueryTarget Source

Constructors

SamplesPassed |
TransformFeedbackPrimitivesWritten |
PrimitivesGenerated |

Instances

Eq QueryTarget |
Ord QueryTarget |
Show QueryTarget |

marshalQueryTarget :: QueryTarget -> GLenum Source

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

endQuery :: QueryTarget -> IO ()Source

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

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

queryCounterBits :: QueryTarget -> GettableStateVar GLsizei Source

currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)Source

queryResult :: QueryObject -> GettableStateVar GLuint Source

queryResultAvailable :: QueryObject -> GettableStateVar Bool Source

# Conditional rendering

data ConditionalRenderMode Source

Constructors

QueryWait |
QueryNoWait |
QueryByRegionWait |
QueryByRegionNoWait |

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

endConditionalRender :: IO ()Source

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