#include <GLContextManager.hpp>
Collaboration diagram for BARE2D::GLContext:Public Member Functions | |
| GLContext () | |
| ~GLContext () | |
| void | setActiveTexture (GLenum texture) |
| Sets the active texture "slot". This can be GL_TEXTURE0 to GL_TEXTURE8 (I think. Check the literature) More... | |
| void | bindTexture (GLenum target, GLenum texture) |
| Binds a texture to target in the currently active texture slot. More... | |
| void | unbindTexture (GLenum target, GLenum textureslot) |
| Unbinds a texture. More... | |
| GLuint | getBoundTexture () |
Private Attributes | |
| GLenum | m_activeTexture = GL_TEXTURE0 |
| GLuint * | m_boundTextureIDs = nullptr |
Definition at line 7 of file GLContextManager.hpp.
| BARE2D::GLContext::GLContext | ( | ) |
Definition at line 5 of file GLContextManager.cpp.
References m_boundTextureIDs.
| BARE2D::GLContext::~GLContext | ( | ) |
Definition at line 9 of file GLContextManager.cpp.
References m_boundTextureIDs.
| void BARE2D::GLContext::bindTexture | ( | GLenum | target, |
| GLenum | texture | ||
| ) |
Binds a texture to target in the currently active texture slot.
| target | The target to bind to |
| texture | The id of a texture. |
Definition at line 22 of file GLContextManager.cpp.
References m_activeTexture, and m_boundTextureIDs.
Referenced by BARE2D::FBORenderer::bind(), BARE2D::ResourceManager::createMutableTexture(), BARE2D::FBORenderer::createTextures(), BARE2D::TexturelessRenderer::init(), BARE2D::Font::init(), BARE2D::ResourceManager::loadTexture(), BARE2D::FBORenderer::preRender(), BARE2D::BumpyRenderer::render(), BARE2D::Renderer::render(), BARE2D::MutableTexture::setData(), and unbindTexture().
Here is the caller graph for this function:| GLuint BARE2D::GLContext::getBoundTexture | ( | ) |
Definition at line 37 of file GLContextManager.cpp.
References m_activeTexture, and m_boundTextureIDs.
| void BARE2D::GLContext::setActiveTexture | ( | GLenum | texture | ) |
Sets the active texture "slot". This can be GL_TEXTURE0 to GL_TEXTURE8 (I think. Check the literature)
| texture | The texture slot to tell OpenGL is "active" |
Definition at line 13 of file GLContextManager.cpp.
References m_activeTexture.
Referenced by BARE2D::FBORenderer::bind(), BARE2D::FBORenderer::createTextures(), BARE2D::FBORenderer::preRender(), BARE2D::BumpyRenderer::render(), BARE2D::FBORenderer::render(), BARE2D::Renderer::render(), BARE2D::DebugRenderer::render(), and unbindTexture().
Here is the caller graph for this function:| void BARE2D::GLContext::unbindTexture | ( | GLenum | target, |
| GLenum | textureslot | ||
| ) |
Unbinds a texture.
| target | The target (GL_TEXTURE_2D generally) |
| textureslot | The texture to be unbound (GL_TEXTURE0-8) |
Definition at line 32 of file GLContextManager.cpp.
References bindTexture(), and setActiveTexture().
Referenced by BARE2D::FBORenderer::unbind().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 35 of file GLContextManager.hpp.
Referenced by bindTexture(), getBoundTexture(), and setActiveTexture().
|
private |
Definition at line 38 of file GLContextManager.hpp.
Referenced by bindTexture(), getBoundTexture(), GLContext(), and ~GLContext().