| 15 | } |
| 16 | |
| 17 | void CarShader::loadEnvMapTextureData() { |
| 18 | std::stringstream filename; |
| 19 | filename << "../resources/misc/sky_textures/CHRD.BMP"; |
| 20 | |
| 21 | int width, height; |
| 22 | GLubyte *data; |
| 23 | |
| 24 | ASSERT(Utils::LoadBmpCustomAlpha(filename.str().c_str(), &data, &width, &height, 0), "Environment map texture loading failed!"); |
| 25 | |
| 26 | glGenTextures(1, &envMapTextureID); |
| 27 | glBindTexture(GL_TEXTURE_2D, envMapTextureID); |
| 28 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
| 29 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
| 30 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
| 31 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 32 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid *) data); |
| 33 | } |
| 34 | |
| 35 | void CarShader::bindAttributes() { |
| 36 | bindAttribute(0 ,"vertexPosition_modelspace"); |
nothing calls this directly
no test coverage detected