summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/inputpair.cpp
blob: 0077180c0ded6fe32e379657c19bf53de62a870f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "inputpair.h"
#include "texture.h"
#include "effect.h"

bgfx_input_pair::bgfx_input_pair(int index, std::string sampler, bgfx_texture* texture)
	: m_index(index)
	, m_sampler(sampler)
	, m_texture(texture)
{
}

void bgfx_input_pair::bind(bgfx_effect *effect)
{
	bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), m_texture->handle());
}