From cb836adcf11f690188df9b7bc59f3fe87b67aaa7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 28 Oct 2016 01:52:13 +0300 Subject: [PATCH] Use ARB_texture_storage for defining texture storage --- extensions/arb_texture_storage.glext | 1 + source/texture1d.cpp | 20 +++++++++++++++++--- source/texture2d.cpp | 20 +++++++++++++++++--- source/texture3d.cpp | 20 +++++++++++++++++--- source/texturecube.cpp | 24 +++++++++++++++++++----- 5 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 extensions/arb_texture_storage.glext diff --git a/extensions/arb_texture_storage.glext b/extensions/arb_texture_storage.glext new file mode 100644 index 00000000..c7526339 --- /dev/null +++ b/extensions/arb_texture_storage.glext @@ -0,0 +1 @@ +extension ARB_texture_storage diff --git a/source/texture1d.cpp b/source/texture1d.cpp index 0dc85586..44e49f51 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -1,3 +1,4 @@ +#include #include #include "bindable.h" #include "error.h" @@ -37,8 +38,18 @@ void Texture1D::allocate(unsigned level) if(allocated&(1< #include "bindable.h" #include "buffer.h" #include "error.h" @@ -65,8 +66,18 @@ void Texture2D::allocate(unsigned level) if(allocated&(1< +#include #include #include #include "bindable.h" @@ -53,8 +54,18 @@ void Texture3D::allocate(unsigned level) if(allocated&(1< #include +#include #include #include #include "bindable.h" @@ -51,10 +52,20 @@ void TextureCube::allocate(unsigned level) if(allocated&(1<