Our First Triangle! | Game Engine series

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 129

  • @RepDev
    @RepDev ปีที่แล้ว +50

    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 ปีที่แล้ว +5

      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 ปีที่แล้ว +2

      @@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 ปีที่แล้ว +1

      Thanks!

    • @goozjeesh46
      @goozjeesh46 ปีที่แล้ว

      thanks! much appreciated!

    • @Gamester-vy1qp
      @Gamester-vy1qp ปีที่แล้ว

      Saved me lots of head scratching!

  • @ttextinction7273
    @ttextinction7273 5 ปีที่แล้ว +225

    - Congratulation sir!
    - Is it a boy or a girl?
    - It's a triangle!

    • @kevinlackokl
      @kevinlackokl 5 ปีที่แล้ว +1

      @Adam Vagapov Yes

    • @BadComoc
      @BadComoc 5 ปีที่แล้ว +1

      @Adam Vagapov Maybe

    • @0ia
      @0ia 5 ปีที่แล้ว +1

      @@gwentarinokripperinolkjdsf683 perhaps not

    • @marijnkneppers2340
      @marijnkneppers2340 4 ปีที่แล้ว +4

      Why is this so funny?

    • @johnzhou5685
      @johnzhou5685 3 ปีที่แล้ว +1

      @@marijnkneppers2340 he just got married

  • @coolumar335
    @coolumar335 5 ปีที่แล้ว +28

    Yan is the coolest. Thank you for teaching us so much.

  • @CeilingPanda
    @CeilingPanda 5 ปีที่แล้ว +33

    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!

  • @pramodbhandari9151
    @pramodbhandari9151 4 ปีที่แล้ว +6

    1:12, you're so happy about that, makes me smile : )

  • @kplays_6000
    @kplays_6000 3 ปีที่แล้ว +9

    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!

  • @Josh350
    @Josh350 5 ปีที่แล้ว +10

    Awesome, glad you're sticking to this. Game engines are no joke.

  • @cocoarecords
    @cocoarecords 5 ปีที่แล้ว +8

    cherno i cant imagine you teaching data structures tbh and how awesome that will be

  • @EfficientJava
    @EfficientJava 5 ปีที่แล้ว +16

    Most mac os x gpus need shaders provided to render in OpenGL

  • @nikoszervo
    @nikoszervo 5 ปีที่แล้ว +4

    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 3 ปีที่แล้ว +1

    thanks

  • @mario7501
    @mario7501 4 ปีที่แล้ว +5

    On Mac you need a shader for this to work. Can be very basic, but you still need a shader :)

  • @tinyrobot7443
    @tinyrobot7443 5 ปีที่แล้ว +2

    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 ปีที่แล้ว +1

    Tested on amd fury x and vega 64 still gonna test it on rx 580 and 6900xt thanks for this.

  • @supremedeity9003
    @supremedeity9003 4 ปีที่แล้ว +3

    OpenGL Version: 4.0.0 - Build 10.18.10.4425.
    GPU: Intel HD 4000
    A default shader isnt provided for this version

  • @tomaskot9278
    @tomaskot9278 5 ปีที่แล้ว +3

    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 ปีที่แล้ว +2

      vulkan: hmmmmmmm

    • @lucaaaa6382
      @lucaaaa6382 ปีที่แล้ว +1

      Vulkan be like: Now lemme tell you something

  • @anhta9001
    @anhta9001 5 ปีที่แล้ว +6

    wow I really love this series, I wish to know your channel earlier.

    • @kirafortherescue7756
      @kirafortherescue7756 5 ปีที่แล้ว +2

      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 ปีที่แล้ว +2

      @@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.

  • @mohamedelidrissi2839
    @mohamedelidrissi2839 5 ปีที่แล้ว +7

    Nice to see something visual after 8 months

    • @prezadent1
      @prezadent1 5 ปีที่แล้ว +3

      Next time, 2 triangles!

    • @mohamedelidrissi2839
      @mohamedelidrissi2839 5 ปีที่แล้ว +3

      @@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.

  • @anujv2909
    @anujv2909 5 ปีที่แล้ว +5

    We have come a long way.

  • @mrmaniac9905
    @mrmaniac9905 5 ปีที่แล้ว +2

    When you get around to it, can you go into detail about pbr and deferred rendering? there's no good video tutorials out there.

  • @milo20060
    @milo20060 2 ปีที่แล้ว +1

    Amd has the default shader too ^^

  • @zakariachahboun
    @zakariachahboun 5 ปีที่แล้ว +2

    Great! Keep going!

  • @MrWebber223
    @MrWebber223 5 ปีที่แล้ว +2

    Awesome

  • @simonbenjamin1
    @simonbenjamin1 5 ปีที่แล้ว +2

    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!

  • @Nani-sx1yf
    @Nani-sx1yf 5 ปีที่แล้ว +2

    Love your videos!

  • @Daniel-zr4pk
    @Daniel-zr4pk 5 ปีที่แล้ว +6

    Mr and Mrs Charno Yey

  • @fixurlife
    @fixurlife 5 ปีที่แล้ว +2

    Yea,first triangle!

  • @eddieh7962
    @eddieh7962 5 ปีที่แล้ว +1

    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.

  • @chiyungchu9463
    @chiyungchu9463 3 ปีที่แล้ว +1

    Just asking
    I think Intel(R) UHD Graphics 620 is better than GeForce MX110/PCIe/SSE2 right?
    I am leak of GPU knowledge

  • @chastitywhiterose
    @chastitywhiterose 3 ปีที่แล้ว +2

    Wait...a triangle in modern OpenGL with a shader?! Under what circumstances is this possible?

  • @vedantchaudhari7123
    @vedantchaudhari7123 5 ปีที่แล้ว +2

    I wanna support u.
    OooOoo u have a patreon :D

  • @42mix22
    @42mix22 4 ปีที่แล้ว +2

    Do a Vulkan series

  • @acetone7s
    @acetone7s 5 ปีที่แล้ว +2

    you rock

  • @TheHanibal94
    @TheHanibal94 5 ปีที่แล้ว +1

    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 ปีที่แล้ว +4

      I hate networking, but like anything, it has to be done at some point...

    • @GuyCollinsWilliam
      @GuyCollinsWilliam 4 ปีที่แล้ว +1

      depends on your OS, but normally your OS should ship socket libraries such as WinSock2 or socket, shouldnt be any need to use boost.

  • @dadogamer5805
    @dadogamer5805 5 ปีที่แล้ว +1

    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.

  • @D1M3N5ION
    @D1M3N5ION 5 ปีที่แล้ว +1

    What is the new VS theme?

    • @BekircanDAL
      @BekircanDAL 5 ปีที่แล้ว +1

      its JetBrains ReSharper extension.

  • @sirking2865
    @sirking2865 5 ปีที่แล้ว +2

    Fisrt, congratulations man.
    I love all your videos.
    but I have a question, When a Vulkan API tutorial??
    Thx!!

  • @deadyanothaikiropool1chait713
    @deadyanothaikiropool1chait713 5 ปีที่แล้ว +1

    Ahhhh Segmentation fault(core dumped) on Linux but don't know which line cause stack problem!!!! AHHH

    • @giancedrick507
      @giancedrick507 4 ปีที่แล้ว +1

      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.

  • @thomasknapp7807
    @thomasknapp7807 5 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

    Our Wedding !!

  • @evolucaohunz
    @evolucaohunz 5 ปีที่แล้ว +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.

  • @jw200
    @jw200 5 ปีที่แล้ว +55

    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 ปีที่แล้ว +1

      Bro you are ri8.
      Many of good tutorials owner are no more working on youtube.
      May he gives us some time.

    • @platin2148
      @platin2148 5 ปีที่แล้ว +2

      Even it ends you can just ask on discord there are definitely some people which will help you.

    • @alixaprodev
      @alixaprodev 5 ปีที่แล้ว +1

      @Platin 21 bro for what purpose discord is use

    • @obinator9065
      @obinator9065 5 ปีที่แล้ว +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 ปีที่แล้ว +3

      There are some decent books on amazon that will help you create a game engine from scratch

  • @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 ปีที่แล้ว +3

      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.

  • @semicolon4671
    @semicolon4671 5 ปีที่แล้ว +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 ปีที่แล้ว +1

      It is, OpenTK is not cross platform though

    • @semicolon4671
      @semicolon4671 5 ปีที่แล้ว +1

      @@suleythbut isn't OpenTK just an OpenGL Wrapper for C#??

    • @chris_burrows
      @chris_burrows 5 ปีที่แล้ว +2

      @@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 ปีที่แล้ว +3

      ​@@chris_burrows OK, I will try and do My best moving from C# to C++ :-)

    • @chris_burrows
      @chris_burrows 5 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

    Ayyyy yo Sir Cherno,do you think you can do a vid on MATLAB ?

  • @zfexdg5362
    @zfexdg5362 3 ปีที่แล้ว +1

    Print openGL

  • @RandomGuyyy
    @RandomGuyyy 5 ปีที่แล้ว +1

    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

  • @umbertoloria9486
    @umbertoloria9486 5 ปีที่แล้ว +3

    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 ปีที่แล้ว +12

      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.

  • @ryanheuer9542
    @ryanheuer9542 5 ปีที่แล้ว +1

    17

  • @antoniocs8873
    @antoniocs8873 5 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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...