MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / attachTexture

Method attachTexture

Common/rendercheck_gl.h:771–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769 }
770
771 void attachTexture(GLenum texTarget, GLuint texId,
772 GLenum attachment = GL_COLOR_ATTACHMENT0_EXT,
773 int mipLevel = 0, int zSlice = 0) {
774 bindRenderPath();
775
776 switch (texTarget) {
777 case GL_TEXTURE_1D:
778 glFramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_1D,
779 texId, mipLevel);
780 break;
781
782 case GL_TEXTURE_3D:
783 glFramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_3D,
784 texId, mipLevel, zSlice);
785 break;
786
787 default:
788 // Default is GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, or cube faces
789 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, attachment, texTarget,
790 texId, mipLevel);
791 break;
792 }
793
794 unbindRenderPath();
795 }
796
797 bool initialize(unsigned width, unsigned height, fboConfig &rConfigFBO,
798 fboData &rActiveFBO) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected