|
|
|
|
@ -324,6 +324,25 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void enable(Feature feature); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Enable a feature for given draw buffer |
|
|
|
|
* @param feature Feature to enable |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* @see @ref disable(Feature, UnsignedInt), |
|
|
|
|
* @ref setFeature(Feature, UnsignedInt, bool), |
|
|
|
|
* @ref GL-Framebuffer-usage-multiple-outputs, |
|
|
|
|
* @fn_gl2_keyword{Enablei,Enable} |
|
|
|
|
* @requires_gl30 Extension @gl_extension{EXT,draw_buffers2} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void enable(Feature feature, UnsignedInt drawBuffer); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Disable a feature |
|
|
|
|
* |
|
|
|
|
@ -331,6 +350,25 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void disable(Feature feature); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Disable a feature for given draw buffer |
|
|
|
|
* @param feature Feature to disable |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* @see @ref enable(Feature, UnsignedInt), |
|
|
|
|
* @ref setFeature(Feature, UnsignedInt, bool), |
|
|
|
|
* @ref GL-Framebuffer-usage-multiple-outputs |
|
|
|
|
* @fn_gl2_keyword{Disablei,Disable} |
|
|
|
|
* @requires_gl30 Extension @gl_extension{EXT,draw_buffers2} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void disable(Feature feature, UnsignedInt drawBuffer); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Enable or disable a feature |
|
|
|
|
* |
|
|
|
|
@ -343,6 +381,24 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void setFeature(Feature feature, bool enabled); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Enable or disable a feature for given draw buffer |
|
|
|
|
* @param feature Feature to toggle |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @param enabled Enable or disable |
|
|
|
|
* |
|
|
|
|
* @see @ref enable(Feature, UnsignedInt), |
|
|
|
|
* @ref disable(Feature, UnsignedInt), |
|
|
|
|
* @ref GL-Framebuffer-usage-multiple-outputs |
|
|
|
|
* @requires_gl30 Extension @gl_extension{EXT,draw_buffers2} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void setFeature(Feature feature, UnsignedInt drawBuffer, bool enabled); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Hint |
|
|
|
|
* |
|
|
|
|
@ -784,15 +840,38 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Mask color writes |
|
|
|
|
* @param allowRed Allow red channel to be written |
|
|
|
|
* @param allowGreen Allow green channel to be written |
|
|
|
|
* @param allowBlue Allow blue channel to be written |
|
|
|
|
* @param allowAlpha Allow alpha channel to be written |
|
|
|
|
* |
|
|
|
|
* Set to @cpp false @ce to disallow writing to given color channel. |
|
|
|
|
* Initial values are all @cpp true @ce. |
|
|
|
|
* @see @ref setDepthMask(), @ref setStencilMask(), |
|
|
|
|
* @fn_gl_keyword{ColorMask} |
|
|
|
|
* @todo Masking only given draw buffer |
|
|
|
|
*/ |
|
|
|
|
static void setColorMask(GLboolean allowRed, GLboolean allowGreen, GLboolean allowBlue, GLboolean allowAlpha); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Mask color writes for given draw buffer |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @param allowRed Allow red channel to be written |
|
|
|
|
* @param allowGreen Allow green channel to be written |
|
|
|
|
* @param allowBlue Allow blue channel to be written |
|
|
|
|
* @param allowAlpha Allow alpha channel to be written |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* @see @ref GL-Framebuffer-usage-multiple-outputs, |
|
|
|
|
* @fn_gl2_keyword{ColorMaski,ColorMask} |
|
|
|
|
* @requires_gl30 Extension @gl_extension{EXT,draw_buffers2} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void setColorMask(UnsignedInt drawBuffer, GLboolean allowRed, GLboolean allowGreen, GLboolean allowBlue, GLboolean allowAlpha); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Mask depth writes |
|
|
|
|
* |
|
|
|
|
@ -1200,6 +1279,7 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend equation |
|
|
|
|
* @param equation Blend equation |
|
|
|
|
* |
|
|
|
|
* How to combine source color (pixel value) with destination color |
|
|
|
|
* (framebuffer). Initial value is @ref BlendEquation::Add. |
|
|
|
|
@ -1209,8 +1289,27 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void setBlendEquation(BlendEquation equation); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend equation for given draw buffer |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @param equation Blend equation |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* @see @ref GL-Framebuffer-usage-multiple-outputs, |
|
|
|
|
* @fn_gl2_keyword{BlendEquationi,BlendEquation} |
|
|
|
|
* @requires_gl40 Extension @gl_extension{ARB,draw_buffers_blend} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void setBlendEquation(UnsignedInt drawBuffer, BlendEquation equation); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend equation separately for RGB and alpha components |
|
|
|
|
* @param rgb Blend equation for RGB components |
|
|
|
|
* @param alpha Blend equation for the alpha component |
|
|
|
|
* |
|
|
|
|
* See @ref setBlendEquation(BlendEquation) for more information. |
|
|
|
|
* @see @ref Feature::Blending, @ref setBlendFunction(), |
|
|
|
|
@ -1218,6 +1317,24 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void setBlendEquation(BlendEquation rgb, BlendEquation alpha); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend equation for given draw buffer |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @param rgb Blend equation for RGB components |
|
|
|
|
* @param alpha Blend equation for the alpha component |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* @see @ref GL-Framebuffer-usage-multiple-outputs, |
|
|
|
|
* @fn_gl2_keyword{BlendEquationSeparatei,BlendEquationSeparate} |
|
|
|
|
* @requires_gl40 Extension @gl_extension{ARB,draw_buffers_blend} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void setBlendEquation(UnsignedInt drawBuffer, BlendEquation rgb, BlendEquation alpha); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend function |
|
|
|
|
* @param source How the source blending factor is computed |
|
|
|
|
@ -1233,6 +1350,28 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void setBlendFunction(BlendFunction source, BlendFunction destination); |
|
|
|
|
|
|
|
|
|
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) |
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend function for given draw buffer |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @param source How the source blending factor is computed |
|
|
|
|
* from pixel value |
|
|
|
|
* @param destination How the destination blending factor is |
|
|
|
|
* computed from framebuffer |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* See @ref setBlendFunction(BlendFunction, BlendFunction) for more |
|
|
|
|
* information. |
|
|
|
|
* @see @ref GL-Framebuffer-usage-multiple-outputs, |
|
|
|
|
* @fn_gl2_keyword{BlendFunci,BlendFunc} |
|
|
|
|
* @requires_gl40 Extension @gl_extension{ARB,draw_buffers_blend} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void setBlendFunction(UnsignedInt drawBuffer, BlendFunction source, BlendFunction destination); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend function separately for RGB and alpha components |
|
|
|
|
* |
|
|
|
|
@ -1243,6 +1382,30 @@ class MAGNUM_GL_EXPORT Renderer {
|
|
|
|
|
*/ |
|
|
|
|
static void setBlendFunction(BlendFunction sourceRgb, BlendFunction destinationRgb, BlendFunction sourceAlpha, BlendFunction destinationAlpha); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend function separately for RGB and alpha components for given draw buffer |
|
|
|
|
* @param drawBuffer Draw buffer index |
|
|
|
|
* @param sourceRgb How the source blending factor is computed |
|
|
|
|
* from pixel value for RGB components |
|
|
|
|
* @param sourceAlpha How the source blending factor is computed |
|
|
|
|
* from pixel value for the alpha component |
|
|
|
|
* @param destinationRgb How the destination blending factor is |
|
|
|
|
* computed from framebuffer for RGB components |
|
|
|
|
* @param destinationAlpha How the destination blending factor is |
|
|
|
|
* computed from framebuffer for the alpha component |
|
|
|
|
* @m_since_latest |
|
|
|
|
* |
|
|
|
|
* See @ref setBlendFunction(BlendFunction, BlendFunction) for more |
|
|
|
|
* information. |
|
|
|
|
* @see @ref GL-Framebuffer-usage-multiple-outputs, |
|
|
|
|
* @fn_gl2_keyword{BlendFuncSeparatei,BlendFuncSeparate} |
|
|
|
|
* @requires_gl40 Extension @gl_extension{ARB,draw_buffers_blend} |
|
|
|
|
* @requires_gles32 Extension @gl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
* @requires_webgl_extension WebGL 2.0 and extension |
|
|
|
|
* @webgl_extension{EXT,draw_buffers_indexed} |
|
|
|
|
*/ |
|
|
|
|
static void setBlendFunction(UnsignedInt drawBuffer, BlendFunction sourceRgb, BlendFunction destinationRgb, BlendFunction sourceAlpha, BlendFunction destinationAlpha); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set blend color |
|
|
|
|
* |
|
|
|
|
|