This commit is contained in:
Robert 2021-01-20 00:18:31 +01:00
parent 6c47960b69
commit c3e49cd78e
10 changed files with 81 additions and 5 deletions

View file

@ -13,4 +13,5 @@ target_link_libraries(debug PRIVATE
add_custom_command(TARGET debug POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:openglu> $<TARGET_FILE:glfw> $<TARGET_FILE_DIR:debug>
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/shaders $<TARGET_FILE_DIR:debug>/shaders
)

View file

@ -47,7 +47,9 @@ int main(int argc, char** argv)
{ 0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0 }
};
oglu::Object(vertices, sizeof(vertices), nullptr, 0, topology, sizeof(topology));
oglu::Object triangle(vertices, sizeof(vertices), nullptr, 0, topology, sizeof(topology));
oglu::Shader shader("shaders/vertexShader.vert", "");
while (!glfwWindowShouldClose(window))

View file

@ -0,0 +1,7 @@
#version 330 core
layout (location = 0) in vec3 aPos;
void main()
{
gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
}