Browse Source

Improve query documentation, document type of all query targets.

pull/187/head^2
Vladimír Vondruš 10 years ago
parent
commit
0749afa2eb
  1. 5
      src/Magnum/AbstractQuery.h
  2. 9
      src/Magnum/PrimitiveQuery.h
  3. 15
      src/Magnum/SampleQuery.h
  4. 14
      src/Magnum/TimeQuery.h

5
src/Magnum/AbstractQuery.h

@ -136,11 +136,10 @@ class MAGNUM_EXPORT AbstractQuery: public AbstractObject {
* See @ref resultAvailable().
* @see @fn_gl{GetQueryObject} with @def_gl{QUERY_RESULT}
* @requires_gl33 Extension @extension{ARB,timer_query} for result
* type @ref Magnum::UnsignedInt "UnsignedInt" and @ref Magnum::Long
* "Long"
* type @ref Magnum::UnsignedLong "UnsignedLong" and @ref Magnum::Long "Long"
* @requires_es_extension Extension @es_extension{EXT,disjoint_timer_query}
* for result types @ref Magnum::Int "Int", @ref Magnum::UnsignedLong "UnsignedLong"
* @ref Magnum::Long "Long".
* and @ref Magnum::Long "Long".
* @requires_gles Only @ref Magnum::UnsignedInt "UnsignedInt" result
* type is available in WebGL.
*/

9
src/Magnum/PrimitiveQuery.h

@ -73,7 +73,8 @@ class PrimitiveQuery: public AbstractQuery {
#ifndef MAGNUM_TARGET_GLES2
/**
* Count of primitives generated from vertex shader or geometry
* shader.
* shader. Use @ref result<UnsignedInt>() or @ref result<Int>() to
* retrieve the result.
* @requires_gles30 Not defined in OpenGL ES 2.0.
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{EXT,geometry_shader}
@ -86,7 +87,11 @@ class PrimitiveQuery: public AbstractQuery {
#endif
#endif
/** Count of primitives written to transform feedback buffer. */
/**
* Count of primitives written to transform feedback buffer. Use
* @ref result<UnsignedInt>() or @ref result<Int>() to retrieve the
* result.
*/
TransformFeedbackPrimitivesWritten = GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
};

15
src/Magnum/SampleQuery.h

@ -86,7 +86,9 @@ class SampleQuery: public AbstractQuery {
enum class Target: GLenum {
#ifndef MAGNUM_TARGET_GLES
/**
* Count of samples passed from fragment shader
* Count of samples passed from fragment shader. Use
* @ref result<UnsignedInt>() or @ref result<Int>() to retrieve the
* result.
* @requires_gl Only boolean query is available in OpenGL ES and
* WebGL.
*/
@ -94,7 +96,8 @@ class SampleQuery: public AbstractQuery {
#endif
/**
* Whether any samples passed from fragment shader
* Whether any samples passed from fragment shader. Use
* @ref result<bool>() to retrieve the result.
* @requires_gl33 Extension @extension{ARB,occlusion_query2}
*/
#ifndef MAGNUM_TARGET_GLES2
@ -104,10 +107,10 @@ class SampleQuery: public AbstractQuery {
#endif
/**
* Whether any samples passed from fragment shader (conservative)
*
* An implementation may choose a less precise version of the
* test at the expense of some false positives.
* Whether any samples passed from fragment shader (conservative).
* An implementation may choose a less precise version of the test
* at the expense of some false positives. Use @ref result<bool>()
* to retrieve the result.
* @requires_gl43 Extension @extension{ARB,ES3_compatibility}
*/
#ifndef MAGNUM_TARGET_GLES2

14
src/Magnum/TimeQuery.h

@ -81,14 +81,22 @@ class TimeQuery: public AbstractQuery {
public:
/** @brief Query target */
enum class Target: GLenum {
/** Elapsed time */
/**
* Elapsed time. Use @ref result<UnsignedLong>() or @ref result<Long>()
* to retrieve the result.
* @see @ref timestamp()
*/
#ifndef MAGNUM_TARGET_GLES
TimeElapsed = GL_TIME_ELAPSED,
#else
TimeElapsed = GL_TIME_ELAPSED_EXT,
#endif
/** Timestamp (for use with @ref timestamp() only) */
/**
* Timestamp. For use with @ref timestamp() only, use
* @ref result<UnsignedLong>() or @ref result<Long>() to retrieve
* the result.
*/
#ifndef MAGNUM_TARGET_GLES
Timestamp = GL_TIMESTAMP
#else
@ -144,6 +152,8 @@ class TimeQuery: public AbstractQuery {
/**
* @brief Query timestamp
*
* Use @ref result<UnsignedLong>() or @ref result<Long>() to retrieve
* the result.
* @see @fn_gl{QueryCounter} with @def_gl{TIMESTAMP}
*/
void timestamp() {

Loading…
Cancel
Save