« first day (1004 days earlier)      last day (4169 days later) » 

12:00
anyway, when writing a wrapper, you want to give the user some extra safety
And it boils down to the fact that if you have to choose between redundant operation, it's better to redundantly Get than Bind. Much better. Eh, usually.
which OTOH complicates the wrapping code like fuck.
DSA should be in Core long ago. I know just a tiny bit from Khronos meetings why it didn't make it, and uh... well. It's not like I can change it, really.
The only thing we can do is to hope for GL 5 to have it.
Isn't there still tons of stuff which hasn't been DSA'ified yet btw?
even with extensions
Not much, at least for the first sight.
As for the actual problems, some of them are confidential, I think :/
As of Khronos IP, not Intel IP per se
@BartekBanachewicz depends how much work you are trying to hide from the user
12:06
@thecoshman hide? You are not hiding anything. It's more how many guarantees you want to give.
@BartekBanachewicz I mean that amount of work you want to do for them.
@R.MartinhoFernandes IIRC anything that has Khronos Confidential stamped on it should be treated as Intel Confidential by us.
So OpenGL isn't open after all?
@BartekBanachewicz Have you thought about that complexity from the library user's point of view? People generally prefer libraries which are easy to understand over ones which try to do everything perfectly, and as a result, are completely nonsensical to anyone trying to debug through them?
@R.MartinhoFernandes the spec is.
12:08
Even wrapping the lifetime of gl objects in RAII container is helping save some of the pain
@jalf Of course, I am thinking about it all the time.
Literally? All the time? That sounds bad :p
I am not forgetting about it.
@thecoshman true.
:)
I just wrote a scoped rebinder BTW.
12:11
cool
@BartekBanachewicz I think most definitions of "open standard" imply a transparent process but since everyone likes to make their own definition it's debatable.
@BartekBanachewicz and as such, I think that should be something of a first step. Get all those pesky gl objects with a matching gldr object that can at least offer that.
@R.MartinhoFernandes the interpretation is open :P
@thecoshman No, there are various standardisation and governmental bodies that have well-defined definitions (hehe).
@R.MartinhoFernandes on the other hand, people complained about the ISO definition of "the process is open, but the spec costs money" too.
{
    auto scope = createScopedRebindToCurrent();
    bind();
    gl::EnableVertexAttribArray(index);
}
12:16
@BartekBanachewicz wouldn't that function need something to be called on?
@thecoshman ToCurrent
or passed soemthing?
@thecoshman seems... very verbose
@BartekBanachewicz what is it going to rebind?
the one that's currently bound obviously
12:17
everything that is bound within this scope block?
oh, is that already within a member function?
@thecoshman it does nothing on construction, and reverts to the initial binding on destruction
@thecoshman oh, it's called from inside of VAO
@BartekBanachewicz ah, that makes sense
@jalf precisely.
@jalf yeah, I knew that, it was his usage
12:18
it could be the other way, saving one call
would we not want to allow it to be used outside of the class too though?
auto scope = bindWithRebind(Current())
@jalf Yeah, but even though some definitions require free availability, there aren't many that permit closed processes.
@thecoshman it's perfectly ok to call it from outside.
except... well yeah bindWithRebind makes more sense
@R.MartinhoFernandes well, the one used by OpenGL does. ;)
12:19
the only problem is the naming :D
@BartekBanachewicz hence, it would need to be static or member function?
@thecoshman static, you are right.
but I'll change it, sec
auto b = Vao::scopeBinder();
or
auto b = myVao.scopedBind(); // actually performs the bind operation, and when b goes out of scope, it rebinds what ever was previously bound
when used from outside the class that is
    auto scope = bindWithRebindToCurrent();
    gl::EnableVertexAttribArray(index);
