Тёмный

Tutorial 5 - Vertex Buffers in OpenGL 

Jeffrey Chastine
Подписаться 4 тыс.
Просмотров 40 тыс.
50% 1

This tutorial describes how to put vertex information into a vertex buffer

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 61   
@zFallenAngelz98
@zFallenAngelz98 10 лет назад
I've only just started learning OpenGL and I want to say that you're videos are absolutely exquisite. The production quality, learning material and execution that you've compiled are amazing and it is beyond just helpful for inquisitive students like myself. I thank you very much. :)
@jeffchastine
@jeffchastine 10 лет назад
Thanks - I'm glad they're helping!
@srhalnon
@srhalnon 10 лет назад
i totally agree
@CrazeeSkillz
@CrazeeSkillz 10 лет назад
These videos are really helping me with a computer science course that I'm taking right now. Thanks a lot!
@lukask.3465
@lukask.3465 2 года назад
one of the best tutorials, straight and not overcomplicated, you deserve much more views!
@L30x
@L30x 8 лет назад
This should have more views, thank you very much!
@jeffchastine
@jeffchastine 8 лет назад
Glad you liked it!
@jeffchastine
@jeffchastine 11 лет назад
Yeah - I just need to get to making them. I'm actually working on a course on algorithms that's taking some time. For the computer science folks, this might be something you'd be interested in when it's finished.
@Bazoozoos
@Bazoozoos 7 лет назад
This has been extremely helpful. Thanks for all the effort you put into making this video!
@ZopteY
@ZopteY 11 лет назад
Why on earth are there so few views! You explain things clearly. Your video quality is amazing. Thank you sir and I truly hope more people will view and learn from your videos!
@clarecd
@clarecd 7 лет назад
My exam's coming on Tuesday and I'm learning through your videos! Thank you so much!! Great tutorial!!!!
@erikthegodeatingpenguin2335
@erikthegodeatingpenguin2335 9 лет назад
Very good tutorial! Probably the best one I've seen so far. It explains everything.
@JoeJoeTheManHoe
@JoeJoeTheManHoe 11 лет назад
These videos are excellent. Helping me alot in higher level computer science courses.
@darkside3ng
@darkside3ng 5 лет назад
This is the firts video that explained step by step and I understood how it works. Thank you :)
@NeilRoy
@NeilRoy 8 лет назад
Very nicely done, thanks a lot! This doesn't seem nearly as scary as I first thought it might be. I love the power and direct access to the video card this new method gives you.
@gathorn
@gathorn 6 лет назад
the best tutorial for openGL out there. Thank you so much!
@jeffchastine
@jeffchastine 6 лет назад
Glad it helped!
@gathorn
@gathorn 6 лет назад
i didnt just learn something about openGL, but also about the key features of a great presentation
@moeyyas3757
@moeyyas3757 8 лет назад
Incredibly helpful video! Your way of explanation is great! =)
@QWangMr
@QWangMr 9 лет назад
Awesome tutorial, explain almost every aspects of modern opengl for newbies. Thumb up! If the src code could be shared, i would give one more star.
@jeffchastine
@jeffchastine 9 лет назад
cse.spsu.edu/jchastin/courses/cs4363/resources/Code.zip No star needed :)
@QWangMr
@QWangMr 9 лет назад
Thanks for the prompt response. Definitely five stars if youtube offers it :-p
@MarcosSouza
@MarcosSouza 9 лет назад
+Jeffrey Chastine can you reupload the files please? It's an amazing tutorial, thank you very much!
@bandar1606
@bandar1606 9 лет назад
Thank you so much for sharing these videos. One thing, it would be nice if a block diagram is provided to show how CPU, GPU, and the program are communicating with each other. It is hard to picture the process from codes.
@TheGugustar
@TheGugustar 10 лет назад
Thanks! It's well explained. Good job!
@jeffchastine
@jeffchastine 10 лет назад
Glad you liked it!
@hypnoticpoisons
@hypnoticpoisons 9 лет назад
Thank you sooo much for the videos! they are amazing!!! helped me very much for my studies
@jeffchastine
@jeffchastine 9 лет назад
Glad it helped!
@Jigimaru
@Jigimaru 7 лет назад
This is explained in so understandable language.. Thank you sir! Please record more videos :(
@Mritunes89
@Mritunes89 11 лет назад
Will there ever be any more videos? These are really good.
@mayue6195
@mayue6195 6 лет назад
Best opengl video on the youtube!
@jeffchastine
@jeffchastine 6 лет назад
Glad you liked it!
@mayue6195
@mayue6195 6 лет назад
omg, you wrote book?XNA?Wooow, do you know terraria, actually, i was wondering how the lighting effects in terraria can be implemented in opengl,like torches..etc.. so i'm trying to build a better skill on computer graphics. your courses are absolutely fantastic!
@Leo2236
@Leo2236 4 года назад
explained well, thanks a lot!
@shashankfragment
@shashankfragment 11 лет назад
Great tutorial man!
@Mritunes89
@Mritunes89 11 лет назад
Yea I can't wait. Will be very cool
@MrSamnono
@MrSamnono 10 лет назад
Thanks for these videos, they're great, but I still have one question: if I have multiple 3D objects, should I make a buffer for each one of them?
@jeffchastine
@jeffchastine 10 лет назад
If they are different models, then yes. If you want to render two objects that have the same geometry, you can just reuse that buffer.
@MrSamnono
@MrSamnono 10 лет назад
Ok, thanks for the quick response. :)
@jeffchastine
@jeffchastine 11 лет назад
Glad it helped!
@tomaszmazurek9567
@tomaszmazurek9567 6 лет назад
5:28 -> If we assume everything is in GLfloat* data (which is a pointer) what is the meaning of second parameter of function glBufferData (...,sizeof(data),...). Do we really have to pass the size of pointer or there is some mistake and it should be: glBufferData(...,sizeof(GLfloat),...). Assuming GLSL/OpenGL as C API to GFX hardware.
@noemorales1022
@noemorales1022 9 лет назад
Hello, I have enjoyed your videos and I have to say, these are the best I've seen. I did have some issues with the previous video: my screen was also white and loading, but nothing happened. The output screen appeared with non-zero values, so I moved on like you said. Now I am running the other code, with the buffer and the triangle shows, but it stops as well as the blue color is not displayed. When I try closing the window with the triangle, there is no response. Any idea, what might be the problem? Thanks again for your videos!
@noemorales1022
@noemorales1022 9 лет назад
I got it. On your next video, you show the code and I found that the file you have available does not match what you showed next. In line 144, the last parameter is missing (....colorID,4, GL_FLOAT....BUFFER_OFFSET(3*3*sizeof(GLfloat))). Thanks!
@YTGamme
@YTGamme 7 лет назад
Good stuff!
@TheGugustar
@TheGugustar 10 лет назад
A way to make your video even more awesome would be to highlight what you are talking about.
@jeffchastine
@jeffchastine 10 лет назад
Yeah - I tried doing this during recording, but the mouse would slowly get out of synch with what I was saying (for some reason).
@TheGugustar
@TheGugustar 10 лет назад
Anyway, it's still very good :)
@dionyzus2909
@dionyzus2909 3 года назад
Can I put the color data and position data in different buffers and then link them together somehow?
@ravivaishnav1293
@ravivaishnav1293 10 лет назад
Firstly, great tutorial thank you so much., i have been trying to polish my opengl skills that i learnt few years ago but i dont seem to remember doing any shader coding..i am curious as to why?.is it because of new opengl version? Thank you
@jeffchastine
@jeffchastine 10 лет назад
It was probably the older version (fixed pipeline) of OpenGL. There weren't a lot of tutorials on shader-based OpenGL, so I made these :)
@ravivaishnav1293
@ravivaishnav1293 10 лет назад
Great...looking forward to watching all of the tutorials..gosh your students are lucky..Thanks again
@danielw.854
@danielw.854 10 лет назад
Jeffrey Chastine but how do you actually draw these now? dont we need to tell opengl how the position data is layed out? i mean, how does glDrawArrays know what and how to draw?
@icaroamorim3123
@icaroamorim3123 6 лет назад
is this modern opengl?
@azizas9366
@azizas9366 6 лет назад
OpenGL Guru
@eclmist
@eclmist 8 лет назад
Why is vPosition a vec4 at 10:30?
@jeffchastine
@jeffchastine 8 лет назад
Because everything gets "upgraded" to a vec4 anyway (because of the hardware).
@mohammedthaier1718
@mohammedthaier1718 3 года назад
09:45
@daddydangerous20
@daddydangerous20 7 лет назад
Hi... a question please ... How does the GPU know which VertexAtribute to be used for position and which one to be used for color as I can see in the code towards the end you use glEnableVertexAttribArray to represent both .... thanks for the video
@jeffchastine
@jeffchastine 7 лет назад
Yes, you're correct in that the call to glVertexAttribPointer is used to set both locations, but look at the call in slide 22. You can see we're passing "loc2" as the variable, and then passing (as the last parameter) where that data starts. Compare that to the first call to glVertexAttribPointer and I think you'll see the difference. I hope that helps.
@daddydangerous20
@daddydangerous20 7 лет назад
Ok.. I think i got it... Thanks... The gl_position value in the shader is what determines which vertex attrib to be considered as position... but there is no such similar gl constant in the fragment shader.. Why is that?
@jeffchastine
@jeffchastine 11 лет назад
Thanks - glad I could help!
Далее
Tutorial 7 - Index Buffers in OpenGL
7:02
Просмотров 16 тыс.
Tutorial 6 - Vertex Buffers in OpenGL (code)
5:29
Просмотров 21 тыс.
Tutorial 16 - Texture Mapping in OpenGL
14:33
Просмотров 88 тыс.
Tutorial 12 - Lighting in OpenGL
13:00
Просмотров 54 тыс.
Vertex Buffer Objects and Vertex Array Objects
8:35
Просмотров 26 тыс.
Tutorial 10 - Introduction to Matrix Math in OpenGL
9:27
Tutorial 11 - Introduction to Vectors
12:18
Просмотров 14 тыс.
Tutorial 3 - Introduction to OpenGL Shaders
6:02
Просмотров 86 тыс.
Tutorial 9 - Coordinate Systems in OpenGL
7:37
Просмотров 30 тыс.