cw1_presentation - Computer Graphics Assignment One...

Info icon This preview shows pages 1–14. Sign up to view the full content.

Computer Graphics Assignment One
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Objective Input Output
Image of page 2
Objective Flat shading Gouraud shading Phong shading
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

OpenGL Pipeline Vertex Data Primitive parameter interpolation Viewport transform to window space
Image of page 4
GLSL Shaders Vertex Data Primitive parameter interpolation Viewport transform to window space
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

GLSL Shaders Vertex Data (positions,normals, UV coordinates) Vertex Shader Fragment Shader Interpolated data Interpolation of attributes Transformation Matrices, Materials, Lighting Info
Image of page 6
Source Code TriangleMesh class Loads “teapot.obj”, holds mesh info No Normal information, these must be computed Use Triangles structures for this Remember to normalise! Shader class Init function loads vertex and fragment shader programs from text files:
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Source Code
Image of page 8
Source Code ......
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

GLSL Shaders Vertex Data (positions,normals, UV coordinates) Vertex Shader Fragment Shader Interpolated data Interpolation of attributes Transformation Matrices, Materials, Lighting Info
Image of page 10
Source Code Vertex Buffer Objects Stores data that will be used in shader programs
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Source Code “exampleShader.vert”
Image of page 12
Source Code “demo1.cpp” - DemoDisplay() Setting “in” variables ...
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 14
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '14
  • Shader, vertex shader, Fragment Shader

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern