These are chat archives for bjz/gfx-rs

10th
Jul 2014
Brendan Zabarauskas
@brendanzab
Jul 10 2014 01:55
@kvark what does FloatSubType do?
does FloatPrecision mean that it must be 64bits?
where as FloatDefault means it doesn't matter?
Dzmitry Malyshau
@kvark
Jul 10 2014 01:56
@bjz Yes, that was the idea.
Thing is 64bit floats have a special way of binding - glVertexAttribLPointer - used when the shader expects 64bits, but they can also be bind regularly (if the shader expects 32bit floats).
Dzmitry Malyshau
@kvark
Jul 10 2014 02:50

Basically, for async resources, the problem is to know what handle the incoming resource belong to. I can see 2 possible ways to approach this:

  1. Have a queue of the requested resources on the render task side. The queue has handles, so whenever render task decides to check for incoming resources, it goes through the queue, matches types, and uses its indices. Negative side is: need to have a separate enum type for the queue. Also - doesn't really allow the back-end to load anything asynchronously.
  2. Pass the handle in the request and hope that the reply will contain it unchanged. Obviously, this puts unnecessary trust into the back-end....

Ideas?

brendanzab @bjz is curious if @photex has any thoughts
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:22
so did we work out a solution to GL_ARB_uniform_buffer_object not being able to be found on OSX?
because the triangle example works fine without the checks
and the extension viewer says osx supports it
Dzmitry Malyshau
@kvark
Jul 10 2014 03:23
I think it doesn't have to be listed as an extension, if it's in the core
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:24
Screen Shot 2014-07-09 at 8.23.37 pm.png
Dzmitry Malyshau
@kvark
Jul 10 2014 03:26
who knows what extension viewer is really doing? Of course it is supported, since it's in the GL core profile. That's all we need to know, unless I'm missing something.
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:30
I have a fix:
            uniform_block_supported: info.version >= Version(3, 1, None, "")
                || info.is_extension_supported("GL_ARB_uniform_buffer_object"),
            array_buffer_supported: info.version >= Version(3, 0, None, "")
                || info.is_extension_supported("GL_ARB_vertex_array_object"),
Dzmitry Malyshau
@kvark
Jul 10 2014 03:30
looks good, ship it!
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:30
:shipit:
@kvark #90
Sorry, just had to understand the problem first
Dzmitry Malyshau
@kvark
Jul 10 2014 03:34
well you got it right, so no need to be sorry ;)
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:34
in the end!
kvark @kvark should have updated it rust before doing stuff
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:35
OOOHHH, yay @cmr for travis
@kvark check out that sidebar ->
Dzmitry Malyshau
@kvark
Jul 10 2014 03:38
yeah, saw that, pretty handy!
Corey Richardson
@cmr
Jul 10 2014 03:39
:)
Dzmitry Malyshau
@kvark
Jul 10 2014 03:50
@bjz you must be worshiping Elite, the goddess of procedural worlds?
Dzmitry Malyshau
@kvark
Jul 10 2014 03:58
@amaranth \o/
Brendan Zabarauskas
@brendanzab
Jul 10 2014 03:58
@amaranth ohai
@kvark dunno...
@kvark never really looked into elite
@kvark I like the concept of it though
Dzmitry Malyshau
@kvark
Jul 10 2014 04:21
@bjz ok, I got nothing for today :(
If anyone has time, could you please improve our Makefile to actually rebuild only if necessary? With newest rust we know the names of libraries in advance, so we can exploit that.
Corey Richardson
@cmr
Jul 10 2014 04:55
@kvark I'll take a shot at it when I'm finished copying down hiragana
brendanzab @bjz is working on documenting functions and stuff
Brendan Zabarauskas
@brendanzab
Jul 10 2014 04:57
@kvark no worries!
Travis Watkins
@amaranth
Jul 10 2014 06:23
Don't think I'll be using this as chat, probably just load it every so often to see what has been going on :)
Brendan Zabarauskas
@brendanzab
Jul 10 2014 06:25
@amaranth are you interested in gfx-rs?
Travis Watkins
@amaranth
Jul 10 2014 06:37
@bjz Yeah, dunno if I'll be able to contribute anything though, mostly taking a wait and see approach to rust until things stabilize.
Brendan Zabarauskas
@brendanzab
Jul 10 2014 06:47
@amaranth neat, glad to have you around anyway! :)
Dzmitry Malyshau
@kvark
Jul 10 2014 12:29
@bjz I decided to go the token approach (render passes a handle or just an index with each request, and expects to receive it some time later to know where to put the resource), because the part responsible for it on the device side is cross platform, and there is very little room to screw up. It would be nice to have those tokens unavailable to construct on the device side, and I have some ideas how to implement it.
@amaranth If you want to have an overview of what's cooking up and where you can help - take a look at our waffle board
Marvin Löbel
@Kimundi
Jul 10 2014 12:31
@bjz: my make deps all still fails because of sax-rs, could you merge the PR you have there?
Dzmitry Malyshau
@kvark
Jul 10 2014 12:35
@Kimundi good to know you fixed it, I stopped yesterday when I saw the failure. Funny that sax-rs got another PR doing pretty much the same after yours, it seems.
Marvin Löbel
@Kimundi
Jul 10 2014 12:35
yeah, just saw that xD
To brandonsons credit, he fixes the example which I seem to have missed
I hope once we have cargo support everywhere, there will be a simple build command to build everything to test cases like this
Dzmitry Malyshau
@kvark
Jul 10 2014 12:37
@Kimundi true... But I hope we'll keep maintaining Makefile nevertheless
Marvin Löbel
@Kimundi
Jul 10 2014 12:39
I have no opinion about that, because I never much dealt with them :P
Still have no idea how I would add rust-empty support to a project for example.
kvark @kvark tries to figure out what should be the focus of the terrain example, in the context of what the triangle already has.... Can't think of anything outside the shader parameters (model/view/camera transforms, shading stuff). That seems like a rather small focus, we need more. @bjz?
Dzmitry Malyshau
@kvark
Jul 10 2014 12:53
@bjz Oh, texturing should be there as well. BTW, I believe we need the "deferred example" for a demonstration of off-screen targets, more shaders, and some cool stencil modes (for light culling).
Oh, I've just read the README on terrain example. So the external dependencies is a part of the focus. However, texturing is not planned there...
Dzmitry Malyshau
@kvark
Jul 10 2014 14:38
I'm also looking forward to those examples (terrain, deferred, etc) for they will reveal our hottest ergonomic issues, hopefully.
Brendan Zabarauskas
@brendanzab
Jul 10 2014 15:08
agreed about examples
if you have any more ideas, feel free
perhaps we could have some performance intesive stuff too
Dzmitry Malyshau
@kvark
Jul 10 2014 15:14
@bjz oh, a benchmark example? that would be neat to have when introducing caching and optimizing stuff
Marvin Löbel
@Kimundi
Jul 10 2014 15:25
@bjz: Did I just become a contributor of sax-rs, or was I that since being a gfx contributor?
Dzmitry Malyshau
@kvark
Jul 10 2014 15:39