now it's ok.
we need a better name for that operation.
@BartekBanachewicz bind? :p
12:21
ack, I changed some linker options and now VS froze
I think it's pretty implicit in any scoped operation like this that it reverts to the original state on destruction, so the "rebind" part is kind of superfluous IMO
@jalf no! bind intuitively changes global state. It would cause far too much confusion, because bind() without capturing the return does nothing! No operator void :/
@BartekBanachewicz leave it verbose for now, we can change it latter
scopedBind?
ah gotcha
scopedBind?
12:22
soapedBind :)
I think we have a scoped winner :P
yeah, I forgot about that. scopedBind is ok.
soakedBlind
@jalf o_0 that's something else
12:23
I thought about something like transmuxify()
I’m really torn between answering and closing an interesting question that is potentially an interview question, but could also be homework
@KonradRudolph Be selfish: if you think it's interesting, answer it. :)
screw the rules
@KonradRudolph I think you can ask the OP if he wants full solution
too bad SO doesn't have "spoiler" element
12:26
@jalf I’m also a tutor (was a tutor) and I absolutely loathe cheating
write a homework-friendly answer then, which doesn't provide a full ready-made solution?
How many questions on Stackoverflow is not: 1) homework 2) work related 3) interview question or 4) pet project?
@Telkitty猫咪咪 that's about as broad as saying "Stackoverflow has questions regarding programming"
Leaves out curiosity.
or rep whore questions
12:31
@Rapptz and people forced to solve a coding problem at gunpoint!
but seriously how many question is out of curiosity or truly exploratory?
@Telkitty猫咪咪 usually, those get closed as NARQ
can I assume that switch on compile time constant (specifically non-type template parameter) will be done in compile time?
@BartekBanachewicz yes
@BartekBanachewicz All branches have to compile, though.
12:33
@jalf there you go
@R.MartinhoFernandes that's not a problem.
Hmm, now I don't know if this is a breaking change in the ABI or if I messed up something.
oh crap.
apparently I need not only the buffer id when emulating dsa then, I also need the type
In all binds you need all the bind arguments.
Texture targets for textures, etc.
Actually, not quite like that.
You need to save one buffer for each type, no?
@jalf Nah.. see:
Xeo
Xeo
12:38
Ahaha, a buddy of mine just fell into the Steam Sale trap
@R.MartinhoFernandes not quite. I have to save the one that I exactly need to bind to make a "direct" call
Consider. I bind buffer 1 to GL_UNIFORM_BUFFER, then bind buffer 2 to GL_ELEMENT_ARRAY_BUFFER, and then bind 3 to GL_UNIFORM_BUFFER. When this last binding ends, you want to rebind buffer 1 to GL_UNIFORM_BUFFER not buffer 2 to GL_ELEMENT_ARRAY_BUFFER. Am I right?
Xeo
Xeo
// rough translation
[14:28:38] <!Brakebein> me fails
[14:28:57] <!Brakebein> starting the steam-bought might and magic VI
[14:29:07] <!Brakebein> already got a savegame
[14:29:10] <!Brakebein> thinking wtf
[14:29:12] <!Brakebein> check my shelf
[14:29:15] <!Brakebein> and what's in there
[14:29:22] <!Brakebein> might and magic VI
[14:29:23] <!Brakebein> ...
@R.MartinhoFernandes this requires me to query for the type of the buffer id I got, save the one that's bind to this type, bind the one, make my call, then rebind the one I saved to this target again.
12:40
Steam warns if you already own the game.
And on packs, it warns if you already own part of it.
which is a major PITA, because my type parameter is in template :/
Xeo
Xeo
@R.MartinhoFernandes Yeah, if you have the game in Steam, that is.
(Most Valve packs get you extra giftable copies, but other packs are wasteful)
@Xeo Oh.
Xeo
Xeo
With "shelf" I mean not the Steam-library
@BartekBanachewicz Oh, I know it requires more trouble. I'm just asking if those are the "right" semantics.
12:42
@R.MartinhoFernandes you are not concerned with other targets
@BartekBanachewicz Is that a yes or a no?
@R.MartinhoFernandes I think it's a yes :)
@R.MartinhoFernandes well, they are all of different bindable types
so if those are all scoped binds, none of them will affect the others bound state
well, even if they are not scoped binds
but my compile-time switch just got kinda useless
hm, or maybe not
nice easter egg
@ThePhD wakey wakey
@BartekBanachewicz I think you can keep the same strategy, just instead of considering one state per each Bind function, consider one state per each (Bind function, target) pair.
12:45
> Note: Vertex arrays are kinda weird
he's got a point.
Whoa.
TIL Nicol Bolas wrote that OpenGL tutorial
flump
I was snooping around his history. :>
12:47
Ah, ok.
@R.MartinhoFernandes No combos today.
'VertexBuffer' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type
oh lol
: error MSB6006: "CL.exe" exited with code 2.
so I just broke the compiler.
flump
congratulations :)
eh, thanks.
I am not sure what to do with it right now.
12:50
@DeadMG What's up pups?
man, I dunno
@BartekBanachewicz Kill it.
I just feel like shit.
I did sleep for plenty of hours and I feel more tired than when I went to bed.
@DeadMG too much sleep
not that much.
12:51
@R.MartinhoFernandes he already did :p
@DeadMG what hours did you sleep from, to?
template<VertexBufferType type = VertexBufferType::DATA_BUFFER>
class VertexBuffer : Bindable<VertexBuffer<type>> {
@thecoshman the only option now is to sleep even more until the sleep counter overflows!
breaks on that ^
1:30 till about 10am
12:52
That sounds fine.
@thecoshman Could also be normal lazyassness ;)
Too many hours. ~7 are suggested.
8:30 is not too many.
@Jeffrey Er, 8-10.
@DeadMG too bed too late, up too late
@BartekBanachewicz VertexBuffer<type> inherits from Bindable<VertexBuffer<type>>?
12:53
@DeadMG That's for babies.
@melak47 CRTP?
@BartekBanachewicz for the sake of clarity, what will bindable offer, and what will expect from T?
@thecoshman not compiler crash certainly :)
Be wary of public inheritance.
> Adults, including elderly: 7 to 9 hours
Ok I was wrong.
12:56
@Jeffrey not really.
classes do private inheritance by default though
@BartekBanachewicz TIL
@thecoshman ?
@Jeffrey that range is surely inclusive
12:57
@Rapptz I have been using struct always and now my brain assumes everything is a struct :/
I like the MIRT we used for the glid class :D
@DeadMG Maybe you don't sleep that well. Maybe you keep moving in bet so you can't sleep properly.
@R.MartinhoFernandes yeah, I've taken to struct too
@Rapptz actually changing to public showed a few more errors, then compiler crashed again
@thecoshman hey, it's cool
@thecoshman Yeah but I was more like saying an average. The actual average is ~8.
12:58
@R.MartinhoFernandes I default to struct most of the time

« first day (1004 days earlier)      last day (4169 days later) »