| 55 | } |
| 56 | |
| 57 | void OglApp::initImage(int imgWidth, int imgHeight, Components comp, const float * image) |
| 58 | { |
| 59 | setImageDimensions(imgWidth, imgHeight, comp); |
| 60 | |
| 61 | glGenTextures(1, &m_imageTexID); |
| 62 | glActiveTexture(GL_TEXTURE0); |
| 63 | updateImage(image); |
| 64 | |
| 65 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 66 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
| 67 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); |
| 68 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); |
| 69 | |
| 70 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); |
| 71 | } |
| 72 | |
| 73 | void OglApp::updateImage(const float * image) |
| 74 | { |
no outgoing calls