how do i get started with opengl and shader coding?
category: code [glöplog]
*chuckles nervously while deleting old code*
i'm pretty sure my code is worse but at least i don't pretend it to be any good
Gargaj's critique of Defiance "system" is mostly right, except...
But, but... OpenGL is built around *global state machine* paradigm.
Also many libraries are doing it for "simplicity", for example, ImGui.
Of course, Defiance naive implementation is way worse, as it's unnecessarily keeps everything in globals.
Quote:
(...) it's some of the worst code I've seen.
Everything is in globals, (...)
But, but... OpenGL is built around *global state machine* paradigm.
Also many libraries are doing it for "simplicity", for example, ImGui.
Of course, Defiance naive implementation is way worse, as it's unnecessarily keeps everything in globals.
You can still wrap the globals into something sensible.
Although, in all fairness, I've been slowly developing a new thing for my personal use and I've gone for modern C++ but with C-like simplicity. Very little fancy features, very little abstraction. Just code that does its thing. Even some global objects...
Although, in all fairness, I've been slowly developing a new thing for my personal use and I've gone for modern C++ but with C-like simplicity. Very little fancy features, very little abstraction. Just code that does its thing. Even some global objects...
defiance got banned because of his (maybe misguided) attempt to support his (maybe not so leet) demo tool ?
Preacher: it's fully understandable. Using immutable functions or at least functions without side-effects everywhere should be in theory the way to go, but in practice it require to pass many arguments, context etc...to every single call, which is annoying. That's why OpenGL, ImGui, etc... are using global states.
The other option, in C++, is to use OOP and put context into a class member, but it sucks, cause enforces you to use OOP design all the way, which usually ends up in weird design conundrums. That's why many people use DOD or even go back to good old C style.
AFAIK there are languages like Scala that have what they call implicit arguments. So in a function call you don't have to explicitly pass implicit arguments as they will be taken automatically from the context (local scope I believe?). But I never really used Scala, so hard to say how it feels in practice.
The other option, in C++, is to use OOP and put context into a class member, but it sucks, cause enforces you to use OOP design all the way, which usually ends up in weird design conundrums. That's why many people use DOD or even go back to good old C style.
AFAIK there are languages like Scala that have what they call implicit arguments. So in a function call you don't have to explicitly pass implicit arguments as they will be taken automatically from the context (local scope I believe?). But I never really used Scala, so hard to say how it feels in practice.
Quote:
But, but... OpenGL is built around *global state machine* paradigm.
OpenGL is pretty bad, so that's not a counterargument.
Oh boy, so disagreeing with gargaj is now a cause of getting banned?
nonsense, that dude was warned to change his behaviour dozens of times but never listened.
Quote:
Quote:But, but... OpenGL is built around *global state machine* paradigm.
OpenGL is pretty bad, so that's not a counterargument.
It is, since Garaj was complaining about using global variables in Defiance's code as an argument to not use it and at the same time recommending OpenGL tutorials.
Other than that, yes, OpenGL is not up to modern standards, but was perfectly fine back in the days.
I use mostly immediate mode and display lists, like it is 2002. So what, it does the job and I m happy. Killer of framerate in my case is shaders.
Quote:
OpenGL [...] was perfectly fine back in the days.
I'd argue that its implicit state and "black screen" flavour of error handling were never anywhere near perfectly fine, but as long as it floats your boat.
Quote:
"black screen" flavour of error handling
So you never used glGetError? ;)
It's clear that you haven't, if you think that's a solution. :P
havoc: I can't find anything apart from disagreeing about coding practices. Care to enlighten me with a link or two? The optics of this is pretty terrible from my point of view...
kusma: nope
OK, so you're just labeling things you don't want to be true as nonsense. Whatever dude.
nah i just don't have the time/willpower to look that crap up (just like you, apparently)
Oh, I tried to look it up. It just doesn't seem to be there.
This is pretty blatant admin abuse from what I can tell.
This is pretty blatant admin abuse from what I can tell.
6 minutes... ¯\_(ツ)_/¯
I'm not sure where you get that number from, but even if so, how's that not plenty when there's supposedly dozens of warnings given. I can't find a single, and it seems you can't either.
yeah yeah whatever, just keep pushing your narrative
for the record and in defence of Defiance - he is a good guy and one of ours in the small greek scene, and pretty active, at least as production comments go (where he is polite and reasonable).
I dont know what he did wrong, but he is definitely not a lamer. His tool might not be the best but so what, we are here to argue over these matters for all eternity... No newbie will ever be "damaged" by his tool, more so than watching nextempire demos or doing iq tests on hugi.
I dont know what he did wrong, but he is definitely not a lamer. His tool might not be the best but so what, we are here to argue over these matters for all eternity... No newbie will ever be "damaged" by his tool, more so than watching nextempire demos or doing iq tests on hugi.
My narrative? Thats rich. I'm not even a party in the conflict, just a bystander who spoke up against what happened. You're the one who is pushing a narrative without backing it up.
Quote:
Oh boy, so disagreeing with gargaj is now a cause of getting banned?
obviously this wasn't a narrative... OH WAIT