ECS/Project/Project/Renderers/RendererModules/GaussianBlurRendererModule/GaussianBlurModule.cpp
//	Create the Gaussian Blur Framebuffers.
Create the Gaussian Blur Framebuffers.
Create the Gaussian Blur Framebuffers .
void GaussianBlurModule::createGaussianBlurFramebuffers()
{
	glGenFramebuffers(1, &inputFramebufferID);
	glBindFramebuffer(GL_FRAMEBUFFER, inputFramebufferID);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorTextureOne, 0);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, inputDepthTexture, 0);
	GLenum inputDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 };
	glDrawBuffers(1, &inputDrawBuffers);
	glBindFramebuffer(GL_FRAMEBUFFER, 0);
	glGenFramebuffers(1, &vbFramebufferID);
	glBindFramebuffer(GL_FRAMEBUFFER, vbFramebufferID);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorTextureTwo, 0);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthTextureTwo, 0);
	GLenum vbDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 };
	glDrawBuffers(1, &vbDrawBuffers);
	glBindFramebuffer(GL_FRAMEBUFFER, 0);
	glGenFramebuffers(1, &hbFramebufferID);
	glBindFramebuffer(GL_FRAMEBUFFER, hbFramebufferID);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorTextureOne, 0);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthTextureOne, 0);
	GLenum hbDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 };
	glDrawBuffers(1, &hbDrawBuffers);
	glBindFramebuffer(GL_FRAMEBUFFER, 0);
	glGenFramebuffers(1, &outputFramebufferID);
	glBindFramebuffer(GL_FRAMEBUFFER, outputFramebufferID);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, 0);
	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, outputDepthTexture, 0);
	GLenum outputDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 };
	glDrawBuffers(1, &outputDrawBuffers);
	glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
void GaussianBlurModule :: createGaussianBlurFramebuffers ( ) { glGenFramebuffers ( 1 , & inputFramebufferID ) ; glBindFramebuffer ( GL_FRAMEBUFFER , inputFramebufferID ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D , colorTextureOne , 0 ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_DEPTH_STENCIL_ATTACHMENT , GL_TEXTURE_2D , inputDepthTexture , 0 ) ; GLenum inputDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 } ; glDrawBuffers ( 1 , & inputDrawBuffers ) ; glBindFramebuffer ( GL_FRAMEBUFFER , 0 ) ; glGenFramebuffers ( 1 , & vbFramebufferID ) ; glBindFramebuffer ( GL_FRAMEBUFFER , vbFramebufferID ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D , colorTextureTwo , 0 ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_DEPTH_STENCIL_ATTACHMENT , GL_TEXTURE_2D , depthTextureTwo , 0 ) ; GLenum vbDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 } ; glDrawBuffers ( 1 , & vbDrawBuffers ) ; glBindFramebuffer ( GL_FRAMEBUFFER , 0 ) ; glGenFramebuffers ( 1 , & hbFramebufferID ) ; glBindFramebuffer ( GL_FRAMEBUFFER , hbFramebufferID ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D , colorTextureOne , 0 ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_DEPTH_STENCIL_ATTACHMENT , GL_TEXTURE_2D , depthTextureOne , 0 ) ; GLenum hbDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 } ; glDrawBuffers ( 1 , & hbDrawBuffers ) ; glBindFramebuffer ( GL_FRAMEBUFFER , 0 ) ; glGenFramebuffers ( 1 , & outputFramebufferID ) ; glBindFramebuffer ( GL_FRAMEBUFFER , outputFramebufferID ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D , textureID , 0 ) ; glFramebufferTexture2D ( GL_FRAMEBUFFER , GL_DEPTH_STENCIL_ATTACHMENT , GL_TEXTURE_2D , outputDepthTexture , 0 ) ; GLenum outputDrawBuffers = { GL_COLOR_ATTACHMENT0 + 0 } ; glDrawBuffers ( 1 , & outputDrawBuffers ) ; glBindFramebuffer ( GL_FRAMEBUFFER , 0 ) ; }
Create the Gaussian Blur Framebuffers.
Create the Gaussian Blur Framebuffers .
//	Generate and Bind the Framebuffers. //	Bind the Appropriate Color and Depth Textures. //	Set the Input Draw Buffers. //	Bind the Framebuffers. //	--------------------------------------------------------------------------------------------------------------	// //	Generate and Bind the Vertical Blur Framebuffer ID. //	Bind the Appropriate Color and Depth Textures. //	Set the Draw Buffers. //	Bind the Default Framebuffer. //	--------------------------------------------------------------------------------------------------------------	// //	Generate and Bind the Horizontal Blur Framebuffer ID. //	Bind the Appropriate Color and Depth Textures. //	Set the Draw Buffers. //	Bind the Default Framebuffer. //	--------------------------------------------------------------------------------------------------------------	// //	Generate and the Bind the Framebuffers.s //	Bind the Appropriate Color and Depth Textures. //	Set the Ouput Draw Buffers. //	Bind the Default Framebuffers.