0.1.
Look at the file Texture.h to get to know the texturing interface used in todays exercise.

0.2. 
In a complex project different tpes of objects are drawn with different shaders. We need a programming architecture that supports such demands. Look at the function renderScene() it now contains call of function  drawObjectColor() and drawObjectTexture() instead of just drawObject().
The function drawObjectColor() uses the shaders shader_color.vert and shader_color.frag, and the function drawObjectTexture() uses shader_tex.vert and shader_tex.frag (also look at the changes in init()).
For now the functions have the same set of instructions, as well as shaders. In the exercises 1 and 2 you should modify drawObjectTexture() and the corresponding shaders, while the function drawObjectColor() should stay the same. After finishing the exercises the function drawObjectColor() can be used to draw objects of the same color, and the function drawObjectTexture for textured objects.
 
 
1. Load a texture into computer memory:
- Create in the C++ code a global variable of type GLuint (the returned type of function Core::LoadTexture).
- In the function init() set the value of this new variable equal to the returned value of the function Core::LoadTexture (the texture identificator). Fielpath to the new texture is "textures/grid.png"
- Modify the list of function arguments of drawObjectTexture() such, that the last parameter will be the identificator of the new texture instead of a vector of color information.

2. Modify the shader such, that it maps a texture on the object drawn:

a) Send the uv coordinates from vertex shader to fragment shader (accessible under the name vertexTexCoord) using "in" and "out" specifiers

b) Send the texture to the fragment shader:
- Create a variable of the type "uniform sampler2D" in the fragment shader - analogously to other variables of the type uniform used in the past exercises - pick a name of your choice
- sampler2D is a new type of data structure that will store color information of textures
- On the side of the C++ code use the function Core::SetActiveTexture to send the texture information to the new sampler2D variable

c) Use the color information stored in the texture instead of the color (objectColor) to colorize the objects:
- Sample the color information of the texture using the texture coordinates you hvae sent earlier to the fragment shader:  "vec4 textureColor = texture2D(nazwaZmiennejSampler2D, uvCorddinateName)" (vec4 contains RGBA colors)
- The uv-coordinates are inteprolated autmatically by the OpenGL pipeline. Use the first three elements of the newly obtained vector textureColor as color information for the current fragment.


3. Explore the texturing mechanisms:
- Multiply one or two uv-coordinates by 5 and observe the result
- Try out the other textures: grid_color.png, earth.png and earth2.png.
- Earth texture is drawn upside down. Fix this issue.


4. Procedural texturing

a) Create a third pair of files containing glsl instructions (e.g. shader_proc_tex.vert and shader_proc_tex.frag), and a third function drawObjectProceduralTexture

b) A simple way of procedural texturing, is calculating the fragment color as a function of fragment position in object space (if you use world space coordinates the colors would change as the objects moves).
- Send the vertex position in object space from vertex t fragment shader 
- In the fragment shader compute the the sine value of the y coordinate of the fragment position
- If the sine value is smaller than zero, set it to a color of your choice, and in the converse case to a different one
- You can send those colors also from the side of the C++ code - this enables the drawing of different pairs of colors for objects
- Experiment with other procedural texturing techniques shown in the lecture