@cmr An excerpt from the "A trip through the graphics pipeline" link that you provided earlier:

texture borders are probably not implemented in the texture sampler, but emulated with extra code in the shader (or just not supported at all)

So, perhaps, providing the CLAMP_TO_BORDER doesn't worth it for the gfx-rs level at all?

kvark @kvark feels himself a student again. So much practice in the past, and yet so much to learn in the future...
Brendan Zabarauskas
@brendanzab
Jul 10 2014 16:14
almost done with the updates of gl-rs and friends
Brendan Zabarauskas
@brendanzab
Jul 10 2014 16:24
@kvark you are now a contributor :)
Marvin Löbel
@Kimundi
Jul 10 2014 16:26
@bjz: Hm, seems like the gl-rs update still has trouble with the sax submodule
Brendan Zabarauskas
@brendanzab
Jul 10 2014 16:27
#-_-
Marvin Löbel
@Kimundi
Jul 10 2014 16:36
How do you retrigger a travis build?
@bjz Your update branch build locally for me, would it be okay to just merge it?
Brendan Zabarauskas
@brendanzab
Jul 10 2014 16:38
yeah
Marvin Löbel
@Kimundi
Jul 10 2014 16:42
I hope all this chasing-the-submodule stuff can just die once cargo is a bit more mature... :P
@bjz: Btw, I wonder if the glfw window_create() fallback stuff could just live in in glfw-rs directly, seeing how it doesn't depend on gfx at all. But thats probably out of scope for it, right?
Dzmitry Malyshau
@kvark
Jul 10 2014 17:22
@Kimundi I think that's a good idea
Marvin Löbel
@Kimundi
Jul 10 2014 17:25
@kvark: r? #91
Dzmitry Malyshau
@kvark
Jul 10 2014 17:26
@Kimundi still failing?
Marvin Löbel
@Kimundi
Jul 10 2014 17:26
@kvark Not locally, see the comment
Dzmitry Malyshau
@kvark
Jul 10 2014 17:26
ah ok
Kimundi @Kimundi hopes its not just his system magically rewriting fresh clones of git repositories :ghost:
Dzmitry Malyshau
@kvark
Jul 10 2014 17:49
perhaps Travis has an outdated rust version?..
Marvin Löbel
@Kimundi
Jul 10 2014 18:04
Ah, maybe, yeah
nigthlies and such
Brendan Zabarauskas
@brendanzab
Jul 10 2014 18:20
@Tomaka17 is attempting to fix it on bjz/gl-rs#103
Marvin Löbel
@Kimundi
Jul 10 2014 18:23
@bjz: That nightly doesn't seem to have the to_string changes either ;)
Marvin Löbel
@Kimundi
Jul 10 2014 18:38
Oh, I see you are talking about it in gamedev... Nevermind
Marvin Löbel
@Kimundi
Jul 10 2014 19:28
Okay, if I wanted to actually write a independent project using gfx, how would I do that?
Dzmitry Malyshau
@kvark
Jul 10 2014 19:34
@Kimundi follow the triangle example?
Marvin Löbel
@Kimundi
Jul 10 2014 19:55
@kvark: I meant more about, how do I setup the project such that rustc sees the library at all. Haven't really done any projects with dependeciess outside Rust itself yet
Dzmitry Malyshau
@kvark
Jul 10 2014 19:58
@Kimundi oh... but gfx-rs is itself a project with dependencies, so you can take it as an example, right?
Marvin Löbel
@Kimundi
Jul 10 2014 20:18
@kvark: I guess, but I don't want to add a bunch of submodules :P Eh, I guess I might as well start using them...
Dzmitry Malyshau
@kvark
Jul 10 2014 20:20
@Kimundi I think Piston uses symlinks (with rust-empty) to avoid submodules, but I doubt it's simpler to use
Brendan Zabarauskas
@brendanzab
Jul 10 2014 20:38
@Kimundi we could add a Cargo.toml
Sven Nilsen
@bvssvni
Jul 10 2014 21:24
what we do with Piston is using Cargo for easy setup (or just trying out stuff) and then replace the dependencies with symlinks