| @@ -180,11 +180,16 @@ ivec2 TileSet::GetTextureSize() const | |||||
| return m_data->m_texture_size; | return m_data->m_texture_size; | ||||
| } | } | ||||
| ShaderTexture TileSet::GetTexture() const | |||||
| ShaderTexture TileSet::GetShaderTexture() const | |||||
| { | { | ||||
| return m_data->m_texture->GetTexture(); | return m_data->m_texture->GetTexture(); | ||||
| } | } | ||||
| Texture const * TileSet::GetTexture() const | |||||
| { | |||||
| return m_data->m_texture; | |||||
| } | |||||
| void TileSet::Bind() | void TileSet::Bind() | ||||
| { | { | ||||
| if (!m_data->m_image && m_data->m_texture) | if (!m_data->m_image && m_data->m_texture) | ||||
| @@ -49,7 +49,8 @@ public: | |||||
| ivec2 GetTileSize(int tileid) const; | ivec2 GetTileSize(int tileid) const; | ||||
| ivec2 GetTextureSize() const; | ivec2 GetTextureSize() const; | ||||
| ShaderTexture GetTexture() const; | |||||
| ShaderTexture GetShaderTexture() const; | |||||
| Texture const * GetTexture() const; | |||||
| void Bind(); | void Bind(); | ||||
| void Unbind(); | void Unbind(); | ||||
| void BlitTile(uint32_t id, vec3 pos, int o, vec2 scale, float angle, | void BlitTile(uint32_t id, vec3 pos, int o, vec2 scale, float angle, | ||||
| @@ -585,7 +585,7 @@ void BtPhysTest::TickDraw(float seconds) | |||||
| (1 << VertexUsage::TexCoord) | | (1 << VertexUsage::TexCoord) | | ||||
| (1 << VertexUsage::TexCoordExt)), | (1 << VertexUsage::TexCoordExt)), | ||||
| m_cat_shader); | m_cat_shader); | ||||
| m_cat_sdata->m_shader_texture = m_cat_texture->GetTexture(); | |||||
| m_cat_sdata->m_shader_texture = m_cat_texture->GetShaderTexture(); | |||||
| m_cat_sdata->m_sprite_flip = ((rand(2) == 1)?(1.f):(0.f)) / (float)(NB_SPRITE * PARTICLE_SIZE); | m_cat_sdata->m_sprite_flip = ((rand(2) == 1)?(1.f):(0.f)) / (float)(NB_SPRITE * PARTICLE_SIZE); | ||||
| PhysObj->SetCustomShaderData(m_cat_sdata); | PhysObj->SetCustomShaderData(m_cat_sdata); | ||||
| m_cat_sdata = NULL; | m_cat_sdata = NULL; | ||||