Skip to content

Commit

Permalink
deploy: cace531
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Jan 16, 2025
1 parent 5c7ae8f commit 53eaf8f
Show file tree
Hide file tree
Showing 13 changed files with 8,537 additions and 8,515 deletions.
13 changes: 12 additions & 1 deletion RGFW.h
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ typedef struct RGFW_window_src {
#if defined(RGFW_OSMESA) || defined(RGFW_BUFFER)
HDC hdcMem;
HBITMAP bitmap;
u8* bitmapBits;
#endif
RGFW_area maxSize, minSize; /*!< for setting max/min resize (RGFW_WINDOWS) */
} RGFW_window_src;
Expand Down Expand Up @@ -1731,7 +1732,11 @@ void RGFW_window_initBuffer(RGFW_window* win) {

void RGFW_window_initBufferSize(RGFW_window* win, RGFW_area area) {
if (!(win->_flags & RGFW_BUFFER_ALLOC)) win->_flags |= RGFW_BUFFER_ALLOC;
#ifndef RGFW_WINDOWS
return RGFW_window_initBufferPtr(win, RGFW_ALLOC(area.w * area.h * 4), area);
#else /* windows's bitmap allocs memory for us */
return RGFW_window_initBufferPtr(win, NULL, area);
#endif
}

#ifdef RGFW_MACOS
Expand Down Expand Up @@ -5429,9 +5434,12 @@ void RGFW_window_initBufferPtr(RGFW_window* win, u8* buffer, RGFW_area area){
win->src.bitmap = CreateDIBSection(win->src.hdc,
(BITMAPINFO*) &bi,
DIB_RGB_COLORS,
(void**) &win->buffer,
(void**) &win->src.bitmapBits,
NULL,
(DWORD) 0);

if (win->buffer == NULL)
win->buffer = win->src.bitmapBits;

win->src.hdcMem = CreateCompatibleDC(win->src.hdc);

Expand Down Expand Up @@ -6883,6 +6891,9 @@ void RGFW_window_swapBuffers(RGFW_window* win) {

if (!(win->_flags & RGFW_NO_CPU_RENDER)) {
#if defined(RGFW_OSMESA) || defined(RGFW_BUFFER)
if (win->buffer != win->src.bitmapBits)
memcpy(win->src.bitmapBits, win->buffer, win->bufferSize.w * win->bufferSize.h * 4);

HGDIOBJ oldbmp = SelectObject(win->src.hdcMem, win->src.bitmap);
BitBlt(win->src.hdc, 0, 0, win->r.w, win->r.h, win->src.hdcMem, 0, 0, SRCCOPY);
SelectObject(win->src.hdcMem, oldbmp);
Expand Down
Binary file modified RGFW.o
Binary file not shown.
17,035 changes: 8,523 additions & 8,512 deletions docs/RGFW_8h_source.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/md_README.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ <h2><a class="anchor" id="autotoc_md4"></a>
<div class="ttc" id="astructRGFW__event_html_aba9e0d0df62210352604aedbb5829c11"><div class="ttname"><a href="structRGFW__event.html#aba9e0d0df62210352604aedbb5829c11">RGFW_event::point</a></div><div class="ttdeci">RGFW_point point</div><div class="ttdef"><b>Definition:</b> RGFW.h:583</div></div>
<div class="ttc" id="astructRGFW__point_html_a1e4ef1395966022c65b8b69db9e8e592"><div class="ttname"><a href="structRGFW__point.html#a1e4ef1395966022c65b8b69db9e8e592">RGFW_point::x</a></div><div class="ttdeci">i32 x</div><div class="ttdef"><b>Definition:</b> RGFW.h:528</div></div>
<div class="ttc" id="astructRGFW__point_html_a5f31b208f21b8cb3f65c225a07936a93"><div class="ttname"><a href="structRGFW__point.html#a5f31b208f21b8cb3f65c225a07936a93">RGFW_point::y</a></div><div class="ttdeci">i32 y</div><div class="ttdef"><b>Definition:</b> RGFW.h:528</div></div>
<div class="ttc" id="astructRGFW__window_html"><div class="ttname"><a href="structRGFW__window.html">RGFW_window</a></div><div class="ttdef"><b>Definition:</b> RGFW.h:731</div></div>
<div class="ttc" id="astructRGFW__window_html_af2effd6e3f8e3f7add8a7afd6aeb455a"><div class="ttname"><a href="structRGFW__window.html#af2effd6e3f8e3f7add8a7afd6aeb455a">RGFW_window::event</a></div><div class="ttdeci">RGFW_event event</div><div class="ttdef"><b>Definition:</b> RGFW.h:741</div></div>
<div class="ttc" id="astructRGFW__window_html"><div class="ttname"><a href="structRGFW__window.html">RGFW_window</a></div><div class="ttdef"><b>Definition:</b> RGFW.h:732</div></div>
<div class="ttc" id="astructRGFW__window_html_af2effd6e3f8e3f7add8a7afd6aeb455a"><div class="ttname"><a href="structRGFW__window.html#af2effd6e3f8e3f7add8a7afd6aeb455a">RGFW_window::event</a></div><div class="ttdeci">RGFW_event event</div><div class="ttdef"><b>Definition:</b> RGFW.h:742</div></div>
</div><!-- fragment --><div class="fragment"><div class="line">linux : gcc main.c -lX11 -lGL -lXrandr</div>
<div class="line">windows : gcc main.c -lopengl32 -lgdi32</div>
<div class="line">macos : gcc main.c -framework Cocoa -framework OpenGL -framework IOKit</div>
Expand Down
Binary file modified examples/callbacks/callbacks.wasm
Binary file not shown.
Binary file modified examples/events/events.wasm
Binary file not shown.
Binary file modified examples/first-person-camera/camera.wasm
Binary file not shown.
Binary file modified examples/gamepad/gamepad.wasm
Binary file not shown.
Binary file modified examples/gles2/gles2.wasm
Binary file not shown.
Binary file modified examples/microui_demo/microui_demo.wasm
Binary file not shown.
Binary file modified examples/webgpu/webgpu.wasm
Binary file not shown.
Binary file modified libRGFW.a
Binary file not shown.
Binary file modified libRGFW.so
Binary file not shown.

0 comments on commit 53eaf8f

Please sign in to comment.