MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / opengl_CopyBitmapToFramebuffer

Function opengl_CopyBitmapToFramebuffer

legacy/renderer/opengl.cpp:2528–2539  ·  view source on GitHub ↗

Takes a bitmap and blits it to the screen using linear frame buffer stuff X and Y are the destination X,Y

Source from the content-addressed store, hash-verified

2526// Takes a bitmap and blits it to the screen using linear frame buffer stuff
2527// X and Y are the destination X,Y
2528void opengl_CopyBitmapToFramebuffer(int bm_handle, int x, int y) {
2529 ASSERT(opengl_Framebuffer_ready);
2530
2531 if (opengl_Framebuffer_ready == 1) {
2532 bm_CreateChunkedBitmap(bm_handle, &opengl_Chunked_bitmap);
2533 opengl_Framebuffer_ready = 2;
2534 } else {
2535 opengl_ChangeChunkedBitmap(bm_handle, &opengl_Chunked_bitmap);
2536 }
2537
2538 rend_DrawChunkedBitmap(&opengl_Chunked_bitmap, 0, 0, 255);
2539}
2540
2541// Gets a renderer ready for a framebuffer copy, or stops a framebuffer copy
2542void opengl_SetFrameBufferCopyState(bool state) {

Callers 1

Calls 3

bm_CreateChunkedBitmapFunction · 0.85
rend_DrawChunkedBitmapFunction · 0.70

Tested by

no test coverage detected