OpenTK part 08 - The Shader Program

preview_player
Показать описание
Organize the vertex and pixel shader code into a Shader Program Class.

How to create and update additional shader uniforms.

Time Codes:
0:00 - Introduction
0:43 - Shader Program Class Creation
4:02 - Compile Vertex and Pixel Shader Methods
8:15 - Create and Link Shader Program Method
10:09 - Getting Lists of Uniforms and Vertex Attributes from the Shader Code
17:28 - Setting Uniform Values
23:09 - Setting Additional Uniforms and Conclusion
Рекомендации по теме
Комментарии
Автор

I really appreciate you making this tutorial series, i feel like there aren't enough good tutorials about OpenTK

sjoerdev
Автор

This fel way over my head at first lol
But now I feel like it's coming together for me...from what I'm doing myself to.learn about shaders and this, helps with organization and other things, that k a lot man!!

STILL EAGERLY WAITING FROM THE PHYSICS ENGINE SERIES TO CONTINUE!! haha

vachila
Автор

I just finished the entire tutorial series and, WOW! When I first tried to learn about OpenTK I didn't even know where to start, but after theses tutorials I feel like I understand how it works and will be able to use OpenTK myself. I wish more pepole would be as good at explaining as you. If you decide to continue work on this series, I am looking forward to it!

laval_
Автор

These videos have been such a great help and I really appreciate you making them. I was just wondering how to set an icon for the Game1 window. Could you possibly explain how to do this to me or show it in part of a future tutorial?

XenialXenon
Автор

Thanks, very interesting. I had a problem at the end because I did this using Windows Forms and used a OpenTK GLControl on the main form. There is no OnUpdateFrame function.
To implement the colorFactor code I placed the OnUpdateFrame code into the glControl1_Paint function.
Then in Form1.cs file (Games.cs) added a timer:
*private System.Timers.Timer Game_timer;*
In the glControl1_Load function added:
*Game_timer = new System.Timers.Timer(1000.0 / 60.0);*
*Game_timer.Elapsed += TimerElapsed;*
*Game_timer.Start();*
*private void TimerElapsed(object sender, ElapsedEventArgs e)*
*{ glControl1.Invalidate();}*
Seemed to work. Is there a better way? Like a OpenTK GLControl function I should call that is the same as OnUpdateFrame?

AORD
Автор

In your video's, do you show how to use the GameWindow in a WPF application?

jfras
Автор

where could we find the code of this tutorial ? thanks very much if you could share the code .

abcdefghihjkmnopqrst
Автор

Can you make tke last video with textures PLS

losi-closed
Автор

I wonder about your opinion or that of other viewers: In my game I have hundreds of moving and rotating sprites, each with their own motion variables (position, direction, speed, rotational speed, etc). In C++ it seems like the consensus about this is that it is more efficient to use GLM to just rebuild one big vertex buffer each frame and make one draw call to render all the sprites, rather than passing a uniform separately for each sprite and doing hundreds of draw calls per frame. I guess that's probably still true in C#? Are OpenTK's matrix math capabilities up to it? I guess I'll find out, but. I'm interested in the opinions/experience of others.

shavais