summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/clear.cpp
blob: 2e6b27a4fe30376e21dae59740f0e78f44cb209e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
//  clear.cpp - View clear info for a BGFX chain entry
//
//============================================================

#include "clear.h"

clear_state::clear_state(uint64_t flags, uint32_t color, float depth, uint8_t stencil)
	: m_flags(flags)
	, m_color(color)
	, m_depth(depth)
	, m_stencil(stencil)
{
}

void clear_state::bind(int view) const
{
	bgfx::setViewClear(view, m_flags, m_color, m_depth, m_stencil);
}