[nostalgia/core/userland] Make shader compile failures oxError and return error instead of panicing

This commit is contained in:
2021-03-18 01:34:07 -05:00
parent be0de98fc2
commit 4956534af4
3 changed files with 17 additions and 11 deletions
+4 -1
View File
@@ -14,6 +14,8 @@
#include <GLES3/gl3.h>
#endif
#include <ox/std/error.hpp>
namespace nostalgia::core::renderer {
struct Texture {
@@ -39,7 +41,8 @@ struct Bufferset {
GLsizei eboElements = 0;
};
[[nodiscard]] GLuint buildShaderProgram(const GLchar *vert, const GLchar *frag);
[[nodiscard]]
ox::Result<GLuint> buildShaderProgram(const GLchar *vert, const GLchar *frag);
void destroy(const Bufferset &bufferset);