<commit_before>// Copyright 2015-2018 <NAME>. All rights reserved.

#pragma once

#include <cassert>
#include <memory>
#include "graphics/BlendState.hpp"
#include "graphics/Buffer.hpp"
#include "graphics/RenderTarget.hpp"
#include "graphics/Shader.hpp"
#include "graphics/Texture.hpp"

namespace ouzel
{
    namespace graphics
    {
        struct Command
        {
            enum Type
            {
                INIT_RENDER_TARGET,
                SET_RENDER_TARGET_PARAMETERS,
                SET_RENDER_TARGET,
                CLEAR,
                BLIT,
                COMPUTE,
                SET_CULL_MODE,
                SET_FILL_MODE,
                SET_SCISSOR_TEST,
                SET_VIEWPORT,
                SET_DEPTH_STATE,
                SET_PIPELINE_STATE,
                DRAW,
                PUSH_DEBUG_MARKER,
                POP_DEBUG_MARKER,
                INIT_BLEND_STATE,
                INIT_BUFFER,
                SET_BUFFER_DATA,
                INIT_SHADER,
                SET_SHADER_CONSTANTS,
                INIT_TEXTURE,
                SET_TEXTURE_DATA,
                SET_TEXTURE_PARAMETERS,
                SET_TEXTURES
            };

            Command(Type initType):
                type(initType)
            {
            }

            const Type type;
        };

        struct InitRenderTargetCommand: public Command
        {
            InitRenderTargetCommand(RenderTarget* initRenderTarget):
                Command(Command::Type::INIT_RENDER_TARGET),
                renderTarget(initRenderTarget)
            {
            }

            RenderTarget* renderTarget;
            uint32_t width;
            uint32_t height;
        };

        struct SetRenderTargetParametersCommand: public Command
        {
            SetRenderTargetParametersCommand(RenderTarget* initRenderTarget):
                Command(Command::Type::SET_RENDER_TARGET_PARAMETERS),
                renderTarget(initRenderTarget)
            {
            }

            RenderTarget* renderTarget;
        };

        struct SetRenderTargetCommand: public Command
        {
            SetRenderTargetCommand(TextureResource* initRenderTarget):<commit_msg>Add attributes to render target commands<commit_after>// Copyright 2015-2018 <NAME>. All rights reserved.

#pragma once

#include <cassert>
#include <memory>
#include "graphics/BlendState.hpp"
#include "graphics/Buffer.hpp"
#include "graphics/RenderTarget.hpp"
#include "graphics/Shader.hpp"
#include "graphics/Texture.hpp"

namespace ouzel
{
    namespace graphics
    {
        struct Command
        {
            enum Type
            {
                INIT_RENDER_TARGET,
                SET_RENDER_TARGET_PARAMETERS,
                SET_RENDER_TARGET,
                CLEAR,
                BLIT,
                COMPUTE,
                SET_CULL_MODE,
                SET_FILL_MODE,
                SET_SCISSOR_TEST,
                SET_VIEWPORT,
                SET_DEPTH_STATE,
                SET_PIPELINE_STATE,
                DRAW,
                PUSH_DEBUG_MARKER,
                POP_DEBUG_MARKER,
                INIT_BLEND_STATE,
                INIT_BUFFER,
                SET_BUFFER_DATA,
                INIT_SHADER,
                SET_SHADER_CONSTANTS,
                INIT_TEXTURE,
                SET_TEXTURE_DATA,
                SET_TEXTURE_PARAMETERS,
                SET_TEXTURES
            };

            Command(Type initType):
                type(initType)
            {
            }

            const Type type;
        };

        struct InitRenderTargetCommand: public Command
        {
            InitRenderTargetCommand(RenderTarget* initRenderTarget,
                                    uint32_t initWidth,
                                    uint32_t initHeight,
                                    uint32_t initSampleCount,
                                    PixelFormat initPixelFormat):
                Command(Command::Type::INIT_RENDER_TARGET),
                renderTarget(initRenderTarget),
                width(initWidth),
                height(initHeight),
                sampleCount(initSampleCount),
                pixelFormat(initPixelFormat)
            {
            }

            RenderTarget* renderTarget;
            uint32_t width;
            uint32_t height;
            uint32_t sampleCount;
            PixelFormat pixelFormat;
        };

        struct SetRenderTargetParametersCommand: public Command
        {
            SetRenderTargetParametersCommand(RenderTarget* initRenderTarget,
                                             uint32_t initWidth,
                                             uint32_t initHeight,
                                             uint32_t initSampleCount,
                                             PixelFormat initPixelFormat):
                Command(Command::Type::SET_RENDER_TARGET_PARAMETERS),
                renderTarget(initRenderTarget),
                width(initWidth),
                height(initHeight),
                sampleCount(initSampleCount),
                pixelFormat(initPixelFormat)
            {
            }

            RenderTarget* renderTarget;
            uint32_t width;
            uint32_t height;
            uint32_t sampleCount;
            PixelFormat pixelFormat;
        };

        struct SetRenderTargetCommand: public Command
        {
            SetRenderTargetCommand(TextureResource* initRenderTarget):
{'fraction_non_alphanumeric': 0.05490483162518302, 'fraction_numerical': 0.008052708638360176, 'mean_word_length': 1.294290512174643, 'pattern_counts': {'":': 0, '<': 9, '<?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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3691670', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1277, 'n_words': 222}