summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/inputpair.h
blob: c4664beb2b98db7c737e9e6a6efb53069fd13cdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
//  inputpair.h - BGFX sampler-and-texture pair
//
//  Keeps track of the texture which is bound to the sampler
//  which is bound to the specified stage index.
//
//============================================================

#pragma once

#ifndef __DRAWBGFX_INPUT_PAIR__
#define __DRAWBGFX_INPUT_PAIR__

#include <string>

class bgfx_effect;
class texture_manager;

class bgfx_input_pair
{
public:
	bgfx_input_pair(int index, std::string sampler, std::string texture);

	void bind(bgfx_effect *effect, texture_manager& textures, const int32_t screen) const;

    // Getters
    std::string sampler() const { return m_sampler; }
    std::string texture() const { return m_texture; }

private:
	int         m_index;
	std::string m_sampler;
	std::string m_texture;
};

#endif // __DRAWBGFX_INPUT_PAIR__