| 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, |
nothing calls this directly
no outgoing calls
no test coverage detected