MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / raster_program

Function raster_program

samples/cgpu/cgpu-basic/hot-triangle/triangle.c:240–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void raster_program()
241{
242 // Create command objects
243 pool = cgpu_create_command_pool(gfx_queue, CGPU_NULLPTR);
244 CGPUCommandBufferDescriptor cmd_desc = { .is_secondary = false };
245 cmd = cgpu_create_command_buffer(pool, &cmd_desc);
246
247 bool quit = false;
248 while (!quit)
249 {
250 SDL_Event event;
251 while (SDL_PollEvent(&event))
252 {
253 if (SDL_GetWindowID(sdl_window) == event.window.windowID)
254 {
255 if (!SDLEventHandler(&event, sdl_window))
256 {
257 quit = true;
258 }
259 }
260 }
261 raster_redraw();
262 }
263}
264
265void finalize()
266{

Callers 1

ProgramMainFunction · 0.70

Calls 4

cgpu_create_command_poolFunction · 0.85
raster_redrawFunction · 0.70
SDLEventHandlerFunction · 0.50

Tested by

no test coverage detected