Sha256: 7444ba9bc56f5deac74daf95f60f163b01527cbbebe367d71712da62e3d7c91c
Contents?: true
Size: 926 Bytes
Versions: 20
Compression:
Stored size: 926 Bytes
Contents
require 'mittsu/textures/texture' module Mittsu class CompressedTexture < Texture attr_accessor :mipmaps def initialize(mipmaps = nil, width = nil, height = nil, format = RGBAFormat, type = UnsignedByteType, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, anisotropy = 1) super(null, mapping, wrap_s, wrap_t, mag_filter, min_filter, format, type, anisotropy) @image = { width: width, height: height } @mipmaps = mipmaps # no flipping for cube textures # (also flipping doesn't work for compressed textures ) @flip_y = false # can't generate mipmaps for compressed textures # mips must be embedded in DDS files @generate_mipmaps = false end def clone texture = CompressedTexture.new super(texture) texture end end end
Version data entries
20 entries across 20 versions & 1 rubygems