mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 10:48:34 +02:00
+ | Texture working on sphere
This commit is contained in:
@ -114,7 +114,10 @@ void Scene::addObject(Object *obj)
|
||||
gpu_triangle.normal = triangle->getNormal();
|
||||
|
||||
_gpu_triangles.push_back(gpu_triangle);
|
||||
return ;
|
||||
|
||||
gpu_obj.vertex1 = triangle->getVertex2();
|
||||
gpu_obj.vertex2 = triangle->getVertex3();
|
||||
gpu_obj.normal = triangle->getNormal();
|
||||
}
|
||||
else if (obj->getType() == Object::Type::PORTAL)
|
||||
{
|
||||
|
@ -105,6 +105,13 @@ void Shader::attach(void)
|
||||
_program = glCreateProgram();
|
||||
_program_compute = glCreateProgram();
|
||||
|
||||
glProgramParameteri(_program_compute, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE);
|
||||
glProgramParameteri(_program, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE);
|
||||
|
||||
glEnable(GL_DEBUG_OUTPUT);
|
||||
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, GL_TRUE);
|
||||
|
||||
glAttachShader(_program, _vertex);
|
||||
glAttachShader(_program, _fragment);
|
||||
glAttachShader(_program_compute, _compute);
|
||||
|
Reference in New Issue
Block a user