This shows you the differences between two versions of the page.
egc:laboratoare:06 [2018/11/06 16:05] andrei.lambru [Cerinte laborator] |
egc:laboratoare:06 [2021/11/19 13:08] (current) victor.asavei [Cerinte laborator] |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Laboratorul 06 ===== | ===== Laboratorul 06 ===== | ||
+ | **Video Laborator 6**: https://youtu.be/f7q2TGCRly0 \\ | ||
+ | **Autor**: [[maria_anca.balutoiu@upb.ro | Anca Băluțoiu]] | ||
==== Banda Grafica ==== | ==== Banda Grafica ==== | ||
Line 111: | Line 113: | ||
* **shader_program** reprezinta ID-ul programului shader compilat pe placa video | * **shader_program** reprezinta ID-ul programului shader compilat pe placa video | ||
- | * in cadrul framework-ului de laborator ID-ul se poate obtine apeland functia ''shader->GetProgramID()'' sau direct accesand vriabila membru ''shader->program'' | + | * in cadrul framework-ului de laborator ID-ul se poate obtine apeland functia ''shader->GetProgramID()'' sau direct accesand variabila membru ''shader->program'' |
Line 194: | Line 196: | ||
</note> | </note> | ||
- | - Descarcati [[https://github.com/UPB-Graphics/Framework-EGC/archive/master.zip|framework-ul de laborator]] | + | - Descarcati [[https://github.com/UPB-Graphics/gfx-framework/archive/master.zip|framework-ul de laborator]] |
- Completati functia ''RenderSimpleMesh'' astfel inca sa trimiteti corect valorile uniform catre Shader | - Completati functia ''RenderSimpleMesh'' astfel inca sa trimiteti corect valorile uniform catre Shader | ||
* Se interogeaza locatia uniformelor "Model", "View" si "Projection" | * Se interogeaza locatia uniformelor "Model", "View" si "Projection" | ||
Line 200: | Line 202: | ||
* Daca ati completat corect functia, si ati completat gl_Position in vertex shader, ar trebui sa vedeti un cub pe centrul ecranului rottit 45 grade in jurul lui Y si colorat variat | * Daca ati completat corect functia, si ati completat gl_Position in vertex shader, ar trebui sa vedeti un cub pe centrul ecranului rottit 45 grade in jurul lui Y si colorat variat | ||
- Completati Vertex Shaderul | - Completati Vertex Shaderul | ||
- | - Se de clara atributele de intrare pentru ''Vertex Shader'' folosind layout location <code glsl> | + | - Se declara atributele de intrare pentru ''Vertex Shader'' folosind layout location <code glsl> |
layout(location = 0) in vec3 v_position; | layout(location = 0) in vec3 v_position; | ||
// same for the rest of the attributes ( check Lab6.cpp CreateMesh() ); | // same for the rest of the attributes ( check Lab6.cpp CreateMesh() ); |