Our First Triangle! | Game Engine series

  Рет қаралды 54,016

The Cherno

The Cherno

Күн бұрын

Patreon ► / thecherno
GitHub repository ► github.com/The...
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► thecherno.com/...
Series Playlist ► thecherno.com/...
Gear I use:
-----------------
BEST laptop for programming! ► geni.us/pakTES
My FAVOURITE keyboard for programming! ► geni.us/zNhB
FAVOURITE monitors for programming! ► geni.us/Ig6KBq
MAIN Camera ► geni.us/t6xyDRO
MAIN Lens ► geni.us/xGoDWT
Second Camera ► geni.us/CYUQ
Microphone ► geni.us/wqO6g7K

Пікірлер: 129
@RepDev
@RepDev Жыл бұрын
Note to people that maybe can't log with glGetString() Depending on your version of spdlog you won't be able to log it because glGetString() resturns the type 'const unsigned char*' and it can't format it. To fix it simply cast the return value to (const char*) and your problem will to solved. EXSAMPLE: (const char*)glGetString(GL_VENDOR); Hope it helped someone since this is version dependent.
@ast_rsk
@ast_rsk Жыл бұрын
It's actually really cool doing this series that's considerably old now. Not only are the comments extremely helpful but I get to run into all sorts of new-to-me errors in C++ as I continue to learn that language by brute force. Thank you for providing this answer!
@Terrensino
@Terrensino Жыл бұрын
@@ast_rsk I completely agree with this -- doing old series, peeking into comments and facing incompatibilities. It really boosts the learning progress, and it's very satisfying to look later at how Cherno solves problems you just solved by yourself or made sure that you wouldn't encounter them at all. Very motivating to move forward.
@zeozeozevo
@zeozeozevo Жыл бұрын
Thanks!
@goozjeesh46
@goozjeesh46 Жыл бұрын
thanks! much appreciated!
@Gamester-vy1qp
@Gamester-vy1qp Жыл бұрын
Saved me lots of head scratching!
@ttextinction7273
@ttextinction7273 5 жыл бұрын
- Congratulation sir! - Is it a boy or a girl? - It's a triangle!
@kevinlackokl
@kevinlackokl 5 жыл бұрын
@Adam Vagapov Yes
@BadComoc
@BadComoc 5 жыл бұрын
@Adam Vagapov Maybe
@0ia
@0ia 5 жыл бұрын
@@gwentarinokripperinolkjdsf683 perhaps not
@marijnkneppers2340
@marijnkneppers2340 4 жыл бұрын
Why is this so funny?
@johnzhou5685
@johnzhou5685 3 жыл бұрын
@@marijnkneppers2340 he just got married
@CeilingPanda
@CeilingPanda 5 жыл бұрын
Wanted to say it last video, but eh, here it is, Hope your wedding was wonderful! Thanks for all videos, and taking the viewers into consideration for this series!
@coolumar335
@coolumar335 5 жыл бұрын
Yan is the coolest. Thank you for teaching us so much.
@kplays_6000
@kplays_6000 3 жыл бұрын
If you use GLAD and specify Core profile, it removes the legacy/immediate mode definitions. For those at this point who opted for GLEW instead of GLAD, you would have been able to render the triangle at the end of the previous episode through glBegin and glEnd!
@pramodbhandari9151
@pramodbhandari9151 4 жыл бұрын
1:12, you're so happy about that, makes me smile : )
@Josh350
@Josh350 5 жыл бұрын
Awesome, glad you're sticking to this. Game engines are no joke.
@cocoarecords
@cocoarecords 5 жыл бұрын
cherno i cant imagine you teaching data structures tbh and how awesome that will be
@EfficientJava
@EfficientJava 5 жыл бұрын
Most mac os x gpus need shaders provided to render in OpenGL
@mario7501
@mario7501 4 жыл бұрын
On Mac you need a shader for this to work. Can be very basic, but you still need a shader :)
@nikoszervo
@nikoszervo 5 жыл бұрын
I have a really old laptop (Fujitsu) with Intel i5, 1st generation (Integrated graphics). My OpenGL version is 2.1, but still I managed to render using the Mesa software implementation of OpenGL drivers.
@sam_is_people1170
@sam_is_people1170 2 жыл бұрын
thanks
@tinyrobot7443
@tinyrobot7443 5 жыл бұрын
I got the intel 520 renderer, but from everything else the exact same, that is very good then I can expect that whatever works for you works for me...
@anwartech8193
@anwartech8193 2 жыл бұрын
Tested on amd fury x and vega 64 still gonna test it on rx 580 and 6900xt thanks for this.
@mohamedelidrissi2839
@mohamedelidrissi2839 5 жыл бұрын
Nice to see something visual after 8 months
@prezadent1
@prezadent1 5 жыл бұрын
Next time, 2 triangles!
@mohamedelidrissi2839
@mohamedelidrissi2839 5 жыл бұрын
@@prezadent1 yay!! The question now is, will we get to see some actual graphics before baby Cherno is born 🤔
@kirafortherescue7756
@kirafortherescue7756 5 жыл бұрын
@@mohamedelidrissi2839 Good question.
@mohamedelidrissi2839
@mohamedelidrissi2839 5 жыл бұрын
@@kirafortherescue7756 Indeed
@dw2843
@dw2843 5 жыл бұрын
It's stupid that this is the progress made in 8 months. I'll see you in 2 years when he finally renders a 3d model.
@tomaskot9278
@tomaskot9278 5 жыл бұрын
I have no experience with OpenGL and it surprises me how short is the code required to draw a triangle, compared to DirectX 10 and higher. Well, even DX9 with the fixed function pipeline required much more coding to get a triangle.
@giancedrick507
@giancedrick507 4 жыл бұрын
vulkan: hmmmmmmm
@lucaaaa6382
@lucaaaa6382 Жыл бұрын
Vulkan be like: Now lemme tell you something
@simonbenjamin1
@simonbenjamin1 5 жыл бұрын
Great video Cherno! I reckon either doing raw GL shaders using constant strings for the shader code (for now) or making a Shader class with a temporary fstream implementation if you want to go straight to loading shaders from files and then work on abstraction from there like you do in your GL series. I'd say the former is easiest for your working backwards approach and also cause we wouldn't consider using different shaders till much later and that making a virtual file system is a whole separate part of the engine. Either way keep up the great work!
@anhta9001
@anhta9001 5 жыл бұрын
wow I really love this series, I wish to know your channel earlier.
@kirafortherescue7756
@kirafortherescue7756 5 жыл бұрын
Not for all of us; I wish I knew his channel 2 years later so I can watch his series in raw instead of waiting every week for some episode that finishes almost nothing of that big project.
@dw2843
@dw2843 5 жыл бұрын
@@kirafortherescue7756 Right? Lmao it's so lazy. Yet he still insists on that per week schedule.
@nullbeyondo
@nullbeyondo 3 жыл бұрын
@@kirafortherescue7756 I think I unintentionally may have sounded rude here sorry. (English is not my 1st) Well, at least my wish came true.. kinda. I'm re-watching 2 years later! Like... I just found this random comment of me (in my alt account) 2 years ago wishing for literally what's happening right now which is 2 years later... Wow. I've a long way to catch up though. Sad thing is.. now I don't have the free time I had 2 years ago. It's ironic.
@lucaaaa6382
@lucaaaa6382 Жыл бұрын
@@nullbeyondo update?
@Gamester-vy1qp
@Gamester-vy1qp Жыл бұрын
@@kirafortherescue7756 Now I am here 4 years later with 80+ more episodes to go! :D Binging go brrrrr.
@anujv2909
@anujv2909 5 жыл бұрын
We have come a long way.
@milo20060
@milo20060 2 жыл бұрын
Amd has the default shader too ^^
@mrmaniac9905
@mrmaniac9905 5 жыл бұрын
When you get around to it, can you go into detail about pbr and deferred rendering? there's no good video tutorials out there.
@zakariachahboun
@zakariachahboun 5 жыл бұрын
Great! Keep going!
@supremedeity9003
@supremedeity9003 4 жыл бұрын
OpenGL Version: 4.0.0 - Build 10.18.10.4425. GPU: Intel HD 4000 A default shader isnt provided for this version
@richardlighthouse5328
@richardlighthouse5328 4 жыл бұрын
OOF
@Nani-sx1yf
@Nani-sx1yf 5 жыл бұрын
Love your videos!
@MrWebber223
@MrWebber223 5 жыл бұрын
Awesome
@Daniel-zr4pk
@Daniel-zr4pk 5 жыл бұрын
Mr and Mrs Charno Yey
@fixurlife
@fixurlife 5 жыл бұрын
Yea,first triangle!
@chastitywhiterose
@chastitywhiterose 3 жыл бұрын
Wait...a triangle in modern OpenGL with a shader?! Under what circumstances is this possible?
@vedantchaudhari7123
@vedantchaudhari7123 5 жыл бұрын
I wanna support u. OooOoo u have a patreon :D
@chiyungchu9463
@chiyungchu9463 3 жыл бұрын
Just asking I think Intel(R) UHD Graphics 620 is better than GeForce MX110/PCIe/SSE2 right? I am leak of GPU knowledge
@42mix22
@42mix22 4 жыл бұрын
Do a Vulkan series
@sirking2865
@sirking2865 5 жыл бұрын
Fisrt, congratulations man. I love all your videos. but I have a question, When a Vulkan API tutorial?? Thx!!
@acetone7s
@acetone7s 5 жыл бұрын
you rock
@eddieh7962
@eddieh7962 5 жыл бұрын
Is there somewhere i can see what all the graphics "vocab words" mean? This is kind of hard to understand sometimes
@supremedeity9003
@supremedeity9003 4 жыл бұрын
Just Search them on google, i would recommend searching for Graphics programming terminologies. and maybe using the guru3d website.
@TheHanibal94
@TheHanibal94 5 жыл бұрын
Hi ! Awesome video serie ! What librairie do you use for networking like TCP/IP server ? I tried to install Boost.Asio but I did not succeed :/
@microgut9104
@microgut9104 5 жыл бұрын
I hate networking, but like anything, it has to be done at some point...
@GuyCollinsWilliam
@GuyCollinsWilliam 4 жыл бұрын
depends on your OS, but normally your OS should ship socket libraries such as WinSock2 or socket, shouldnt be any need to use boost.
@thomasknapp7807
@thomasknapp7807 5 жыл бұрын
Cherno, Are you using Visual Studio 2019 as yet?
@microgut9104
@microgut9104 5 жыл бұрын
Lol, I was thinking the same thing, but I think I know the answer. If you have VS 2019 installed, on the IDE's top left corner, there is a logo. For the both VS2 2017 and 2019, the logos are different, so I think the Cherno is still using VS 2017...
@ExCyberino
@ExCyberino 2 жыл бұрын
Our Wedding !!
@deadyanothaikiropool1chait713
@deadyanothaikiropool1chait713 5 жыл бұрын
Ahhhh Segmentation fault(core dumped) on Linux but don't know which line cause stack problem!!!! AHHH
@giancedrick507
@giancedrick507 4 жыл бұрын
Encountered this on the std atomic datastructure in the spdlog call stack, something to do with threads, made a temporary patch with simple logging, the problem is already solved in the current commit of the hazel repository.
@dadogamer5805
@dadogamer5805 5 жыл бұрын
can you make a tutorial for create an third person game in java without opengl pls?
@microgut9104
@microgut9104 5 жыл бұрын
He is focusing on this series apparently, if you have looked hard enough into his channel, you will realize just how many videos he has made focusing on Java.
@jw200
@jw200 5 жыл бұрын
Nice tuts and effort. Interesting series.. But all i see on YT is just game engines that draw triangles or circles and there the stuff ends. Almost Nobody ever finishes or creates any real game.. Very few YT guys i know who actually made (even simplest) game with their engine. 99% of those who make these videos loose interest or just disappear.. Its a huge topic and nobody will do that forever for free. People just loose any motivation and quit.. hopefully you will continue. There are good channels like yours but they are just not active anymore. And owners are disappeared. No comments, updates, anything.. Sad
@alixaprodev
@alixaprodev 5 жыл бұрын
Bro you are ri8. Many of good tutorials owner are no more working on youtube. May he gives us some time.
@platin2148
@platin2148 5 жыл бұрын
Even it ends you can just ask on discord there are definitely some people which will help you.
@alixaprodev
@alixaprodev 5 жыл бұрын
@Platin 21 bro for what purpose discord is use
@obinator9065
@obinator9065 5 жыл бұрын
I think this is where you have to rely on books, as programming becomes less trivial. Game Engine Architecture is recommendable here.
@jcdentonunatco
@jcdentonunatco 5 жыл бұрын
There are some decent books on amazon that will help you create a game engine from scratch
@D1M3N5ION
@D1M3N5ION 5 жыл бұрын
What is the new VS theme?
@BekircanDAL
@BekircanDAL 5 жыл бұрын
its JetBrains ReSharper extension.
@evolucaohunz
@evolucaohunz 5 жыл бұрын
200 episodes in and we have our first triangle. That's why you use an existing engine. 😁 Good series by the way, keep it up.
@ShivamJha00
@ShivamJha00 5 жыл бұрын
Yeah man
@patrikpastor4807
@patrikpastor4807 Жыл бұрын
I can see the triangle on blinking for the first time on console, then disappear immediately. I am of course calling the `glDrawElements` inside `Application::Run()` so it should run every frame. But it only appears once and then disappear (so empty console, beside imgui). Does anyone know what could be wrong?
@DValve-123
@DValve-123 Жыл бұрын
Hey, probably you already figured it out, or Cherno explained this in another video, but this might help anyone that comes across this issue. So, basically as Cherno said, we are using the default shader, that is ID=0, and that’s great, but If you are using the current version of ImGui, it uses its own shaders to render the UI, I confirmed this by querying the shader ID before and after the ImGui layout renders, so you have two options, either call glUseProgram(0) which is the default one, or create your own shader and bind it before drawing your triangle.
@zfexdg5362
@zfexdg5362 3 жыл бұрын
Print openGL
@semicolon4671
@semicolon4671 5 жыл бұрын
Using the same methods in c# and OpenTK library is possible... RIGHT??? edit : Thank you cherno I really didn't know anything about OpenGL and Graphics at all before watching your opengl series ... You're so good at explaining things and simplifying complex things
@suleyth
@suleyth 5 жыл бұрын
It is, OpenTK is not cross platform though
@semicolon4671
@semicolon4671 5 жыл бұрын
@@suleythbut isn't OpenTK just an OpenGL Wrapper for C#??
@chris_burrows
@chris_burrows 5 жыл бұрын
@@semicolon4671 I spent two years learning and working in C#/OpenTK but in the end it was an uphill battle because all the help across the internet is in c++. It's not that the GL calls are different, they're not, it's that everything else is and you need to understand that to progress. I moved to c++ and OpenGL a few weeks ago and fuuuuuck it is incredible, it's really not that difficult if you know C# and the framerate boost holy shit. OpenTK and C# = honestly no good. Step up ma fucka! I'm livinamuk on the Cherno discord, hit us up if you need help.
@semicolon4671
@semicolon4671 5 жыл бұрын
​@@chris_burrows OK, I will try and do My best moving from C# to C++ :-)
@chris_burrows
@chris_burrows 5 жыл бұрын
@@semicolon4671 Yeh man give it a shot! There's a c++ Cherno series that I found very helpful.
@graph2001
@graph2001 Жыл бұрын
ChatGPT3.5 Generated content: - The transcript is part of a video game engine series. - The previous video explained how to read a graphics context. - The purpose of the current video is to lay the foundation for future episodes. - The video aims to render a triangle using raw OpenGL calls. - The speaker invites viewers to become patrons to access more advanced development ideas.
@type335
@type335 5 жыл бұрын
Ayyyy yo Sir Cherno,do you think you can do a vid on MATLAB ?
@ryanheuer9542
@ryanheuer9542 5 жыл бұрын
17
@umbertoloria9486
@umbertoloria9486 5 жыл бұрын
I starter following this series since the first episode and to me it is really really great. The only problem is: it has becoming too slow. This is the 28th episode and all we can see is a triangle. I would suggest you to develop the shader class next video and after that start focusing on the Renderer. Thank you for all the effort Cherno, you're great!
@suleyth
@suleyth 5 жыл бұрын
If you think making a game engine is a quick and easy thing that you can do in a couple of days you shouldn't be writing a game engine
@umbertoloria9486
@umbertoloria9486 5 жыл бұрын
I know making a game engine is not a easy and quick thing to do. But i also think make an event system and an initial infrastructure and then draw a triangle is not a thing that should take 28 video and more than 6 months to teach.
@umbertoloria9486
@umbertoloria9486 5 жыл бұрын
@@braindeveloperdimensional5579 and I understand this and the entire goodnjob thst he is making. My only consideration is the fact that all this things could have been shown some months ago.
@RandomGuyyy
@RandomGuyyy 5 жыл бұрын
You could do a Godot and just use OpenGL ES as your renderer for every platform.
@ShivamJha00
@ShivamJha00 5 жыл бұрын
Would be better to see direct X and Vulcan support. But that would be an enormous amount of work
@antoniocs8873
@antoniocs8873 5 жыл бұрын
This is the main issue I have with these series. There is no or minimal amount of planning. "I thought we would", "I hoped we would" etc... at this point it's simpler to just find something on udemy and pay for the course where you have a full course by someone who has actually planned the course. Sure sure this is free I get it!
@microgut9104
@microgut9104 5 жыл бұрын
There is a hell lot of planning when he talks, and "Designing our Game Engine" focuses on that. Also, in the discussions, people decide what should happen next.
@antoniocs8873
@antoniocs8873 5 жыл бұрын
@@microgut9104 Exactly, there is no actual planning. It's whatever people want next, which I can appreciate, but I was hoping for something that was planned and then followed. Now it seems we are going to have to jump to another (incomplete) video series, but again... this is all free... so I can't expect much in terms of planning
@microgut9104
@microgut9104 5 жыл бұрын
@@antoniocs8873 Yeah but guess what, if it was all planned, people might have other problems, such as "Oh why that? Why not this". I think this is why Yan wants us to cooperate as well.
@antoniocs8873
@antoniocs8873 5 жыл бұрын
@@microgut9104 So your argument is that there will always be people complaining? Great argument...
@microgut9104
@microgut9104 5 жыл бұрын
@@antoniocs8873 I don't know from where you got that conclusion...
Input Polling | Game Engine series
25:41
The Cherno
Рет қаралды 53 М.
Rendering Context | Game Engine series
27:03
The Cherno
Рет қаралды 49 М.
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
КОГДА К БАТЕ ПРИШЕЛ ДРУГ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 8 МЛН
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,3 МЛН
Renderer API Abstraction | Game Engine series
47:17
The Cherno
Рет қаралды 55 М.
Programming Mazes
27:11
javidx9
Рет қаралды 196 М.
Intro to Profiling | Game Engine series
24:54
The Cherno
Рет қаралды 26 М.
Gamedev In-Depth | How I Implement a New Feature
19:20
ThinMatrix
Рет қаралды 38 М.
Layers | Game Engine series
22:59
The Cherno
Рет қаралды 77 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 182 М.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 4,1 МЛН
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 199 М.
Refs, Scopes and Smart Pointers | Game Engine series
24:55
The Cherno
Рет қаралды 36 М.
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24