- create a renderer backend based on softpoly's drawers
This commit is contained in:
parent
8a90946094
commit
0eda298db2
21 changed files with 1317 additions and 9 deletions
23
src/win32/win32polyvideo.cpp
Normal file
23
src/win32/win32polyvideo.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include "hardware.h"
|
||||
#include <Windows.h>
|
||||
|
||||
extern HWND Window;
|
||||
|
||||
void I_PresentPolyImage(int w, int h, const void *pixels)
|
||||
{
|
||||
BITMAPV5HEADER info = {};
|
||||
info.bV5Size = sizeof(BITMAPV5HEADER);
|
||||
info.bV5Width = w;
|
||||
info.bV5Height = -h;
|
||||
info.bV5Planes = 1;
|
||||
info.bV5BitCount = 32;
|
||||
info.bV5Compression = BI_RGB;
|
||||
info.bV5SizeImage = 0;
|
||||
info.bV5CSType = LCS_WINDOWS_COLOR_SPACE;
|
||||
|
||||
HDC dc = GetDC(Window);
|
||||
SetDIBitsToDevice(dc, 0, 0, w, h, 0, 0, 0, h, pixels, (const BITMAPINFO *)&info, DIB_RGB_COLORS);
|
||||
ReleaseDC(Window, dc);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue