<commit_before>// Copyright (C) 2016 <NAME>
// This file is part of the Ouzel engine.

#include "Noncopyable.h"

#pragma once

namespace ouzel
{
    namespace video
    {
        class Renderer;

        class BlendState: public Noncopyable
        {
            friend Renderer;
        public:
            enum class BlendFactor
            {
                ZERO              = 1,
                ONE               = 2,
                SRC_COLOR         = 3,
                INV_SRC_COLOR     = 4,
                SRC_ALPHA         = 5,
                INV_SRC_ALPHA     = 6,
                DEST_ALPHA        = 7,
                INV_DEST_ALPHA    = 8,
                DEST_COLOR        = 9,
                INV_DEST_COLOR    = 10,
                SRC_ALPHA_SAT     = 11,
                BLEND_FACTOR      = 14,
                INV_BLEND_FACTOR  = 15
            };

            enum class BlendOperation
            {
                ADD           = 1,
                SUBTRACT      = 2,
                REV_SUBTRACT  = 3,
                MIN           = 4,
                MAX           = 5
            };

            virtual ~BlendState() {}

            virtual bool init(bool enableBlending,
                              BlendFactor colorBlendSource, BlendFactor colorBlendDest,
                              BlendOperation colorOperation,
                              BlendFactor alphaBlendSource, BlendFactor alphaBlendDest,
                              BlendOperation alphaOperation);

            bool isBlendingEnabled() const { return _enableBlending; }
            BlendFactor getColorBlendSource() const { return _colorBlendSource; }
            BlendFactor getColorBlendDest() const { return _colorBlendDest; }
            BlendOperation getColorOperation() const { return _colorOperation; }
            BlendFactor getAlphaBlendSource() const { return _alphaBlendSource; }
            BlendFactor getAlphaBlendDest() const { return _alphaBlendDest; }
            BlendOperation getAlphaOperation() const { return _alphaOperation; }

        protected:
            BlendState();

            bool _enableBlending = false;
            BlendFactor _colorBlendSource;
            BlendFactor _colorBlendDest;
            BlendOperation _colorOperation;
            BlendFactor _alphaBlendSource;
            BlendFactor _alphaBlendDest;
            BlendOperation _alphaOperation;

        };
    } // namespace video
} // namespace ouzel<commit_msg>Set default values for OpenGL blend state<commit_after>// Copyright (C) 2016 <NAME>
// This file is part of the Ouzel engine.

#include "Noncopyable.h"

#pragma once

namespace ouzel
{
    namespace video
    {
        class Renderer;

        class BlendState: public Noncopyable
        {
            friend Renderer;
        public:
            enum class BlendFactor
            {
                ZERO              = 1,
                ONE               = 2,
                SRC_COLOR         = 3,
                INV_SRC_COLOR     = 4,
                SRC_ALPHA         = 5,
                INV_SRC_ALPHA     = 6,
                DEST_ALPHA        = 7,
                INV_DEST_ALPHA    = 8,
                DEST_COLOR        = 9,
                INV_DEST_COLOR    = 10,
                SRC_ALPHA_SAT     = 11,
                BLEND_FACTOR      = 14,
                INV_BLEND_FACTOR  = 15
            };

            enum class BlendOperation
            {
                ADD           = 1,
                SUBTRACT      = 2,
                REV_SUBTRACT  = 3,
                MIN           = 4,
                MAX           = 5
            };

            virtual ~BlendState() {}

            virtual bool init(bool enableBlending,
                              BlendFactor colorBlendSource, BlendFactor colorBlendDest,
                              BlendOperation colorOperation,
                              BlendFactor alphaBlendSource, BlendFactor alphaBlendDest,
                              BlendOperation alphaOperation);

            bool isBlendingEnabled() const { return _enableBlending; }
            BlendFactor getColorBlendSource() const { return _colorBlendSource; }
            BlendFactor getColorBlendDest() const { return _colorBlendDest; }
            BlendOperation getColorOperation() const { return _colorOperation; }
            BlendFactor getAlphaBlendSource() const { return _alphaBlendSource; }
            BlendFactor getAlphaBlendDest() const { return _alphaBlendDest; }
            BlendOperation getAlphaOperation() const { return _alphaOperation; }

        protected:
            BlendState();

            bool _enableBlending = false;
            BlendFactor _colorBlendSource = BlendFactor::ONE;
            BlendFactor _colorBlendDest = BlendFactor::ZERO;
            BlendOperation _colorOperation = BlendOperation::ADD;
            BlendFactor _alphaBlendSource = BlendFactor::ONE;
            BlendFactor _alphaBlendDest = BlendFactor::ZERO;
            BlendOperation _alphaOperation = BlendOperation::ADD;

        };
    } // namespace video
} // namespace ouzel
{'fraction_non_alphanumeric': 0.05581761006289308, 'fraction_numerical': 0.010220125786163521, 'mean_word_length': 1.3226837060702876, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1259242', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1267, 'n_words': 303}