Beispiel #1
0
void renderer::set_xform(const xform &_xform)
{
	flash_vs::shape.xform = float4x2
	(
		_xform[0][0], _xform[0][1], _xform[0][2] - 10.f, 0,
		_xform[1][0], _xform[1][1], _xform[1][2] - 10.f, 0
	);
}
Beispiel #2
0
void renderer::set_texture(uint _ID, const xform &_txform)
{
	if (m_textures.exists(_ID))
	{
		texture &l_texture = m_textures.get(_ID);

		m_texset_ID = l_texture.texset_ID;

		flash_vs::shape.txform = float4x2
		(
			_txform[0][0], _txform[0][1], _txform[0][2], 0,
			_txform[1][0], _txform[1][1], _txform[1][2], 0
		);

		flash_vs::shape.tex_scale = float4
		(
			 float(1) / float(l_texture.width), float(1) / float(l_texture.height), 0, 0
		);
	}
	else
	{
		m_texset_ID = m_textures.get(m_deftexset_ID).texset_ID;
	}
}
Beispiel #3
0
float4x2 dqmake(const Pose &p) { return dqmul(float4x2({ 0, 0, 0, 1 }, float4(p.position / 2.0f, 0)), float4x2(p.orientation, { 0, 0, 0, 0 })); }