| 115 | static char texture_magic; |
| 116 | |
| 117 | static SDL_INLINE void |
| 118 | DebugLogRenderCommands(const SDL_RenderCommand *cmd) |
| 119 | { |
| 120 | #if 0 |
| 121 | unsigned int i = 1; |
| 122 | SDL_Log("Render commands to flush:"); |
| 123 | while (cmd) { |
| 124 | switch (cmd->command) { |
| 125 | case SDL_RENDERCMD_NO_OP: |
| 126 | SDL_Log(" %u. no-op", i++); |
| 127 | break; |
| 128 | |
| 129 | case SDL_RENDERCMD_SETVIEWPORT: |
| 130 | SDL_Log(" %u. set viewport (first=%u, rect={(%d, %d), %dx%d})", i++, |
| 131 | (unsigned int) cmd->data.viewport.first, |
| 132 | cmd->data.viewport.rect.x, cmd->data.viewport.rect.y, |
| 133 | cmd->data.viewport.rect.w, cmd->data.viewport.rect.h); |
| 134 | break; |
| 135 | |
| 136 | case SDL_RENDERCMD_SETCLIPRECT: |
| 137 | SDL_Log(" %u. set cliprect (enabled=%s, rect={(%d, %d), %dx%d})", i++, |
| 138 | cmd->data.cliprect.enabled ? "true" : "false", |
| 139 | cmd->data.cliprect.rect.x, cmd->data.cliprect.rect.y, |
| 140 | cmd->data.cliprect.rect.w, cmd->data.cliprect.rect.h); |
| 141 | break; |
| 142 | |
| 143 | case SDL_RENDERCMD_SETDRAWCOLOR: |
| 144 | SDL_Log(" %u. set draw color (first=%u, r=%d, g=%d, b=%d, a=%d)", i++, |
| 145 | (unsigned int) cmd->data.color.first, |
| 146 | (int) cmd->data.color.r, (int) cmd->data.color.g, |
| 147 | (int) cmd->data.color.b, (int) cmd->data.color.a); |
| 148 | break; |
| 149 | |
| 150 | case SDL_RENDERCMD_CLEAR: |
| 151 | SDL_Log(" %u. clear (first=%u, r=%d, g=%d, b=%d, a=%d)", i++, |
| 152 | (unsigned int) cmd->data.color.first, |
| 153 | (int) cmd->data.color.r, (int) cmd->data.color.g, |
| 154 | (int) cmd->data.color.b, (int) cmd->data.color.a); |
| 155 | break; |
| 156 | |
| 157 | case SDL_RENDERCMD_DRAW_POINTS: |
| 158 | SDL_Log(" %u. draw points (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d)", i++, |
| 159 | (unsigned int) cmd->data.draw.first, |
| 160 | (unsigned int) cmd->data.draw.count, |
| 161 | (int) cmd->data.draw.r, (int) cmd->data.draw.g, |
| 162 | (int) cmd->data.draw.b, (int) cmd->data.draw.a, |
| 163 | (int) cmd->data.draw.blend); |
| 164 | break; |
| 165 | |
| 166 | case SDL_RENDERCMD_DRAW_LINES: |
| 167 | SDL_Log(" %u. draw lines (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d)", i++, |
| 168 | (unsigned int) cmd->data.draw.first, |
| 169 | (unsigned int) cmd->data.draw.count, |
| 170 | (int) cmd->data.draw.r, (int) cmd->data.draw.g, |
| 171 | (int) cmd->data.draw.b, (int) cmd->data.draw.a, |
| 172 | (int) cmd->data.draw.blend); |
| 173 | break; |
| 174 |
no test coverage detected