diff --git a/src/main.c b/src/main.c index 33a231b..8a694d6 100644 --- a/src/main.c +++ b/src/main.c @@ -67,7 +67,9 @@ char* models[] = { "../obj/Zblock.obj", }; -// input handler for camera movement +/** + * Input handler for camera movement. + * */ void handleInputs(double deltaTime) { if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS) { cameraPosition.z += deltaTime * 10; @@ -117,6 +119,9 @@ void keyboardHandler(GLFWwindow* window, int key, int scancode, int action, int } } +/** + * Loads textures. + */ void loadTexture(char* textureFile, GLuint* texture) { int width, height, nrChannels; unsigned char* image = stbi_load(textureFile, &width, &height, &nrChannels, 0); @@ -266,6 +271,9 @@ void updateStats() { fflush(stdout); } +/** + * Main draw function. + */ void draw(void) { // FPS Counter @@ -389,12 +397,17 @@ void draw(void) { } } -// change viewport size and adjust aspect ratio when changing window size +/** + * Changes viewport size and adjust aspect ratio when changing window size + */ void framebuffer_size_callback(GLFWwindow *window, int width, int height) { glViewport(0, 0, width, height); aspectRatio = (float)width / height; } +/** + * Main function. + */ int main(int argc, char **argv) { // initialise window glfwInit(); diff --git a/src/objectHandler.c b/src/objectHandler.c index 89c1b04..ba4a504 100644 --- a/src/objectHandler.c +++ b/src/objectHandler.c @@ -75,7 +75,7 @@ void load_object(ObjectData* objectData) { } /** - * Takes a string-pointer and a number of files to read. + * Takes a string-pointer, a number of files to read and a number to store the added objects to * Returns an array of objects. */ ObjectData* readObjFiles(char** path, int numModels, int* count) {