mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-08 13:46:58 +00:00
Use shader API for GUI text.
Flip GUI quads so we don't have to disable back-face culling. This was SVN commit r10989.
This commit is contained in:
@@ -173,6 +173,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual int GetTextureUnit(texture_id_t id)
|
||||
{
|
||||
return GetUniformFragmentIndex(id);
|
||||
}
|
||||
|
||||
virtual Binding GetUniformBinding(uniform_id_t id)
|
||||
{
|
||||
return Binding(GetUniformVertexIndex(id), GetUniformFragmentIndex(id));
|
||||
@@ -438,6 +443,15 @@ public:
|
||||
glBindTexture(it->second.first, tex);
|
||||
}
|
||||
|
||||
virtual int GetTextureUnit(texture_id_t id)
|
||||
{
|
||||
std::map<CStr, std::pair<GLenum, int> >::iterator it = m_Samplers.find(id);
|
||||
if (it == m_Samplers.end())
|
||||
return -1;
|
||||
|
||||
return it->second.second;
|
||||
}
|
||||
|
||||
virtual Binding GetUniformBinding(uniform_id_t id)
|
||||
{
|
||||
int loc = GetUniformLocation(id);
|
||||
|
||||
Reference in New Issue
Block a user