Browse Source

Support for ARB_conditional_render_inverted (GL 4.5).

That was easy.
pull/68/head
Vladimír Vondruš 12 years ago
parent
commit
c08b1263e1
  1. 2
      doc/opengl-support.dox
  2. 40
      src/Magnum/SampleQuery.h

2
doc/opengl-support.dox

@ -210,7 +210,7 @@ following:
-------------------------------------------- | ------
@extension{ARB,ES3_1_compatibility} | |
@extension{ARB,clip_control} | |
@extension{ARB,conditional_render_inverted} | |
@extension{ARB,conditional_render_inverted} | done
@extension{ARB,cull_distance} | |
@extension{ARB,derivative_control} | done (shading language only)
@extension{ARB,direct_state_access} | |

40
src/Magnum/SampleQuery.h

@ -117,28 +117,58 @@ class SampleQuery: public AbstractQuery {
*/
enum class ConditionalRenderMode: GLenum {
/**
* If query result is not yet available, waits for it and
* then begins conditional rendering based on result value.
* If query result is not yet available, waits for it and then
* begins rendering only if result is nonzero.
*/
Wait = GL_QUERY_WAIT,
/**
* If query result is not yet available, OpenGL may begin
* rendering like if the result value was nonzero.
* If query result is not yet available, waits for it and then
* begins rendering only if result is zero.
* @requires_gl45 %Extension @extension{ARB,conditional_render_inverted}
*/
WaitInverted = GL_QUERY_WAIT_INVERTED,
/**
* If query result is not yet available, begins rendering like if
* the result was nonzero.
*/
NoWait = GL_QUERY_NO_WAIT,
/**
* If query result is not yet available, begins rendering like if
* the result was zero.
* @requires_gl45 %Extension @extension{ARB,conditional_render_inverted}
*/
NoWaitInverted = GL_QUERY_NO_WAIT_INVERTED,
/**
* The same as @ref ConditionalRenderMode::Wait, but regions
* untouched by the sample query may not be rendered at all.
*/
ByRegionWait = GL_QUERY_BY_REGION_WAIT,
/**
* The same as @ref ConditionalRenderMode::WaitInverted, but
* regions untouched by the sample query may not be rendered at
* all.
* @requires_gl45 %Extension @extension{ARB,conditional_render_inverted}
*/
ByRegionWaitInverted = GL_QUERY_BY_REGION_WAIT_INVERTED,
/**
* The same as @ref ConditionalRenderMode::NoWait, but regions
* untouched by the sample query may not be rendered at all.
*/
ByRegionNoWait = GL_QUERY_BY_REGION_NO_WAIT
ByRegionNoWait = GL_QUERY_BY_REGION_NO_WAIT,
/**
* The same as @ref ConditionalRenderMode::NoWaitInverted, but
* regions untouched by the sample query may not be rendered at
* all.
* @requires_gl45 %Extension @extension{ARB,conditional_render_inverted}
*/
ByRegionNoWaitInverted = GL_QUERY_BY_REGION_NO_WAIT_INVERTED
};
#endif

Loading…
Cancel
Save