Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 28 10:57
    alexheretic commented #3791
  • Jan 27 10:05
    alexheretic edited #3791
  • Jan 27 00:05
    alexheretic edited #3791
  • Jan 26 23:58
    alexheretic edited #3791
  • Jan 26 23:57
    alexheretic opened #3792
  • Jan 26 23:56
    alexheretic opened #3791
  • Jan 26 23:54
    alexheretic opened #3790
  • Nov 04 2022 14:51
    cwfitzgerald closed #2656
  • Nov 04 2022 14:51
    cwfitzgerald commented #2656
  • Nov 04 2022 13:04
    Asubayo commented #2656
  • Oct 21 2022 18:50
    vmarcella closed #3789
  • Oct 21 2022 18:49
    vmarcella opened #3789
  • Aug 24 2022 22:54
    buzmeg closed #2342
  • Aug 24 2022 22:54
    buzmeg commented #2342
  • Jul 26 2022 08:12
    lazytiger opened #3788
  • Mar 29 2022 16:54
    schwa423 edited #3787
  • Mar 29 2022 16:48
    schwa423 edited #3787
  • Mar 28 2022 19:37
    schwa423 edited #3787
  • Mar 28 2022 19:35
    schwa423 opened #3787
  • Feb 27 2022 21:48
    cwfitzgerald closed #3786
ember arlynx
@emberian
:shipit:
ember arlynx
@emberian
I don't quite understand how envir etc work.
but, bbl.
ember arlynx
@emberian
@kvark ok, I can't figure out how to implement texture binding in the renderer.
Its interaction with uniforms is weird and I can't really piece together the different parts
Is just binding them to the texture unit it was created in order with fine, and the user is responsible for setting the proper uniform?
Is that also how HLSL works?
I feel like the user shouldn't have to manage that though
Dzmitry Malyshau
@kvark
@cmr you can leave this part to me, I don't want your PR to be held for too long. Envir is going away soon anyhow.
ember arlynx
@emberian
Ok.
It can be merged now then.
I hope it works :shipit:
Brendan Zabarauskas
@brendanzab
@kvark aww, you beat me!
:D
Dzmitry Malyshau
@kvark
sorry, didn't know who was around :)
ember arlynx
@emberian
Yay :D
Any thoughts on #113?
My first idea is to add a special buffer storage type
Dzmitry Malyshau
@kvark
@cmr since we can't send a slice really, we can send an Arc instead
ember arlynx
@emberian
That allows for reference-counted slices.
Essentially the slice type for this becomes (*refcount, *base, length)
And getting a real slice from this would borrow.
Destructor would decrease the refcount
I think this is like a DST Rc<[T]> but I am not sure...
Dzmitry Malyshau
@kvark
@cmr If only we had a test-case for it, but we really do not. I'd come back to this problem after @bjz (or anyone else) implements the terrain example, where the buffer is updated every frame.
@cmr but Rc<> can not be sent between tasks, no?
ember arlynx
@emberian
@kvark It would have to be Arc, right.
kvark @kvark didn't know GH closes referred issues automatically
ember arlynx
@emberian
Anyone mind if I take #80?
Dzmitry Malyshau
@kvark
@cmr that would be great
ember arlynx
@emberian
Hum. Moving the backends out of device will require device to expose a lot more of its internals.
Not sure we should actually do it -- @bjz?
Brendan Zabarauskas
@brendanzab
it would be nice to componentise the backends
not sure what it would look like
perhaps we should look to piston?
ember arlynx
@emberian
oh, also, @bvssvni was asking in #rust-gamedev earlier about gfx-rs's plans, to help plan for piston.
Dzmitry Malyshau
@kvark
I see he's got some ideas on the high-level interfaces (catching up on reddit...)
ember arlynx
@emberian
Hm, it's very difficult to break the circular dependency between device and gldevice.
Due to the lack of associated types.
device uses types gldevice defines, gldevice implements traits device defines...
Dzmitry Malyshau
@kvark
macro gods are kind to me today, I've got the shader link construction implemented:
struct Params {
    b: gfx::BufferHandle,
    x: int,
    t: gfx::TextureHandle,
}
struct _ParamsLink {
    b: ::gfx::BlockVarId,
    x: ::gfx::UniformVarId,
    t: ::gfx::TextureVarId,
}
#[automatically_derived]
impl ::gfx::ShaderParam<_ParamsLink> for Params {
    fn create_link<S: ::gfx::ParameterSink>(__arg_0: &S) ->
     Result<_ParamsLink, ::gfx::ParameterLinkError> {
        ::std::result::Ok(_ParamsLink{b: __arg_0.find_block("b").unwrap(),
                                      x: __arg_0.find_uniform("x").unwrap(),
                                      t: __arg_0.find_texture("t").unwrap(),})
    }
}
It's not processing the result properly yet though
Brendan Zabarauskas
@brendanzab
@cmr yeah, the circular dependency concerns me
@kvark ooh neat
Dzmitry Malyshau
@kvark
@bjz it may seem so trivial if you look at this, but the amount of code (and effort) is stunning
ember arlynx
@emberian
@kvark can I take #50?
Just trying to find something to do
Can't write useful code with it until your shader parameter stuff is done :P
Or maybe I will try and set up a blog...
Oh yes that was what I wanted to do.