summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/vertex.h
blob: 2e0eb9e01dc8d23172fc6c351595d9d17d6d969e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; pad
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
//  vertex.h - BGFX screen vertex data
//
//============================================================

#pragma once

#ifndef __DRAWBGFX_VERTEX__
#define __DRAWBGFX_VERTEX__

#include <bgfx/bgfx.h>

struct ScreenVertex {
	float m_x;
	float m_y;
	float m_z;
	UINT32 m_rgba;
	float m_u;
	float m_v;

	static void init() {
		ms_decl.begin()
			.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
			.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
			.add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
			.end();
	}

	static bgfx::VertexDecl ms_decl;
};

#endif // __DRAWBGFX_VERTEX__