Texture.cpp
branchv_0
changeset 22 12262f2420de
parent 19 262828ae9682
child 28 4cbd9c0beb4c
equal deleted inserted replaced
21:bcc53967ab3c 22:12262f2420de
    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 }