77 impl->width, impl->height, |
77 impl->width, impl->height, |
78 0, GL_RGBA, GL_UNSIGNED_BYTE, |
78 0, GL_RGBA, GL_UNSIGNED_BYTE, |
79 img.getData()); |
79 img.getData()); |
80 glTexParameteri(GLT2D, GL_TEXTURE_WRAP_S, GL_REPEAT); |
80 glTexParameteri(GLT2D, GL_TEXTURE_WRAP_S, GL_REPEAT); |
81 glTexParameteri(GLT2D, GL_TEXTURE_WRAP_T, GL_REPEAT); |
81 glTexParameteri(GLT2D, GL_TEXTURE_WRAP_T, GL_REPEAT); |
82 glTexParameteri(GLT2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
82 glTexParameteri(GLT2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // blurry upscale |
|
83 glTexParameteri(GLT2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // sharp upscale |
83 glTexParameteri(GLT2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); |
84 glTexParameteri(GLT2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); |
84 glGenerateMipmap(GLT2D); |
85 glGenerateMipmap(GLT2D); |
85 checkError(&std::cerr); |
86 checkError(&std::cerr); |
86 } |
87 } |