#include <msp/io/memory.h>
#include "error.h"
#include "resourcemanager.h"
-#include "resources.h"
#include "texture.h"
using namespace std;
namespace Msp {
namespace GL {
-int Texture::swizzle_orders[] =
+const int Texture::swizzle_orders[] =
{
GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA,
GL_RED, GL_RED, GL_RED, GL_ONE,
Texture::Texture(GLenum t, ResourceManager *m):
id(0),
target(t),
- format(RGB8),
- storage_fmt(RGB8),
+ format(NO_PIXELFORMAT),
+ storage_fmt(format),
swizzle(NO_SWIZZLE),
use_srgb_format(false),
auto_gen_mipmap(false)
}
}
-void Texture::set_parameter_i(GLenum param, int value) const
+void Texture::set_parameter_i(unsigned param, int value) const
{
if(ARB_direct_state_access)
glTextureParameteri(id, param, value);