Giter Club home page Giter Club logo

Comments (5)

kpreid avatar kpreid commented on September 21, 2024 1

TexelUpload::reserve in luminance 0.46 is working for what I needed.

from luminance-rs.

ColonelThirtyTwo avatar ColonelThirtyTwo commented on September 21, 2024

Yeah, seems like an oversight in the new API. It should be easy to add another option to TexelUpload.

from luminance-rs.

hadronized avatar hadronized commented on September 21, 2024
TexelUpload::base_level_with_mipmaps(&[], mipmaps),

Is what is currently being used. A missing bit of documentation, I guess.

from luminance-rs.

kpreid avatar kpreid commented on September 21, 2024

That doesn't seem to work. For example, if I modify my code to

        let texture = context.new_texture(
            layout.dimensions(),  // [256, 256, 256]
            Sampler {
                wrap_s: Wrap::ClampToEdge,
                wrap_t: Wrap::ClampToEdge,
                wrap_r: Wrap::ClampToEdge,
                mag_filter: MagFilter::Nearest,
                min_filter: MinFilter::Nearest,
                ..Sampler::default()
            },
            TexelUpload::base_level_with_mipmaps(&[], 0),
        )?;

then I get the runtime error NotEnoughPixels { expected_bytes: 67108864, provided_bytes: 0 }.

Ah, I see a possible misunderstanding. I want to create a texture of a specific nonzero size so that I can later write to parts of it (in texture atlas fashion) using upload_part(), and that used to work. Uploading 64 MiB of dummy pixels can take around 100 ms on the WebGL backend in Chrome, and I'd like to avoid a frame hiccup that large in the event I need to resize the atlas.

from luminance-rs.

hadronized avatar hadronized commented on September 21, 2024

Yep, I reproduce with mrt example. Thanks for noticing.

from luminance-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.