]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/frameformat.cpp
Nudge the FrameFormat floating-point flag one bit to the left
[libs/gl.git] / source / core / frameformat.cpp
index 30d7a47f36500d43172e8fece217e4ebb608c1ed..f023aba799a59d19cde92ae5e09f7f4fdb9f603d 100644 (file)
@@ -89,7 +89,7 @@ FrameAttachment make_typed_attachment(FrameAttachment fa, PixelFormat pf)
        }
 
        DataType type = get_component_type(pf);
-       return static_cast<FrameAttachment>((fa&0xFC00) | (is_float(type)*0x80) | get_type_size(type)<<4 | get_component_count(comp));
+       return static_cast<FrameAttachment>((fa&0xFC00) | (is_float(type)*0x100) | get_type_size(type)<<4 | get_component_count(comp));
 }
 
 FrameAttachment make_indexed_attachment(FrameAttachment fa, unsigned i)
@@ -115,7 +115,7 @@ PixelFormat get_attachment_pixelformat(UInt16 fa)
                comp = static_cast<PixelComponents>(fa&7);
 
        DataType type;
-       if(fa&0x80)
+       if(fa&0x100)
                type = static_cast<DataType>((fa&0x70)>>4 | 0x300);
        else
                type = static_cast<DataType>((fa&0x70)>>4);