From CPU to GPU: Understanding Data Transfer with Buffers in OpenGL

Sdílet
Vložit
  • čas přidán 15. 06. 2024
  • In this tutorial, we will explore the core concepts of Vertex Arrays, Vertex Buffers, and Element Buffer Objects in Modern OpenGL. Through a detailed step-by-step walkthrough, you will gain a comprehensive understanding of these essential elements. Once we've mastered these concepts, we'll apply our newly acquired knowledge to render a surface chart step by step, from a flat grid to dynamic rotations in 3D.
    Code: github.com/lszl84/wx_gl_buffe...
    Links:
    www.khronos.org/opengl/wiki/O...
    www.khronos.org/opengl/wiki/V...
    0:00 Let’s Build a 3D Chart
    0:30 Data Layout
    2:18 Buffers and OpenGL States
    9:18 Drawing the Array
    9:30 Introducing a Surface
    10:29 GLM for 3D Math - CMake’s ExternalProject
    10:57 Rotating the Chart Using the Arrow Keys
    12:35 Indexed Drawing with Element Buffers
    15:27 Final Surface Chart

Komentáře • 7

  • @sukivirus
    @sukivirus Před 9 měsíci

    Great tutorial. Thanks

  • @Nick_fb
    @Nick_fb Před 9 měsíci

    Looking good!

  • @denisrabotay
    @denisrabotay Před 8 měsíci

    You are super amazing, when i started my project every step and decision I did by myself with no help from the net.
    6 months have been passed since I knew I have to use my GPU for rendering because CPU performance were awful.
    and 1 month ago after successfully implemented basic opengl, then when I continued searching for the best method to implement Opengl with wxwidgets,
    I found that the best way is using vertex buffers ! your video clarified few things that other sources lack.
    (if we are already doing the same steps I'm looking for another feature that maybe your tutorial will help me in the future, I want to put a text as a label and also have the abillity to select this text and also the entire string would have an auto adjusting feature so large sentences would require to split the sentence and begin the next part in new line, a cross platform type of feature)

    • @lukesdevtutorials
      @lukesdevtutorials  Před 8 měsíci

      Thank you for watching my video! I was wondering if you could tell me which parts of the tutorial you found helpful that weren't explained well in other videos?
      Rendering text can be a complicated matter, especially since OpenGL doesn't offer any text-specific features. One solution is to render the text onto a texture and display it using OpenGL. Fortunately, WxWidgets offers advanced text rendering abilities and can draw onto a memory context, which should make this task easier. I intend to create tutorials on both texture creation and text rendering, so stay tuned for more information! 👍

    • @denisrabotay
      @denisrabotay Před 8 měsíci

      sorry I confused you, the text is regular object not OpenGL, so this tutorial was great and explained everything !
      what I'm trying to accomplish is a selectable text that is also self adjustable to the panel size
      @@lukesdevtutorials

  • @kacperbiernacki260
    @kacperbiernacki260 Před 9 měsíci

    Nice

  • @nejathakan5521
    @nejathakan5521 Před 9 měsíci

    😍