forked from bartvdbraak/blender
BGE: Fixing a performance regression with 2D filters. My changes caused a check to fail every frame resulting in constant recreation of textures.
This commit is contained in:
parent
94576f20f4
commit
f405d8fa53
@ -52,7 +52,6 @@
|
||||
|
||||
RAS_2DFilterManager::RAS_2DFilterManager():
|
||||
texturewidth(-1), textureheight(-1),
|
||||
canvaswidth(-1), canvasheight(-1),
|
||||
/* numberoffilters(0), */ /* UNUSED */ need_tex_update(true)
|
||||
{
|
||||
isshadersupported = GLEW_ARB_shader_objects &&
|
||||
@ -404,7 +403,7 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
|
||||
RAS_Rect rect = canvas->GetWindowArea();
|
||||
int rect_width = rect.GetWidth()+1, rect_height = rect.GetHeight()+1;
|
||||
|
||||
if (canvaswidth != canvas->GetWidth() || canvasheight != canvas->GetHeight())
|
||||
if (texturewidth != rect_width || textureheight != rect_height)
|
||||
{
|
||||
UpdateOffsetMatrix(canvas);
|
||||
UpdateCanvasTextureCoord((unsigned int*)viewport);
|
||||
|
@ -62,8 +62,6 @@ private:
|
||||
unsigned int texname[3];
|
||||
int texturewidth;
|
||||
int textureheight;
|
||||
int canvaswidth;
|
||||
int canvasheight;
|
||||
/* int numberoffilters; */ /* UNUSED */
|
||||
/* bit 0: enable/disable depth texture
|
||||
* bit 1: enable/disable luminance texture*/
|
||||
|
Loading…
Reference in New Issue
Block a user