Browse Source

Slightly reordered and crosslinked Renderer functions.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
8aab09a10c
  1. 8
      src/Renderer.cpp
  2. 21
      src/Renderer.h

8
src/Renderer.cpp

@ -46,10 +46,6 @@ void Renderer::setFeature(const Feature feature, const bool enabled) {
enabled ? glEnable(GLenum(feature)) : glDisable(GLenum(feature)); enabled ? glEnable(GLenum(feature)) : glDisable(GLenum(feature));
} }
void Renderer::setFaceCullingMode(const PolygonFacing mode) {
glCullFace(GLenum(mode));
}
void Renderer::setClearColor(const Color4<>& color) { void Renderer::setClearColor(const Color4<>& color) {
glClearColor(color.r(), color.g(), color.b(), color.a()); glClearColor(color.r(), color.g(), color.b(), color.a());
} }
@ -68,6 +64,10 @@ void Renderer::setFrontFace(const FrontFace mode) {
glFrontFace(GLenum(mode)); glFrontFace(GLenum(mode));
} }
void Renderer::setFaceCullingMode(const PolygonFacing mode) {
glCullFace(GLenum(mode));
}
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void Renderer::setProvokingVertex(const ProvokingVertex mode) { void Renderer::setProvokingVertex(const ProvokingVertex mode) {
glProvokingVertex(GLenum(mode)); glProvokingVertex(GLenum(mode));

21
src/Renderer.h

@ -192,15 +192,6 @@ class MAGNUM_EXPORT Renderer {
*/ */
static void setFeature(Feature feature, bool enabled); static void setFeature(Feature feature, bool enabled);
/**
* @brief Which polygon facing to cull
*
* Initial value is @ref PolygonFacing "PolygonFacing::Back". If set to
* both front and back, only points and lines are drawn.
* @see @ref Feature "Feature::FaceCulling", @fn_gl{CullFace}
*/
static void setFaceCullingMode(PolygonFacing mode);
/*@}*/ /*@}*/
/** @{ @name Clearing values */ /** @{ @name Clearing values */
@ -264,10 +255,20 @@ class MAGNUM_EXPORT Renderer {
* @brief Set front-facing polygon winding * @brief Set front-facing polygon winding
* *
* Initial value is `FrontFace::%CounterClockWise`. * Initial value is `FrontFace::%CounterClockWise`.
* @see @fn_gl{FrontFace} * @see setFaceCullingMode(), @fn_gl{FrontFace}
*/ */
static void setFrontFace(FrontFace mode); static void setFrontFace(FrontFace mode);
/**
* @brief Which polygon facing to cull
*
* Initial value is @ref PolygonFacing "PolygonFacing::Back". If set to
* both front and back, only points and lines are drawn.
* @see @ref Feature "Feature::FaceCulling", setFrontFace(),
* @fn_gl{CullFace}
*/
static void setFaceCullingMode(PolygonFacing mode);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**
* @brief Provoking vertex * @brief Provoking vertex

Loading…
Cancel
Save