These are chat archives for bjz/gfx-rs

7th
Jul 2014
Corey Richardson
@cmr
Jul 07 2014 00:19
@kvark what time zone are you in?
Dzmitry Malyshau
@kvark
Jul 07 2014 00:22
Toronto
Dzmitry Malyshau
@kvark
Jul 07 2014 00:34
@cmr and where are you going to be heading back from SF?
Corey Richardson
@cmr
Jul 07 2014 00:34
I live in southwestern new hampshire, but I go to school in upstate new york (clarkson university, in potsdam)
Dzmitry Malyshau
@kvark
Jul 07 2014 00:36
@cmr that's pretty close to Toronto. I suppose you could attend (organize?) a possible rust meetup here.
Corey Richardson
@cmr
Jul 07 2014 00:37
4 hrs away... and I don't have a drivers license :P
Dzmitry Malyshau
@kvark
Jul 07 2014 00:38
@cmr ugh. It is solvable, especially if we find anyone from Montreal ;)
Corey Richardson
@cmr
Jul 07 2014 00:40
I could easily do an ottawa meetup
Dzmitry Malyshau
@kvark
Jul 07 2014 00:40
I'm puzzled by the way to construct GL-like enum types. Blend factor, for example, can be represented by (InverseFlag, BlendValue), where InverseFlag means 1 - X. That is more basic, but such approach ends up with a need for more code overall.. (comparing to just a straight-on enumeration).
@cmr Ottawa would work for me. It's a nice city to visit. Dunno about @csherratt
A comparison function can also be presented by 3 flags: (LessFlag, EqualFlag, GreaterFlag), but that again ends up being more code for no obvious reason...
Coraline Sherratt
@removed~csherratt
Jul 07 2014 00:52
I have done the drive to Ottawa, it's not terrible
Coraline Sherratt
@removed~csherratt
Jul 07 2014 01:03
@kvark there are some impossible combinations if you separate them. (Invert, One)
Dzmitry Malyshau
@kvark
Jul 07 2014 01:19
@csherratt I know only one really (GL_SRC_ALPHA_SATURATE)
Dzmitry Malyshau
@kvark
Jul 07 2014 01:36
It looks like doing a 1:1 copy of GL enums is the most convenient way. I'm just sad because that would be a missed opportunity to use the proper (and beautiful) rust types for that (talking about blend factors and depth equations)
Dzmitry Malyshau
@kvark
Jul 07 2014 01:49
@csherratt the problem with enums (along other stuff) is presented and described in #79, in case you have time to look at it
Coraline Sherratt
@removed~csherratt
Jul 07 2014 03:04
the winding is backwards on the triangle in the triangle test btw.
Corey Richardson
@cmr
Jul 07 2014 10:32
btw I'm starting to review the codebase for D3D compatability
Dzmitry Malyshau
@kvark
Jul 07 2014 11:38
@csherratt ya, I noticed the winding too when tried to enable back face culling ;)
Corey Richardson
@cmr
Jul 07 2014 12:32
D3D11 is pretty nice.
Last D3D I looked it in any depth was 9
Corey Richardson
@cmr
Jul 07 2014 13:01
@kvark #79 looks great to me, ping me once you've finished the fixes you mention and I"ll merge
Marvin Löbel
@Kimundi
Jul 07 2014 13:30
Could someone test my patch with a 3+ core profile? Apparently querying extensions changed there, and glGetString(GL_EXTENSIONS) might return null?
Dzmitry Malyshau
@kvark
Jul 07 2014 13:44
@Kimundi Yeah, apparently extension queries have changed. Now they are done one by one using glGetString(GL_EXTENSIONS, index).
As for #79, I've expressed the remaining concerns about Extensions in the comments. Sorry, can't test it here...
Dzmitry Malyshau
@kvark
Jul 07 2014 13:49
Guys, I need some feedback on the Comparison and Factor types before we merge. As I said in the PR, it looks like the most convenient way would be to just plain list all combinations. I'm wondering if we can make it prettier...
@cmr I'd be interested in taking part in the D3D back-end, but not enough to install windows for it :P
Marvin Löbel
@Kimundi
Jul 07 2014 15:10
@kvark: Funny, I have a WIn8 installation ready, but not much interest in learning two low level graphic APIs just yet ;)
Dzmitry Malyshau
@kvark
Jul 07 2014 15:16
@Kimundi what do you do for life?
@bjz o/
Marvin Löbel
@Kimundi
Jul 07 2014 15:17
Right now I'm still a university student in Germany, who struggles getting anything done from day to day :P
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:17
@kvark o/
brendanzab @bjz is exhausted - long day yesterday
Dzmitry Malyshau
@kvark
Jul 07 2014 15:19
being an exhausted vegetable is what mondays are for ;)
Dzmitry Malyshau
@kvark
Jul 07 2014 15:25
@Kimundi just wondering - any reason you didn't go struct Extensions(HashSet<>)?
Marvin Löbel
@Kimundi
Jul 07 2014 15:26
@kvark Eh, its just what I default to for private fields.
Dzmitry Malyshau
@kvark
Jul 07 2014 15:28
@Kimundi I don't believe we are going to have any other fields there... Sorry for being the PITA with all those #78 considerations. It's good stuff, and all we really need to do is to test it on some higher-end machines.
@bjz could you?
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:33
Yeek, GL2.0 is pretty low
But I guess we need to consider it... :(
Dzmitry Malyshau
@kvark
Jul 07 2014 15:34
@bjz it's just for the examples. Your game can still use 3.3 Core
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:35
mmk
Dzmitry Malyshau
@kvark
Jul 07 2014 15:41
@bjz Not sure about #80... But if we can get it without introducing significantly more code, that would be nice.
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:42
@kvark when is pub fn depth( done?
why does it take a string?
Dzmitry Malyshau
@kvark
Jul 07 2014 15:43
@bjz when the user creates a rast state, depth() is a helper (chained) method to initialize the depth test:
let state = gfx::DrawState::new().depth("<=");
because strings are most obvious and simple here (user friendliness)
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:44
neat
could you add some documentation to the DrawState builder API?
Dzmitry Malyshau
@kvark
Jul 07 2014 15:46
oh sure, it's by far not finished yet. I'll add it this night (if #79 is not merged by then) or as a matter of the future work (we need the stencil, color mask, and scissor at least)
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:47
Awesome
we probably need to be getting better re. documentation :P
Dzmitry Malyshau
@kvark
Jul 07 2014 15:47
... and start right from the README, which is pretty outdated
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:48
hahaha
brendanzab @bjz is working on some doc comments now
Dzmitry Malyshau
@kvark
Jul 07 2014 15:52
@bjz is bitflags! just an integer? I mean, we are gonna loose a bit of type safety with them, if I understand it correctly
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:52
nope - no type safety lost
Dzmitry Malyshau
@kvark
Jul 07 2014 15:53
@bjz hmm... that makes it a viable candidate for the Comparison type. Thanks! Any bright ideas about the Factor one?
Brendan Zabarauskas
@brendanzab
Jul 07 2014 15:57
not sure - will have to think
Brendan Zabarauskas
@brendanzab
Jul 07 2014 16:46
@kvark #81?
Dzmitry Malyshau
@kvark
Jul 07 2014 17:08
@bjz you are done with #81? looks great
Brendan Zabarauskas
@brendanzab
Jul 07 2014 17:08
done
(ready to merge)
Dzmitry Malyshau
@kvark
Jul 07 2014 17:08
thanks, good stuff!
Brendan Zabarauskas
@brendanzab
Jul 07 2014 17:08
:heart:
Coraline Sherratt
@removed~csherratt
Jul 07 2014 17:13
So next to lack of texturing support, when #79 gets merged I think gfx-rs covers the core of the opengl pipeline.
Brendan Zabarauskas
@brendanzab
Jul 07 2014 17:15
\o/
Terrain example here we come!
Dzmitry Malyshau
@kvark
Jul 07 2014 17:30
@csherratt Yeah, I was hoping to pitch it to @bvssvni as a possible Piston back-end after that point. Not entirely sure it's a good idea for him, but would certainly help us ;)
@bjz I assume you want to take care of the terrain example?
@csherratt @bjz could someone test #78 ?
Brendan Zabarauskas
@brendanzab
Jul 07 2014 17:31
.#ihavenoideawhatimdoing re. the terrain example, but I can give it a shot
Marvin Löbel
@Kimundi
Jul 07 2014 17:31
(Which I'm currently rebasing)
Dzmitry Malyshau
@kvark
Jul 07 2014 17:31
oh, I'll have to rebase as well. /blaming @bjz/
Brendan Zabarauskas
@brendanzab
Jul 07 2014 17:32
haha
sorry!
Coraline Sherratt
@removed~csherratt
Jul 07 2014 17:32
I can't test it until I get home from work.
Dzmitry Malyshau
@kvark
Jul 07 2014 17:32
same for me...
brendanzab @bjz was getting totally confused with all the Devices
Marvin Löbel
@Kimundi
Jul 07 2014 17:36
Okay, rebased #78
Dzmitry Malyshau
@kvark
Jul 07 2014 17:38
I wonder if Piston actually needs texturing at this point
@csherratt Btw, one little but important thing is missing - passing generic structs into buffer creation routines. We desperately need this for vertex and uniform buffers. I was hoping @cmr would take care of it...
Kimundi @Kimundi wonders where all these "unread messages" gitter shows him come from...
Dzmitry Malyshau
@kvark
Jul 07 2014 17:55
@cmr hope you don't mind #82 on you. Please feel free to re-assign ;)
Corey Richardson
@cmr
Jul 07 2014 19:09
@kvark I do not mind
Dzmitry Malyshau
@kvark
Jul 07 2014 19:12
@cmr @bjz do you have any plans/local code for Environment?
Dzmitry Malyshau
@kvark
Jul 07 2014 19:23
I thought you had something... but if not, I'll come up with a solution then
Corey Richardson
@cmr
Jul 07 2014 19:26
No sorry :crying_cat_face:
Dzmitry Malyshau
@kvark
Jul 07 2014 19:27
@cmr sorry to bug you again... but can you test #78 on your machine? @Kimundi has been sitting on it for a while...
Corey Richardson
@cmr
Jul 07 2014 19:27
In a few minutes; brb
Dzmitry Malyshau
@kvark
Jul 07 2014 20:01
@Kimundi example triangle winding is off-topic for your PR #78 and was already done in #79 . I'll have to merge big time anyway, so this is not a problem.
Brendan Zabarauskas
@brendanzab
Jul 07 2014 20:05
@kvark some, but it's not very important - feel free to work on it
Marvin Löbel
@Kimundi
Jul 07 2014 20:09
@kvark: Whoops! That was not supposed to go to that branch...
Corey Richardson
@cmr
Jul 07 2014 20:16
Hm the example doesn't build for me, missing all the glfw symbols.
Do I need to have a static glfw available?
Dzmitry Malyshau
@kvark
Jul 07 2014 20:19
@cmr did you ever build it? Or is it the first time your tried?
Corey Richardson
@cmr
Jul 07 2014 20:26
@kvark I never built the examples before :shit:
Dzmitry Malyshau
@kvark
Jul 07 2014 20:27
@cmr oh well, welcome to the team! :feelsgood:
Corey Richardson
@cmr
Jul 07 2014 20:28
heheh
Corey Richardson
@cmr
Jul 07 2014 20:49
Sooo
The problem is due to having a new enough rust
it's no longer outputting crate hash
so building glfw-rs is making a libglfw.so
and we add that really early in the link path
Dzmitry Malyshau
@kvark
Jul 07 2014 20:50
oh, interesting!
Corey Richardson
@cmr
Jul 07 2014 20:50
so it's seeing that for -lglfw
Dzmitry Malyshau
@kvark
Jul 07 2014 20:51
That means we can have makefiles actually building only stuff we need, yay!
Corey Richardson
@cmr
Jul 07 2014 20:51
well it means glfw is broke :P
Dzmitry Malyshau
@kvark
Jul 07 2014 20:51
but what is the problem? we've got libglfw.so, and the app looks for -lglfw, so?
Corey Richardson
@cmr
Jul 07 2014 20:52
so it's find libglfw.so, which is glfw-rs, and not libgflw.so, which is actually glfw
Dzmitry Malyshau
@kvark
Jul 07 2014 20:52
ouch
so it needs to create libglfw-rs.so then?
Corey Richardson
@cmr
Jul 07 2014 20:52
something like that..
cargo is supposed to handle this for us :wink:
Dzmitry Malyshau
@kvark
Jul 07 2014 20:54
cargo here, cargo there,... I like make :hamster:
Corey Richardson
@cmr
Jul 07 2014 20:55
me too ;)
Should just be small changes to the makefile
I need to run now though