MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / initImage

Method initImage

src/libutils/oglapphelpers/oglapp.cpp:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void 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
73void OglApp::updateImage(const float * image)
74{

Callers 4

InitImageTextureFunction · 0.80
setGPUMethod · 0.80
mainFunction · 0.80
AllocateImageTextureFunction · 0.80

Calls

no outgoing calls

Tested by 1

AllocateImageTextureFunction · 0.64