OpenGL [Episode 36] Mesh Abstraction Refactor Continued -- two quads

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • ►Full OpenGL Series Playlist: • Introduction to OpenGL
    ►Find full courses on: courses.mshah.io/
    ►Join as member to get perks: / @mikeshah
    ►Lesson Description: In this lesson I continue the refactoring and we end up ultimately with two quads! I opt for a 'C style' API for creating meshes and discuss a few of those trade-offs. I would encourage folks to otherwise consider an RAII style if they otherwise are comfortable with that style. I also go bug hunting a bit in this lesson, showing the issue of how you have to update your uniforms (the read only values) for the object that you want to draw prior to drawing -- do keep that in mind! There will be more abstraction later on in the series. As always, feel free to join the discussion!
    ►Please like and subscribe to help the channel!
    ►RUclips Channel: / mikeshah
    ►Join our free community: courses.mshah....

Комментарии • 15

  • @xealit
    @xealit Месяц назад +1

    my understanding, if you want to add normals to the mesh (to make lighting for example) and want to have minute control of them (e.g. to have sharp edges sometimes), you basically have to skip the indexed buffer and pass each vertex multiple times: once per facet. You could calculate the normals with geometry shader. But everyone on the internet seems to recommend to just pass a large vertex array, with duplicated vertices. The internet says it is typically faster, it uses more memory but that's not a big concern, and you can have 3 different normals per a triangle, instead of only 1 per vertex with indexing or 1 per triangle calculated by the geometry shader. With 3 different normals, the fragment shader should be able to interpolate them and create an impression of a bent surface.

    • @MikeShah
      @MikeShah  Месяц назад +1

      Indeed, that is correct! Because say a corner of a cube for example, each vertex will be a part of 3 faces, thus need 3 unique normals for each face. Many tools will otherwise give the option to 'average vertex normals' and just emit one normal per-vertex, but it just depends on what type of lighting you need.

  • @duncangibson6277
    @duncangibson6277 Месяц назад +1

    A much clearer approach to the matrix multiplications needed to place objects than other basic tutorial courses which the waters by adding the camera class after the fact. I'm looking forward to an explanation of modelling a hierarchy of objects with cumulative modelling transformations which the other tutorials only hint at.

    • @MikeShah
      @MikeShah  Месяц назад

      @@duncangibson6277 that's where we're heading 😁

  • @TimHaga
    @TimHaga Месяц назад +1

    Great lesson. Thanks!

    • @MikeShah
      @MikeShah  Месяц назад

      @@TimHaga cheers!

  • @JumpercraftYT
    @JumpercraftYT Месяц назад

    This is the most w sigma opengl series 🔥

  • @user-vs7yy7nh9x
    @user-vs7yy7nh9x Месяц назад +1

    Define aura : mike shah 🔥✌️

  • @user-hc4we4kb4j
    @user-hc4we4kb4j Месяц назад

    thinks for the goode video tutorail

  • @vanvothe4817
    @vanvothe4817 Месяц назад

    Do you use LSP for navigate code in project?

    • @MikeShah
      @MikeShah  Месяц назад

      For larger projects I do

  • @imteajsaimun4134
    @imteajsaimun4134 Месяц назад

    why don't u use smart pointers

    • @MikeShah
      @MikeShah  Месяц назад

      It's an attempt to manage the 'noise' in learning the graphics API. Many folks are also following along this series in other languages that do not use unique_ptr 🙂Perhaps towards end of series I will do a larger refactoring to modernize the code.