| 65 | return m; |
| 66 | } |
| 67 | GLuint initTexture(void** buf, int& width, int& height) |
| 68 | { |
| 69 | GLuint texID = 0; |
| 70 | glGenTextures(1,&texID); |
| 71 | |
| 72 | width = getClosestPowerOfTwo(width); |
| 73 | height = getClosestPowerOfTwo(height); |
| 74 | *buf = new unsigned char[width*height*4]; |
| 75 | glBindTexture(GL_TEXTURE_2D,texID); |
| 76 | |
| 77 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 78 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
| 79 | |
| 80 | return texID; |
| 81 | } |
| 82 | |
| 83 | GLfloat texcoords[8]; |
| 84 | void DrawRectangle(float topLeftX, float topLeftY, float bottomRightX, float bottomRightY) |
no test coverage detected