<commit_before>#ifndef Magnum_Camera_h
#define Magnum_Camera_h
/*
    Copyright © 2010, 2011, 2012 <NAME> <<EMAIL>>

    This file is part of Magnum.

    Magnum is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License version 3
    only, as published by the Free Software Foundation.

    Magnum is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License version 3 for more details.
*/

/** @file
 * @brief Class Magnum::Camera
 */

#include "Object.h"

#ifdef WIN32 /* I so HATE windows.h */
#undef near
#undef far
#endif

namespace Magnum {

/**
@brief %Camera object
 */
class MAGNUM_EXPORT Camera: public Object {
    public:
        /**
         * @brief Features
         *
         * If not specified otherwise, all features are disabled by default.
         * @see setFeature()
         */
        enum class Feature: GLenum {
            AlphaBlending = GL_BLEND,       /**< Alpha blending */

            /**
             * Depth clamping. If enabled, ignores near and far clipping plane.
             *
             * @requires_gl32 Extension @extension{ARB,depth_clamp}
             */
            DepthClamp = GL_DEPTH_CLAMP,

            DepthTest = GL_DEPTH_TEST,      /**< Depth test */
            StencilTest = GL_STENCIL_TEST,  /**< Stencil test */
            Dithering = GL_DITHER,          /**< Dithering (enabled by default) */
            FaceCulling = GL_CULL_FACE      /**< Back face culling */
        };

        /**
         * @brief Aspect ratio policy
         *
         * @see aspectRatioPolicy(), setAspectRatioPolicy()
         */
        enum class AspectRatioPolicy {
            NotPreserved,   /**< Don't preserve aspect ratio */
            Extend,         /**< Extend on larger side of view */
            Clip            /**< Clip on smaller side of view */
        };

        /** @brief Set feature */
        static void setFeature(Feature feature, bool enabled);

        /**
         * @brief Set clear color
         *
         * Initial value is `{0.0f, 0.0f, 0.0f, 1.0f}`.
         */
        inline static void setClearColor(const Vector4& color) {
            glClearColor(color.r(), color.g(), color.b(), color.a());
        }

        /**<commit_msg>Camera: added setters for depth and stencil clear value.<commit_after>#ifndef Magnum_Camera_h
#define Magnum_Camera_h
/*
    Copyright © 2010, 2011, 2012 <NAME> <<EMAIL>>

    This file is part of Magnum.

    Magnum is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License version 3
    only, as published by the Free Software Foundation.

    Magnum is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License version 3 for more details.
*/

/** @file
 * @brief Class Magnum::Camera
 */

#include "Object.h"

#ifdef WIN32 /* I so HATE windows.h */
#undef near
#undef far
#endif

namespace Magnum {

/**
@brief %Camera object
 */
class MAGNUM_EXPORT Camera: public Object {
    public:
        /**
         * @brief Features
         *
         * If not specified otherwise, all features are disabled by default.
         * @see setFeature()
         */
        enum class Feature: GLenum {
            AlphaBlending = GL_BLEND,       /**< Alpha blending */

            /**
             * Depth clamping. If enabled, ignores near and far clipping plane.
             *
             * @requires_gl32 Extension @extension{ARB,depth_clamp}
             */
            DepthClamp = GL_DEPTH_CLAMP,

            DepthTest = GL_DEPTH_TEST,      /**< Depth test */
            StencilTest = GL_STENCIL_TEST,  /**< Stencil test */
            Dithering = GL_DITHER,          /**< Dithering (enabled by default) */
            FaceCulling = GL_CULL_FACE      /**< Back face culling */
        };

        /**
         * @brief Aspect ratio policy
         *
         * @see aspectRatioPolicy(), setAspectRatioPolicy()
         */
        enum class AspectRatioPolicy {
            NotPreserved,   /**< Don't preserve aspect ratio */
            Extend,         /**< Extend on larger side of view */
            Clip            /**< Clip on smaller side of view */
        };

        /** @brief Set feature */
        static void setFeature(Feature feature, bool enabled);

        /**
         * @brief Set clear color
         *
         * Initial value is `{0.0f, 0.0f, 0.0f, 1.0f}`.
         */
        inline static void setClearColor(const Vector4& color) {
            glClearColor(color.r(), color.g(), color.b(), color.a());
        }

        /**
         * @brief Set clear depth
         *
         * Initial value is `1.0`.
         */
        inline static void setClearDepth(GLdouble depth) { glClearDepth(depth); }

        /**
         * @overload
         *
         * @requires_gl41 Extension @extension{ARB,ES2_compatibility}
         */
        inline static void setClearDepth(GLfloat depth) { glClearDepthf(depth); }

        /**
         * @brief Set clear stencil
         *
         * Initial value is `0`.
         */
        inline static void setClearStencil(GLint stencil) { glClearStencil(stencil); }

        /**
{'fraction_non_alphanumeric': 0.09688581314878893, 'fraction_numerical': 0.010926971407758149, 'mean_word_length': 1.8411795137092601, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5122367', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1470, 'n_words': 508}