OpenTK Lecture | OpenGL Bindings For C#

preview_player
Показать описание
In this lecture, I will explain to you what OpenTK is, and how you can use it to make games in C#. OpenTK has bindings for OpenGL, OpenAL, and OpenCL, but we will be focusing on the OpenGL part, since that is what you will most likely be using it for.

I do want to stress that this is NOT a lecture on OpenGL, so the OpenGL code that I do write is very sloppy. It is only meant to help show how OpenTK works.

This lecture was held live on stream. Join me on my Twitch channel here:

Other useful links:

If you liked the video, you can support me by:
👉 subscribing
👍 liking
💬 leaving a nice comment (:

00:00 Intro
02:12 Background
06:07 Window
10:42 GameWindowSettings
13:24 Window Icon
18:24 NativeWindowSettings
34:57 Window Events
40:02 Quick Triangle
43:58 Shaders
01:06:08 Buffers
01:23:37 Rendering
01:27:42 Overview
01:30:54 Outro
Рекомендации по теме
Комментарии
Автор


Also, leave a like if you liked the video. It really helps! 😉

NoNumberMan
Автор

Thank you for another video about OpenTK. When I start learning OpenTK your channel will be likely very helpful.

plrc
Автор

I have spent the last few days banging my head on the wall about this. I had no idea that I needed to create the VAO every single time in the render frame method. I thought the VAO id could be attached as an identifier to a RenderObject class I made. I never realized it was getting deleted and remade. I came back just to listen to it again just to catch all the information from the beginning part. So pretty much everything about VAO, VBO, and IndexBuffer are constantly being created and destroyed in a loop. Either way, thank you thank you thank you and look forward to learning more about GL.

dmd
Автор

Amazing lecture, was entertaining and very informing. Don’t stop with the videos / streams!

nebuladevelopments
Автор

Hi, I'm from Russia, at least my English is bad, but since you speak and explain, I really liked it. I would like to see more detailed videos on OpenGL :3

АлексВолянский
Автор

I was not getting colors working after following along with this lecture. At first I thought nothing was working because I just had a black window, but when I set the outColor to white in the fragment shader I got a white triangle.
It turns out the issue was that the "out vec3 outColor" of the vertex shader did not match the "in vec3 fragColor" of the fragment shader. When I changed the output paramter of the vertex shader to have the same name, "out vec3 fragColor", I correctly got colors.
I have no idea how it worked for you during the stream. I can't see where in the video that might have gotten corrected or worked around.

bread
Автор

You never showed the first few imports and now when I reached 59:00, I can choose to import the "GL" from 5 different namespaces, and I don't know which one you're using. If you ever do another tutorial like this, please publish the source code somewhere.

KakoriGames
Автор

I got to the end! Everything is right except a bunch of stuff, in the GL.DrawElements the program closes, the vao might be none? I didn't found yet a way to debug this into console and understand what happened, the program just exits, any tips regarding that? Thanks! And awesome video :)

dsnahogaragames
Автор

Hey, can you tell me how i am able to draw a sphere with OpenTK? I saw it in some examples, but for c++ that they use gl.sphere or something like that, but in OpenTK i didnt found a sphere command.

MikroMX
Автор

My question is not relation on your video, but I want to know how do i use OpenGL Utility Toolkit (glut) in OpenTK C#.
Thanks

maunguyenvan
Автор

I use Visual Studio on MAC, I can't find Open TK

Marinjr