Implemented methods to retrieve the OpenGL handles from sf::Texture and sf::Shader.
This commit is contained in:
parent
650e792350
commit
c17486857f
4 changed files with 45 additions and 0 deletions
|
@ -456,6 +456,13 @@ void Shader::setParameter(const std::string& name, CurrentTextureType)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int Shader::getNativeHandle() const
|
||||
{
|
||||
return m_shaderProgram;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void Shader::bind(const Shader* shader)
|
||||
{
|
||||
|
@ -778,6 +785,13 @@ void Shader::setParameter(const std::string& name, CurrentTextureType)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int Shader::getNativeHandle() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void Shader::bind(const Shader* shader)
|
||||
{
|
||||
|
|
|
@ -563,6 +563,13 @@ Texture& Texture::operator =(const Texture& right)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int Texture::getNativeHandle() const
|
||||
{
|
||||
return m_texture;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int Texture::getValidSize(unsigned int size)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue