how do i get started with opengl and shader coding?
category: code [glöplog]
I wanted to join in demoscene ever since I found out about it through a person named fms_cat and the NotITG community. I'm not sure how to set up what I want to use or where to start. I'm on Windows 10 64-bit, and I'll use Msys2 UCRT64 for gcc and other packages, since I want to code in C++ and Python (focus on C++. python is an afterthought), but I'll start off with C. My code editor is a mix of VScode and NotePad++. I also have CMake on board. Most tutorials I found didn't really get me anywhere
Knowing C/C++ is a pretty good start already.
The two resources I recommend are https://alain.xyz/blog/raw-opengl and https://learnopengl.com/, and I think you should leave shaders to a bit later until you've gotten a few meshes on screen first, gotten to figure out matrices, cameras, interpolations, that sort of stuff.
The two resources I recommend are https://alain.xyz/blog/raw-opengl and https://learnopengl.com/, and I think you should leave shaders to a bit later until you've gotten a few meshes on screen first, gotten to figure out matrices, cameras, interpolations, that sort of stuff.
And just for future reference, https://github.com/mackron/miniaudio is also pretty good for getting sound out of the machine.
Thanks! I'll be using them. also, i plan on using opengl for more legitamate things as well, like game engine dev.
Sure, there's definitely an overlap between a game engine and a demo engine - ultimately in both cases, you're just setting resources to feed drawcalls, it's just that in a game engine there's a tick phase where you deal with game logic updates, input, physics, animation graphs / state machines, that sort of stuff, whereas in a demo it's "start music, render, render, render, render, render, render, stop music, exit".
You can also take a look at this. ;)
tl;dr Gargaj disapproved the way it was written originally and decided to make it a huge deal.
It's safe, don't listen to him.
Gargaj: Yeah, tell them what and how they should think, it's something you are pretty good at. :)
It's safe, don't listen to him.
Gargaj: Yeah, tell them what and how they should think, it's something you are pretty good at. :)
you can find a few additional reference links here
Since OpenGL is quite convoluted after 25 years of people adding multiple ways to do everything, and development stopped 7 years ago, aren't there better places to start these days? I get that not everyone wants to dive into low-level APIs like Vulkan and its Windows and Mac equivalents, but surely there are higher-level libraries built on top of them that are easier for beginners to wrap their heads around than OpenGL?
Good point, absence. I've recently been made aware of this library: https://www.raylib.com/
I haven't tried it myself yet but there are some games that have been implemented with it, so it seems to be working.
I haven't tried it myself yet but there are some games that have been implemented with it, so it seems to be working.
or you could buy unity
nah srsly, as coder : I use OpenGL from C and Python, and its quite frustrating to learn and it keeps being in your way at every other opportunity. stuff works different than expected in subtle ways. useful debug information is annoyingly hard to obtain.
it's great for sizecoders, but for artists tooll.io notch, or cables.gl are a better choice
it's great for sizecoders, but for artists tooll.io notch, or cables.gl are a better choice
also most opengl info on the internet is condensed antipatterns in its purest form, "fricklerscheiss"
www.learnopengl.com will get you modernish OpenGL basics. The rest is just standard programming.
It's Friday.. it's hot.. I guess I'm feeling tetchy enough to bite..
Well that piqued my interest so I took a look at the code. Um.. yeah.. it is terrible as example code. It's terrible on other levels too.
The advice in this thread is all solid apart from your combo-breaker.
Quote:
tl;dr Gargaj disapproved the way it was written originally and decided to make it a huge deal.
It's safe, don't listen to him.
Well that piqued my interest so I took a look at the code. Um.. yeah.. it is terrible as example code. It's terrible on other levels too.
Quote:
Gargaj: Yeah, tell them what and how they should think, it's something you are pretty good at. :)
The advice in this thread is all solid apart from your combo-breaker.
TheCherno's youtube channel and his Hazel Engine is also nice for C++/OpenGL game engine dev. His recent updates (ECS, C# scripting, vulkan port, etc) are Patreon-sub based but you can ignore that. especially if you're into sizecoding then none of that is useful.
I'm with NR4 in this one, as well. OpenGL will get in your way eventually no matter the lib you use. It just draws stuff and the feedback is indeed minimum, you will find yourself many times asking why this or that bug happens without much info. The drawing library isn't binding, as well, maybe you could take a look at this D3D tutorial which is not as difficult for a newbie imho.
evilpaul: The 'advice' in the demosystem thread mostly comprises of bold sentences meant to scare off newbies, and sadly it worked pretty well.
evilpaul: The 'advice' in the demosystem thread mostly comprises of bold sentences meant to scare off newbies, and sadly it worked pretty well.
Quote:
sadly it worked pretty well
You do realise there's such a thing as giving bad advice and leading people astray? There's more than enough low-quality content online, so you can't fault experienced developers for trying to point beginners in the right direction.
Quote:
...so you can't fault experienced developers for trying to point beginners in the right direction.
No I can't, nor do I hold a grudge against them, but I do consider them responsible for not actually helping begginers release something in their first steps. Where is that tutorial that helps you make a demo...? (an actual demo, not a renderer!)
your constant nagging and demeanor in threads like these is a bigger scare off for newbies, i reckon
Scapegoating isn't going to help you this time. Something this 'community' has done multiple times in the past. Newbies are scared because they don't have a single place to start, a single example to experiment on. And then the attitude of some sceners... What would someone expect by a lynching mob behaviour? The elites vs lamers attitude? The ad hominem attacks? No, they are better off to places that accept them for what they are. Begginers. :)
QED
You've done enough damage. Goodbye.
When your code is so bad, it gets you banned from Pouët!