MCPcopy Create free account
hub / github.com/defold/defold / Execute

Method Execute

engine/graphics/src/test/test_app_graphics.cpp:289–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287 }
288
289 void Execute(EngineCtx* engine) override
290 {
291 static uint8_t color_r = 0;
292 static uint8_t color_g = 80;
293 static uint8_t color_b = 140;
294 static uint8_t color_a = 255;
295
296 dmGraphics::Clear(engine->m_GraphicsContext, dmGraphics::BUFFER_TYPE_COLOR0_BIT,
297 (float) color_r,
298 (float) color_g,
299 (float) color_b,
300 (float) color_a,
301 1.0f, 0);
302
303 int32_t x = 0, y = 0;
304 uint32_t w = 0, h = 0;
305 dmGraphics::GetViewport(engine->m_GraphicsContext, &x, &y, &w, &h);
306 dmGraphics::ReadPixels(engine->m_GraphicsContext, x, y, w, h, m_Buffer, 512 * 512 * 4);
307 dmLogInfo("%d, %d, %d, %d", m_Buffer[0], m_Buffer[1], m_Buffer[2], m_Buffer[3]);
308 }
309};
310
311struct AsyncTextureUploadTest : ITest

Callers

nothing calls this directly

Calls 3

ClearFunction · 0.85
GetViewportFunction · 0.85
ReadPixelsFunction · 0.85

Tested by

no test coverage detected