ECS/Project/Project/Renderers/RendererModules/GaussianBlurRendererModule/GaussianBlurModule.cpp
//	Create the Gaussian Blur Textures.
Create the Gaussian Blur Textures.
Create the Gaussian Blur Textures .
void GaussianBlurModule::createGaussianBlurTextures()
{
	glGenTextures(1, &colorTextureOne);
	glBindTexture(GL_TEXTURE_2D, colorTextureOne);
	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, textureWidth, textureHeight, 0, GL_RGBA, GL_FLOAT, NULL);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
	glBindTexture(GL_TEXTURE_2D, 0);
	glGenTextures(1, &depthTextureOne);
	glBindTexture(GL_TEXTURE_2D, depthTextureOne);
	glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, textureWidth, textureHeight, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	glBindTexture(GL_TEXTURE_2D, 0);
	glGenTextures(1, &colorTextureTwo);
	glBindTexture(GL_TEXTURE_2D, colorTextureTwo);
	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, textureWidth, textureHeight, 0, GL_RGBA, GL_FLOAT, NULL);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
	glBindTexture(GL_TEXTURE_2D, 0);
	glGenTextures(1, &depthTextureTwo);
	glBindTexture(GL_TEXTURE_2D, depthTextureTwo);
	glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, textureWidth, textureHeight, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	glBindTexture(GL_TEXTURE_2D, 0);
}
void GaussianBlurModule :: createGaussianBlurTextures ( ) { glGenTextures ( 1 , & colorTextureOne ) ; glBindTexture ( GL_TEXTURE_2D , colorTextureOne ) ; glTexImage2D ( GL_TEXTURE_2D , 0 , GL_RGBA32F , textureWidth , textureHeight , 0 , GL_RGBA , GL_FLOAT , NULL ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER , GL_NEAREST ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MAG_FILTER , GL_NEAREST ) ; glBindTexture ( GL_TEXTURE_2D , 0 ) ; glGenTextures ( 1 , & depthTextureOne ) ; glBindTexture ( GL_TEXTURE_2D , depthTextureOne ) ; glTexImage2D ( GL_TEXTURE_2D , 0 , GL_DEPTH24_STENCIL8 , textureWidth , textureHeight , 0 , GL_DEPTH_STENCIL , GL_UNSIGNED_INT_24_8 , NULL ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER , GL_LINEAR ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MAG_FILTER , GL_LINEAR ) ; glBindTexture ( GL_TEXTURE_2D , 0 ) ; glGenTextures ( 1 , & colorTextureTwo ) ; glBindTexture ( GL_TEXTURE_2D , colorTextureTwo ) ; glTexImage2D ( GL_TEXTURE_2D , 0 , GL_RGBA32F , textureWidth , textureHeight , 0 , GL_RGBA , GL_FLOAT , NULL ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER , GL_NEAREST ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MAG_FILTER , GL_NEAREST ) ; glBindTexture ( GL_TEXTURE_2D , 0 ) ; glGenTextures ( 1 , & depthTextureTwo ) ; glBindTexture ( GL_TEXTURE_2D , depthTextureTwo ) ; glTexImage2D ( GL_TEXTURE_2D , 0 , GL_DEPTH24_STENCIL8 , textureWidth , textureHeight , 0 , GL_DEPTH_STENCIL , GL_UNSIGNED_INT_24_8 , NULL ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER , GL_LINEAR ) ; glTexParameteri ( GL_TEXTURE_2D , GL_TEXTURE_MAG_FILTER , GL_LINEAR ) ; glBindTexture ( GL_TEXTURE_2D , 0 ) ; }
Create the Gaussian Blur Textures.
Create the Gaussian Blur Textures .
//	Generate and Bind the Color Texture One. //	Initialize the Color Texture. //	Unbind the Color Texture One. //	Generate and Bind the Depth Texture One. //	Initialize the Depth Texture. //	Unbind the Depth Texture One. //	Generate and Bind the Color Texture Two. //	Initialize the Color Texture. //	Unbind the Color Texture Two. //	Generate and Bind the Depth Texture One. //	Initialize the Depth Texture. //	Unbind the Depth Texture One.