Starting the refactor session on day 14. Moved the glad and KHR dirs into src to start.
This commit is contained in:
parent
1b7066757a
commit
5b5e8a9fb0
62 changed files with 13880 additions and 0 deletions
38
14-refactor/tests/main.cpp
Normal file
38
14-refactor/tests/main.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include <fuc2/run.hpp>
|
||||
#include <glad/glad.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
#include "dbc.hpp"
|
||||
|
||||
TEST_SET(shader_tests);
|
||||
|
||||
using namespace fuc2;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
glfwInit();
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
|
||||
GLFWwindow* window = glfwCreateWindow(800, 600, "LearnOpenGL", NULL, NULL);
|
||||
if (window == NULL)
|
||||
{
|
||||
dbc::log("Failed to create GLFW window");
|
||||
glfwTerminate();
|
||||
return -1;
|
||||
}
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
// glad: load all OpenGL function pointers
|
||||
// ---------------------------------------
|
||||
if(!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
|
||||
{
|
||||
dbc::log("Failed to initialize GLAD");
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::vector<fuc2::Set> tests{
|
||||
shader_tests::TESTS
|
||||
};
|
||||
|
||||
return run_tests(tests, argc, argv);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue