mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
merge renderer with main
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/13 20:21:13 by ycontre #+# #+# */
|
||||
/* Updated: 2025/01/30 17:52:32 by ycontre ### ########.fr */
|
||||
/* Updated: 2025/01/30 22:29:39 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -228,4 +228,14 @@ GLuint Shader::getProgram(void) const
|
||||
GLuint Shader::getProgramCompute(void) const
|
||||
{
|
||||
return (_program_compute);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<float> Shader::getOutputImage(void)
|
||||
{
|
||||
std::vector<float> res(WIDTH * HEIGHT * 4);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, _output_texture);
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, res.data());
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
return (res);
|
||||
}
|
||||
|
Reference in New Issue
Block a user