| 56 | } |
| 57 | |
| 58 | static void _count_rows_cols(const char* p, int* outCols, int* outRows) { |
| 59 | int textCols = 0, textRows = 1; |
| 60 | int curCols = 0; |
| 61 | for (; *p; ++p) { |
| 62 | if (*p == '\n') { |
| 63 | ++textRows; |
| 64 | curCols = 0; |
| 65 | } else { |
| 66 | ++curCols; |
| 67 | if (textCols < curCols) { |
| 68 | textCols = curCols; |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | *outCols = textCols; |
| 73 | *outRows = textRows; |
| 74 | } |
| 75 | |
| 76 | TextRenderer* TextRenderer::SetMatrix(glm::mat4 m) { |
| 77 | mMatrix = m; |
no outgoing calls
no test coverage detected