Adding basic texture fragment shader kernel

This commit is contained in:
2019-12-25 00:09:14 +02:00
parent e57702936e
commit 2e6ddd2ff2
11 changed files with 412 additions and 89 deletions
+2 -2
View File
@@ -95,9 +95,9 @@ void destroy_window() {
void set_pixel(unsigned int x, unsigned int y, unsigned int color) {
unsigned long pixel_index = y * bytes_per_row + x * 3;
pixel_data[pixel_index + 0] = (char)(color >> 0);
pixel_data[pixel_index + 2] = (char)(color >> 0);
pixel_data[pixel_index + 1] = (char)(color >> 8);
pixel_data[pixel_index + 2] = (char)(color >> 16);
pixel_data[pixel_index + 0] = (char)(color >> 16);
if (!screen_changed)
screen_changed = true;