Program Listing for File rasterizer-state-info.h

Return to documentation for file (include\playback\resource-info\rasterizer-state-info.h)

/******************************************************************************

(c) Intel Corporation.

This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.

 This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.

******************************************************************************/

#pragma once

#include "playback/resource-info/resource-info.h"
#include "playback/resource-info/detail/span.h"

namespace gpa {
namespace playback {

class RasterizerStateInfo final
    : public ResourceInfo
{
public:
    TypeId GetTypeId() const override final;

    api_types::FillMode fillMode{api_types::GPA_FILL_UNKNOWN};
    api_types::CullMode cullMode{api_types::GPA_CULL_UNKNOWN};
    bool frontCounterClockwise{false};
    int32_t depthBias{0};
    float depthBiasClamp{0};
    float slopeScaledDepthBias{0};
    bool depthClipEnable{false};
    bool scissorEnable{false};
    bool multisampleEnable{false};
    bool antialiasedLineEnable{false};
};

namespace detail {

template<>
inline auto MakeTuple<RasterizerStateInfo>(const RasterizerStateInfo& rasterizerStateInfo)
{
    return std::make_tuple(
        rasterizerStateInfo.fillMode,
        rasterizerStateInfo.cullMode,
        rasterizerStateInfo.frontCounterClockwise,
        rasterizerStateInfo.depthBias,
        rasterizerStateInfo.depthBiasClamp,
        rasterizerStateInfo.slopeScaledDepthBias,
        rasterizerStateInfo.depthClipEnable,
        rasterizerStateInfo.scissorEnable,
        rasterizerStateInfo.multisampleEnable,
        rasterizerStateInfo.antialiasedLineEnable);
}

}  // namespace detail
}  // namespace playback
}  // namespace gpa