| 247 | } |
| 248 | |
| 249 | void Execute(EngineCtx* engine) override |
| 250 | { |
| 251 | static uint8_t color_r = 0; |
| 252 | static uint8_t color_g = 80; |
| 253 | static uint8_t color_b = 140; |
| 254 | static uint8_t color_a = 255; |
| 255 | |
| 256 | dmGraphics::Clear(engine->m_GraphicsContext, dmGraphics::BUFFER_TYPE_COLOR0_BIT, |
| 257 | (float) color_r, |
| 258 | (float) color_g, |
| 259 | (float) color_b, |
| 260 | (float) color_a, |
| 261 | 1.0f, 0); |
| 262 | |
| 263 | uint32_t w = dmGraphics::GetWindowWidth(engine->m_GraphicsContext); |
| 264 | uint32_t h = dmGraphics::GetWindowHeight(engine->m_GraphicsContext); |
| 265 | |
| 266 | dmGraphics::SetViewport(engine->m_GraphicsContext, 0, 0, w, h); |
| 267 | |
| 268 | dmGraphics::EnableProgram(engine->m_GraphicsContext, m_Program); |
| 269 | dmGraphics::EnableVertexBuffer(engine->m_GraphicsContext, m_VertexBuffer, 0); |
| 270 | dmGraphics::EnableVertexDeclaration(engine->m_GraphicsContext, m_VertexDeclaration, 0, 0, m_Program); |
| 271 | |
| 272 | // TODO: Bind resources here |
| 273 | |
| 274 | dmGraphics::Draw(engine->m_GraphicsContext, dmGraphics::PRIMITIVE_TRIANGLES, 0, 6, 1); |
| 275 | } |
| 276 | }; |
| 277 | |
| 278 | struct ReadPixelsTest : ITest |
nothing calls this directly
no test coverage detected