Skip to content

About

Ruby adapters for metaco textures, pixels, normalized events, and resize data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

metaco-ext

Small Ruby adapters for metaco textures, pixels, events, and resize data.

Gem Version Downloads Ruby Version License

Features · Installation · Quick Start


metaco-ext adds Ruby-side helpers around the native metaco API. Resource methods delegate to metaco, while event helpers provide a stable, normalized shape for graphics applications.

Features

  • Texture create, update, bind, and destroy helpers.
  • Compute and framebuffer pixel readback delegation.
  • Frozen, symbol-keyed event normalization.
  • Logical and framebuffer dimensions in resize events.
  • No in-memory substitute for native texture resources.

Installation

Add the extension to your Gemfile:

gem "metaco-ext"

For native resource methods on macOS, add metaco too:

gem "metaco"

Then run bundle install, or install the gem directly:

gem install metaco-ext

On macOS, install both gems for native resource methods:

gem install metaco metaco-ext

Requirements

  • Ruby 3.1 or newer.
  • Native resource methods require a compatible metaco installation and are available on macOS only. Calls without metaco raise LoadError.

Quick Start

require "metaco/ext"

resize = Metaco::Ext.resize_event(
  width: 800,
  height: 450,
  framebuffer_width: 1600,
  framebuffer_height: 900
)

puts resize[:framebuffer_width]

Native texture operations require a metaco build with texture support:

texture = Metaco::Ext.texture_create(handle, 2, 2, rgba_bytes)
Metaco::Ext.bind_compute_texture(handle, 0, texture)

Development

bundle install
bundle exec rake verify

Contributing

Bug reports and pull requests are welcome at rbgfx/metaco-ext.

License

MIT

About

Ruby adapters for metaco textures, pixels, normalized events, and resize data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages