opengl render backend

This commit is contained in:
Ryan Fleury committed 2025-05-09 19:48:41 -07:00
1 parent 1b7a57914e
commit 48b8c41713
19 files changed
+1598 -38

No files matched your search

+27
View File
@@ -6,6 +6,33 @@
#include "generated/render.meta.c"
////////////////////////////////
//~ rjf: Helpers
internal Mat4x4F32
r_sample_channel_map_from_tex2dformat(R_Tex2DFormat fmt)
{
Mat4x4F32 result =
{
{
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{0, 0, 0, 1},
}
};
switch(fmt)
{
default:{}break;
case R_Tex2DFormat_R8:
{
MemoryZeroArray(result.v[0]);
result.v[0][0] = result.v[0][1] = result.v[0][2] = result.v[0][3] = 1.f;
}break;
}
return result;
}
////////////////////////////////
//~ rjf: Basic Type Functions