Clone the repository containing the tasks and change to this lab's task 04. Follow the instructions to install the dependencies and build the project from the README.md.
$ git clone https://github.com/cs-pub-ro/EP-labs.git $ cd EP-labs/lab_05/task_04
If you get a GLFW error from glfwCreateWindow(), the most likely cause is that the maximum OpenGL version supported on your system does not meet the minimum requirement for the application. Note however that this minimum required version of OpenGL 4.6 core was chosen arbitrarily and you can change it.
# note how the OpenGL core profile version is < 4.6 $ glxinfo | grep 'OpenGL core profile version' OpenGL core profile version string: 4.3 (Core Profile) Mesa 26.0.3-arch2.2
Modify the GLFW_CONTEXT_VERSION_MINOR window hint in main.cpp from 6 to 3 (or whatever you've got). Do the same for the major version if yours is way behind any normal standard.
Now the window will be created but the application will still crash during the shader compilation. Modify the first line in both the vertex and the fragment shader:
-#version 460 core +#version 430 core
To run the project, simply run the binary generated by the build step. This will render a scene with a sphere. Follow the instructions in the terminal and progressively increase the number of vertices. Upon exiting the simulation with Esc, two .csv files will be created. You will use these measurements to generate plots.
Also pay close attention to your RAM!
Increase vertices until you have less than 10 FPS for good results.
We want to interpret the results recorded. In order to do this, we need to visually see them in a suggestive way. Plot the results in such a way that they are suggestive and easy to understand.
Explain the results you have plotted. Answer the following questions:
Go back to step b. and rerun the binary and make it run on your dedicated GPU. Redo the plot with the new measurements. You do not need to answer the questions again.
If you use AMD, you can use the DRI_PRIME=1 environment variable.