[nostalgia] Fixes for MSVC
This commit is contained in:
parent
399f117eab
commit
10deddfd07
@ -12,11 +12,12 @@ if(APPLE)
|
||||
else()
|
||||
set(OPENGL_gl_LIBRARY GL)
|
||||
endif()
|
||||
find_package(glad REQUIRED)
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaGlUtils PUBLIC
|
||||
OxStd
|
||||
${OPENGL_gl_LIBRARY}
|
||||
glad::glad
|
||||
)
|
||||
|
||||
install(
|
||||
|
@ -30,13 +30,21 @@ void deleteVertexArray(GLuint v) noexcept {
|
||||
glDeleteVertexArrays(1, &v);
|
||||
}
|
||||
|
||||
void deleteProgram(GLuint v) noexcept {
|
||||
glDeleteProgram(v);
|
||||
}
|
||||
|
||||
void deleteShader(GLuint v) noexcept {
|
||||
glDeleteShader(v);
|
||||
}
|
||||
|
||||
template struct GLObject<deleteBuffer>;
|
||||
template struct GLObject<deleteFrameBuffer>;
|
||||
template struct GLObject<deleteRenderBuffer>;
|
||||
template struct GLObject<deleteTexture, TextureBase>;
|
||||
template struct GLObject<deleteVertexArray>;
|
||||
template struct GLObject<glDeleteProgram>;
|
||||
template struct GLObject<glDeleteShader>;
|
||||
template struct GLObject<deleteProgram>;
|
||||
template struct GLObject<deleteShader>;
|
||||
|
||||
[[nodiscard]]
|
||||
static ox::Result<GLShader> buildShader(GLuint shaderType, const GLchar *src, const char *shaderName) noexcept {
|
||||
|
@ -13,7 +13,8 @@
|
||||
#endif
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include <GLES3/gl32.h>
|
||||
#include <glad/glad.h>
|
||||
#include <gl/GL.h>
|
||||
#endif
|
||||
|
||||
#include <ox/std/error.hpp>
|
||||
@ -102,20 +103,22 @@ void deleteFrameBuffer(GLuint b) noexcept;
|
||||
void deleteRenderBuffer(GLuint b) noexcept;
|
||||
void deleteTexture(GLuint t) noexcept;
|
||||
void deleteVertexArray(GLuint v) noexcept;
|
||||
void deleteProgram(GLuint p) noexcept;
|
||||
void deleteShader(GLuint s) noexcept;
|
||||
|
||||
extern template struct GLObject<deleteBuffer>;
|
||||
extern template struct GLObject<deleteFrameBuffer>;
|
||||
extern template struct GLObject<deleteRenderBuffer>;
|
||||
extern template struct GLObject<deleteTexture, TextureBase>;
|
||||
extern template struct GLObject<deleteVertexArray>;
|
||||
extern template struct GLObject<glDeleteProgram>;
|
||||
extern template struct GLObject<glDeleteShader>;
|
||||
extern template struct GLObject<deleteProgram>;
|
||||
extern template struct GLObject<deleteShader>;
|
||||
|
||||
using GLBuffer = GLObject<deleteBuffer>;
|
||||
using GLFrameBuffer = GLObject<deleteBuffer>;
|
||||
using GLRenderBuffer = GLObject<deleteRenderBuffer>;
|
||||
using GLShader = GLObject<glDeleteShader>;
|
||||
using GLProgram = GLObject<glDeleteProgram>;
|
||||
using GLShader = GLObject<deleteShader>;
|
||||
using GLProgram = GLObject<deleteProgram>;
|
||||
using GLTexture = GLObject<deleteTexture, TextureBase>;
|
||||
using GLVertexArray = GLObject<deleteVertexArray>;
|
||||
|
||||
|
@ -27,7 +27,9 @@ class FileDialogManager : public nostalgia::studio::Task {
|
||||
FileDialogManager() noexcept = default;
|
||||
|
||||
template<class... Args>
|
||||
explicit FileDialogManager(Args ...args) noexcept;
|
||||
explicit FileDialogManager(Args ...args) noexcept {
|
||||
pathChosen.connect(args...);
|
||||
}
|
||||
|
||||
~FileDialogManager() noexcept override = default;
|
||||
|
||||
@ -38,9 +40,4 @@ class FileDialogManager : public nostalgia::studio::Task {
|
||||
|
||||
};
|
||||
|
||||
template<class... Args>
|
||||
FileDialogManager::FileDialogManager(Args ...args) noexcept {
|
||||
pathChosen.connect(args...);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user