HW1-Bezier Surfaces
Greetings and welcome to my blog! I will start the blog with the design choices I made and show some results. After that I will discuss some topics about the implementation. Design Choices: Setup Flow: The program I have written in this homework is pretty simplistic. While writing such programs, I generally do not prefer Object Oriented Design, which I am still not sure I am a big fan of. So, I have used global variables and structs extensively. A bezier curve is represented by a struct that contains all the necessary geometric and OpenGL data. Geometric data consists of UV values required to compute Bernstein Polynomials in the shader, control points, triangulation information, etc. While processing the input file, those data in the struct have been filled. After all the necessary data have been gathered, triangulation, OpenGL buffer creation, and CPU-GPU transfer have been done. Data in The Shader Side: Inside the layout locations, I only pass the UV coordinates of the vertices...