summaryrefslogtreecommitdiff
path: root/src/assets.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-05-12 19:04:01 +0200
committerAldrik Ramaekers <aldrik.ramaekers@protonmail.com>2020-05-12 19:04:01 +0200
commita7f382b431e6eed3f180c71d4175970da096eab9 (patch)
tree0099dba56efe2eb24d82481ed6ea5294e7b4bfb9 /src/assets.c
parentd4dbb9333666a2a0c752ecee49b4f70b8e4c1371 (diff)
work
Diffstat (limited to 'src/assets.c')
-rw-r--r--src/assets.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/assets.c b/src/assets.c
index 3eddf02..5b90ea3 100644
--- a/src/assets.c
+++ b/src/assets.c
@@ -33,11 +33,12 @@ inline static bool is_big_endian()
return !((*((uint8_t*)(&i))) == 0x67);
}
-void assets_do_post_process()
+bool assets_do_post_process()
{
+ bool result = false;
#if 0
static PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample = NULL;
-#ifdef OS_WINDOWS
+#ifdef OS_WIN
if (!glTexImage2DMultisample)
glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)wglGetProcAddress("glTexImage2DMultisample");
#endif
@@ -64,7 +65,14 @@ void assets_do_post_process()
#if 0
if (glTexImage2DMultisample)
- glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 16, GL_RGBA8, task->image->width, task->image->height, TRUE);
+ glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 4, GL_RGBA8, task->image->width, task->image->height, FALSE);
+#endif
+
+#if 0
+ s32 fbo;
+ glGenFramebuffers(1, &fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, task->image->textureID, 0);
#endif
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -102,10 +110,14 @@ void assets_do_post_process()
}
}
+ result = true;
+
array_remove_at(&global_asset_collection.post_process_queue, i);
}
mutex_unlock(&asset_mutex);
+
+ return result;
}
bool assets_queue_worker_load_bitmap(image *image)
@@ -231,6 +243,8 @@ void *assets_queue_worker()
thread_sleep(1000);
}
+ thread_exit();
+
return 0;
}