| 1935 | } |
| 1936 | |
| 1937 | void Label::updateBuffer(TextureAtlas* textureAtlas, CustomCommand& customCommand) |
| 1938 | { |
| 1939 | if (textureAtlas->getTotalQuads() > customCommand.getVertexCapacity()) |
| 1940 | { |
| 1941 | customCommand.createVertexBuffer((unsigned int)sizeof(V3F_C4B_T2F_Quad), |
| 1942 | (unsigned int)textureAtlas->getTotalQuads(), |
| 1943 | CustomCommand::BufferUsage::DYNAMIC); |
| 1944 | customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, |
| 1945 | (unsigned int)textureAtlas->getTotalQuads() * 6, |
| 1946 | CustomCommand::BufferUsage::DYNAMIC); |
| 1947 | } |
| 1948 | customCommand.updateVertexBuffer(textureAtlas->getQuads(), |
| 1949 | (unsigned int)(textureAtlas->getTotalQuads() * sizeof(V3F_C4B_T2F_Quad))); |
| 1950 | customCommand.updateIndexBuffer(textureAtlas->getIndices(), |
| 1951 | (unsigned int)(textureAtlas->getTotalQuads() * 6 * sizeof(unsigned short))); |
| 1952 | customCommand.setIndexDrawInfo(0, (unsigned int)(textureAtlas->getTotalQuads() * 6)); |
| 1953 | } |
| 1954 | |
| 1955 | void Label::updateEffectUniforms(BatchCommand& batch, |
| 1956 | TextureAtlas* textureAtlas, |
nothing calls this directly
no test coverage detected