-
Notifications
You must be signed in to change notification settings - Fork 9
Graphics Class
No Functionality.
No Functionality.
The initialize function is in charge of setting all the graphics items up. Starting if this is run on a Linux machine GLEW must be started.To use OpenGL 3.3 a vertex array must be bound, but it will not be utilized in this program. Then the camera, object, and shaders are created. The shader must initialize, then a vertex and fragment shader must be added, and finally the shaders must be finalized. Within the shader code there is a projection, view, and model that need data sent to them. These require knowledge of where they are, so data can be pushed to them for rendering purposes. Finally a adding a GL depth test, and return success.
Update will just run the update on the object.
Render will clear the screen for a redraw first. The program being used for this particular render must be enabled. The projection and view are passed to the GPU; gathered from the camera. The model is also passed in which is gathered from the object. The object is rendered. Then there is a check for any errors.
The camera for the scene.
The shader for the scene. Used to compile and add in variables from CPU to GPU.
This is used to point to the location of the projection in the shader.
This is used to point to the location of the view in the shader.
This is used to point to the location of the model in the shader.
The square object in the scene.

.png)