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

Method createTexture

Common/rendercheck_gl.h:756–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754 }
755
756 GLuint createTexture(GLenum target, int w, int h, GLint internalformat,
757 GLenum format) {
758 GLuint texid;
759 glGenTextures(1, &texid);
760 glBindTexture(target, texid);
761
762 glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
763 glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
764 glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
765 glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
766
767 glTexImage2D(target, 0, internalformat, w, h, 0, format, GL_FLOAT, 0);
768 return texid;
769 }
770
771 void attachTexture(GLenum texTarget, GLuint texId,
772 GLenum attachment = GL_COLOR_ATTACHMENT0_EXT,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected