Giter Site home page Giter Site logo

Comments (8)

kvark avatar kvark commented on September 13, 2024

My main concern here is that a method call like that: list.clear(None, Some(1.0), None) is by far not self-descriptive. And if we introduce a separate time for each like that: list.clear(gfx::NoClearColor, gfx::ClearDepth(1.0), gfx::NoClearStencil), then there is no ergonomic benefit over what we already have now...

from gfx.

brendanzab avatar brendanzab commented on September 13, 2024

Perhaps:

list.with_color([0.3, 0.3, 0.3, 1.0])
    .with_depth(1.0)
    .clear(&frame);

list.clear(data, &frame);

from gfx.

kvark avatar kvark commented on September 13, 2024

Sounds good, especially since it can be implemented on top of the existing clear(), and self-contained within the front-end interface.

from gfx.

brendanzab avatar brendanzab commented on September 13, 2024

We will need to document this nicely. Assigned it to myself.

from gfx.

kvark avatar kvark commented on September 13, 2024

Keep in mind that this may be slightly inconsistent with other list calls. I.e. draw() doesn't have any builder, nor that It'd be useful. In the future, we are gonna have the transform() call, which would probably not need a builder either. So the clearing is gonna stand out a little.

from gfx.

brendanzab avatar brendanzab commented on September 13, 2024

Hmm. We need to think of a clean, unified way of doing all of this :/

from gfx.

kvark avatar kvark commented on September 13, 2024

@bvssvni proposed .clear_color_depth(color, depth)

from gfx.

kvark avatar kvark commented on September 13, 2024

Closing in favor of #630

from gfx.

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.