mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-08 23:30:06 +00:00
Remove commented-out code
This commit is contained in:
parent
0f39b825e1
commit
eb128e65a4
162 changed files with 2092 additions and 6594 deletions
|
@ -156,92 +156,5 @@ void PostProcessingFX::render()
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GLuint blurTexture;
|
||||
GLuint emptyTexture() // Create An Empty Texture
|
||||
{
|
||||
GLuint txtnumber; // Texture ID
|
||||
unsigned int* data; // Stored Data
|
||||
|
||||
// Create Storage Space For Texture Data (128x128x4)
|
||||
data = (unsigned int*)new GLuint[((128 * 128)* 4 * sizeof(unsigned int))];
|
||||
ZeroMemory(data,((128 * 128)* 4 * sizeof(unsigned int))); // Clear Storage Memory
|
||||
|
||||
glGenTextures(1, &txtnumber); // Create 1 Texture
|
||||
glBindTexture(GL_TEXTURE_2D, txtnumber); // Bind The Texture
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, 4, 128, 128, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, data); // Build Texture Using Information In data
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
|
||||
|
||||
delete [] data; // Release data
|
||||
|
||||
return txtnumber; // Return The Texture ID
|
||||
}
|
||||
|
||||
PostProcessingFX::PostProcessingFX()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PostProcessingFX::init(FXTypes type)
|
||||
{
|
||||
if (type == FXT_RADIALBLUR)
|
||||
{
|
||||
blurTexture = emptyTexture();
|
||||
}
|
||||
enabled[(int)type] = true;
|
||||
}
|
||||
|
||||
void PostProcessingFX::shutdown(FXTypes type)
|
||||
{
|
||||
enabled[int(type)] = false;
|
||||
}
|
||||
|
||||
void PostProcessingFX::preRender()
|
||||
{
|
||||
for (int i = 0; i < FXT_MAX; i++)
|
||||
{
|
||||
if (enabled[i])
|
||||
{
|
||||
FXTType type = (FXType)i;
|
||||
switch(type)
|
||||
{
|
||||
case FXT_RADIALBLUR:
|
||||
glViewport(0,0,128,128); // Set Our Viewport (Match Texture Size;
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The Screen And Depth Buffer
|
||||
core->render();
|
||||
glBindTexture(GL_TEXTURE_2D,BlurTexture); // Bind To The Blur Texture
|
||||
|
||||
// Copy Our ViewPort To The Blur Texture (From 0,0 To 128,128... No Border)
|
||||
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 0, 0, 128, 128, 0);
|
||||
|
||||
glClearColor(0.0f, 0.0f, 0.5f, 0.5); // Set The Clear Color To Medium Blue
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The Screen And Depth Buffer
|
||||
|
||||
glViewport(0, 0, 800, 600);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PostProcessingFX::render()
|
||||
{
|
||||
for (int i = 0; i < FXT_MAX; i++)
|
||||
{
|
||||
if (enabled[i])
|
||||
{
|
||||
FXTType type = (FXType)i;
|
||||
switch(type)
|
||||
{
|
||||
case FXT_RADIALBLUR:
|
||||
glBegin(GL_QUADS);
|
||||
|
||||
glEnd();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue