Sha256: fe2976d944763eb79a9db2755e9d73190ed0e3d51218cf1de0936d684c7b0095

Contents?: true

Size: 743 Bytes

Versions: 16

Compression:

Stored size: 743 Bytes

Contents

module Mittsu
  class CompressedTexture
    def update_specific
      gl_format = GL_MITTSU_PARAMS[format]
      gl_type = GL_MITTSU_PARAMS[type]

      mipmaps.each_with_index do |mipmap, i|
        if format != RGBAFormat && format != RGBFormat
          if @renderer.compressed_texture_formats.include?(gl_format)
            glCompressedTexImage2D(GL_TEXTURE_2D, i, gl_format, mipmap.width, mipmap.height, 0, mipmap.data)
          else
            puts 'WARNING: Mittsu::Texture: Attempt to load unsupported compressed texture format in #update_texture'
          end
        else
          glTexImage2D(GL_TEXTURE_2D, i, gl_format, mipmap.width, mipmap.height, 0, gl_format, gl_type, mipmap.data)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mittsu-0.4.1 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.4.0 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.3.3 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.3.2 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.3.1 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.3.0 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.2.4 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.2.3 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.2.2 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.2.1 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.2.0 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.1.7 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.1.6 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.1.5 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.1.4 lib/mittsu/renderers/opengl/textures/compressed_texture.rb
mittsu-0.1.3 lib/mittsu/renderers/opengl/textures/compressed_texture.rb