|
|
|
@ -53,6 +53,20 @@ class MAGNUM_EXPORT Framebuffer { |
|
|
|
Framebuffer& operator=(Framebuffer&& other) = delete; |
|
|
|
Framebuffer& operator=(Framebuffer&& other) = delete; |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Affected polygon facing for culling, stencil operations and masks |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @see setFaceCullingMode(), |
|
|
|
|
|
|
|
* setStencilFunction(PolygonFacing, StencilFunction, GLint, GLuint), |
|
|
|
|
|
|
|
* setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation), |
|
|
|
|
|
|
|
* setStencilMask(PolygonFacing, GLuint) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
enum class PolygonFacing: GLenum { |
|
|
|
|
|
|
|
Front = GL_FRONT, /**< Front-facing polygons */ |
|
|
|
|
|
|
|
Back = GL_BACK, /**< Back-facing polygons */ |
|
|
|
|
|
|
|
FrontAndBack = GL_FRONT_AND_BACK /**< Front- and back-facing polygons */ |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** @{ @name Framebuffer features */ |
|
|
|
/** @{ @name Framebuffer features */ |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -100,6 +114,17 @@ class MAGNUM_EXPORT Framebuffer { |
|
|
|
enabled ? glEnable(static_cast<GLenum>(feature)) : glDisable(static_cast<GLenum>(feature)); |
|
|
|
enabled ? glEnable(static_cast<GLenum>(feature)) : glDisable(static_cast<GLenum>(feature)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Which polygon facing to cull |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Initial value is `PolygonFacing::Back`. If set to both front and |
|
|
|
|
|
|
|
* back, only points and lines are drawn. |
|
|
|
|
|
|
|
* @attention You have to also enable face culling with setFeature(). |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
inline static void setFaceCullingMode(PolygonFacing mode) { |
|
|
|
|
|
|
|
glCullFace(static_cast<GLenum>(mode)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Set viewport size |
|
|
|
* @brief Set viewport size |
|
|
|
* |
|
|
|
* |
|
|
|
@ -190,19 +215,6 @@ class MAGNUM_EXPORT Framebuffer { |
|
|
|
|
|
|
|
|
|
|
|
/** @{ @name Stencil operations */ |
|
|
|
/** @{ @name Stencil operations */ |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Affected polygon facing for stencil operations and masks |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @see setStencilFunction(PolygonFacing, StencilFunction, GLint, GLuint), |
|
|
|
|
|
|
|
* setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation), |
|
|
|
|
|
|
|
* setStencilMask(PolygonFacing, GLuint) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
enum class PolygonFacing: GLenum { |
|
|
|
|
|
|
|
Front = GL_FRONT, /**< Front-facing polygons */ |
|
|
|
|
|
|
|
Back = GL_BACK, /**< Back-facing polygons */ |
|
|
|
|
|
|
|
FrontAndBack = GL_FRONT_AND_BACK /**< Front- and back-facing polygons */ |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Stencil function |
|
|
|
* @brief Stencil function |
|
|
|
* |
|
|
|
* |
|
|
|
|