ソースを参照

Merge pull request #551 from seanpaultaylor/next

FrameBuffers can now be non power of 2.
Sean Paul Taylor 13 年 前
コミット
458ecfaf04
1 ファイル変更0 行追加10 行削除
  1. 0 10
      gameplay/src/FrameBuffer.cpp

+ 0 - 10
gameplay/src/FrameBuffer.cpp

@@ -84,12 +84,6 @@ FrameBuffer* FrameBuffer::create(const char* id, unsigned int width, unsigned in
     RenderTarget* renderTarget = NULL;
     RenderTarget* renderTarget = NULL;
     if (width > 0 && height > 0)
     if (width > 0 && height > 0)
     {
     {
-        if (!isPowerOfTwo(width) | !isPowerOfTwo(height))
-        {
-            GP_ERROR("Failed to create render target for frame buffer. Width and Height must be a power of 2.");
-            return NULL;
-        }
-
         // Create a default RenderTarget with same ID.
         // Create a default RenderTarget with same ID.
         renderTarget = RenderTarget::create(id, width, height);
         renderTarget = RenderTarget::create(id, width, height);
         if (renderTarget == NULL)
         if (renderTarget == NULL)
@@ -266,9 +260,5 @@ void FrameBuffer::bindDefault()
     __currentHandle = __defaultHandle;
     __currentHandle = __defaultHandle;
 }
 }
 
 
-bool FrameBuffer::isPowerOfTwo(unsigned int value)
-{
-    return (value != 0) && ((value & (value - 1)) == 0);
-}
 
 
 }
 }