| 52 | } |
| 53 | |
| 54 | void BillboardShader::load_bmp_texture() { |
| 55 | GLubyte *data; |
| 56 | GLsizei width; |
| 57 | GLsizei height; |
| 58 | |
| 59 | Utils::LoadBmpWithAlpha("../resources/sfx/0004.BMP", "../resources/sfx/0004-a.BMP", &data, &width, &height); |
| 60 | glGenTextures(1, &textureID); |
| 61 | glBindTexture(GL_TEXTURE_2D, textureID); |
| 62 | |
| 63 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
| 64 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
| 65 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
| 66 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 67 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid *) data); |
| 68 | } |
nothing calls this directly
no test coverage detected