X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture.h;h=30c6496a5658525e00a6ac59374996c25f08d7e3;hb=2ba5af95fb7341b0e6b212e28d03208c6747aae5;hp=ad41e573ed5d53b409f82794ae44afec96a1a23e;hpb=78840e775c62c1b6e3f550bf8be1f0b828df91aa;p=libs%2Fgl.git diff --git a/source/texture.h b/source/texture.h index ad41e573..30c6496a 100644 --- a/source/texture.h +++ b/source/texture.h @@ -64,15 +64,16 @@ protected: { NO_SWIZZLE, R_TO_LUMINANCE, - RG_TO_LUMINANCE_ALPHA + RG_TO_LUMINANCE_ALPHA, + RGB_TO_BGR }; unsigned id; GLenum target; - PixelFormat ifmt; + PixelFormat format; + PixelFormat storage_fmt; FormatSwizzle swizzle; bool auto_gen_mipmap; - mutable int dirty_params; Sampler default_sampler; static int swizzle_orders[]; @@ -84,19 +85,14 @@ public: ~Texture(); protected: - static DataType get_alloc_type(PixelFormat); - void set_internal_format(PixelFormat); - PixelFormat get_upload_format(PixelFormat) const; + void set_format(PixelFormat); + void apply_swizzle(); + void set_parameter_i(GLenum, int) const; public: Sampler &get_default_sampler() { return default_sampler; } const Sampler &get_default_sampler() const { return default_sampler; } -protected: - void update_parameter(int) const; - void set_parameter_i(GLenum, int) const; - void set_parameter_f(GLenum, float) const; -public: DEPRECATED void set_min_filter(TextureFilter); DEPRECATED void set_mag_filter(TextureFilter);