本文整理汇总了C++中GLTexture::getTextureID方法的典型用法代码示例。如果您正苦于以下问题:C++ GLTexture::getTextureID方法的具体用法?C++ GLTexture::getTextureID怎么用?C++ GLTexture::getTextureID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLTexture
的用法示例。
在下文中一共展示了GLTexture::getTextureID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setDepthbufferTexture
void GLFramebuffer::setDepthbufferTexture(GLTexture& a_texture)
{
assert(m_initialized);
assert(uint(m_multiSampleType) == uint(a_texture.getMultiSampleType()));
m_depthTexture = a_texture.getTextureID();
CHECK_GL_ERROR()
glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, a_texture.getTextureID(), 0);
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
assert(status == GL_FRAMEBUFFER_COMPLETE);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
CHECK_GL_ERROR();
}
示例2: addFramebufferTexture
void GLFramebuffer::addFramebufferTexture(GLTexture& a_texture, EAttachment a_attachment)
{
assert(m_initialized);
assert(uint(m_multiSampleType) == uint(a_texture.getMultiSampleType()));
m_textures.push_back(a_texture.getTextureID());
m_drawBuffers.push_back(a_attachment);
CHECK_GL_ERROR();
glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
glFramebufferTexture(GL_FRAMEBUFFER, GLenum(a_attachment), a_texture.getTextureID(), 0);
glDrawBuffers(uint(m_drawBuffers.size()), rcast<GLenum*>(&m_drawBuffers[0]));
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
assert(status == GL_FRAMEBUFFER_COMPLETE);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
CHECK_GL_ERROR();
}