| 19 | m_cleanup(); |
| 20 | } |
| 21 | bool Texture::Allocate(int w, int h, int d) |
| 22 | { |
| 23 | m_cleanup(); |
| 24 | |
| 25 | if (d <= 0 || w <= 0 || h <= 0) |
| 26 | return false; |
| 27 | |
| 28 | Width = w; |
| 29 | Height = h; |
| 30 | Depth = d; |
| 31 | MipmapLevels = 1; |
| 32 | |
| 33 | Data = (float**)malloc(sizeof(float*) * MipmapLevels); |
| 34 | |
| 35 | // TODO: mipmaps |
| 36 | Data[0] = (float*)malloc(sizeof(float) * w * h * d * 4); |
| 37 | |
| 38 | return true; |
| 39 | } |
| 40 | void Texture::Fill(glm::vec4 val) |
| 41 | { |
| 42 | // TODO: mipmaps |
nothing calls this directly
no outgoing calls
no test coverage detected