I tried learning OpenGL in 7 days - using Rust

  Рет қаралды 200,876

Tantan

Tantan

3 жыл бұрын

Graphics programming is so cool!
I managed to make a water shader, load 3d models, create a beautiful transition shader in just 7 days using OpenGL and the Rust programming language.
I used this OpenGL wrapper called glium:
github.com/glium/glium
I also utilized a game framework called macroquad:
github.com/not-fl3/macroquad
Water & Transition shader is open source on by github page! (wip)
github.com/TanTanDev/macroqua...
The pixel art I used in the video for water shader:
ansimuz.itch.io/magic-cliffs-...
♫ Music credits ♫
Noah James: • Can I Make Music in th... ​
I use a lot of his music, check him out!
Want to support me?
Patreon: / tantandev
Monero: 43Ktj1Bd4Nkaj4fdx6nPvBZkJewcPjxPB9nafnepM7SdGtcU6rhpxyLiV9w3k92rE1UqHTr4BNqe2ScsK1eEENvZDC3W1ur

Пікірлер: 147
@PolyMars
@PolyMars 3 жыл бұрын
this is so cool! graphics programming is magic
@fdevstudio5692
@fdevstudio5692 2 жыл бұрын
You have sdl
@LoganStringer
@LoganStringer 3 жыл бұрын
The way you code "out loud" is hilarious and is how I talk to myself internally when I code... But with more cussing. Great video!
@Tantandev
@Tantandev 2 жыл бұрын
haha "but with more cussing"
@ThisIsAnAccount
@ThisIsAnAccount 2 жыл бұрын
I am genuinely disappointed that I haven't found your channel earlier. This was a great video. I'm glad you addressed the ups and downs of learning graphics programming and actually showed your progress. I remember learning shaders and OpenGL for the first time and getting used to it over many months. It was agony, but damn.. the satisfaction is unreal when you get something to work AND actually understand what and why. Top quality video, plus Swedish accent automatically adds a +10 enjoyment buff. Now to watch all the other stuff on your channel!
@ThatOneHandsomeGamer
@ThatOneHandsomeGamer 3 жыл бұрын
Finally! There's a severe shortage of Rust opengl videos on KZbin
@LoganStringer
@LoganStringer 3 жыл бұрын
Right?!
@GrizzliusMaximus
@GrizzliusMaximus 3 жыл бұрын
not a rust user but man, Tantan surely is convincing me to be one!
@thedeathchimera
@thedeathchimera 3 жыл бұрын
This video got me into Rust, and now I'm learning it through the free Pluralsight event going on. Actually feel like I'm making programming progress. Just gotta push myself through the glsl tutorials.
@TheSulross
@TheSulross 3 жыл бұрын
huh? I thought this was a video on a dude trying to learn to play a weird musical i strument
@hanes2
@hanes2 3 жыл бұрын
the lack of Vulkan and Metal is even stronger.
@GrizzliusMaximus
@GrizzliusMaximus 3 жыл бұрын
I love graphics programming! once you start, you will realize how much you have been missing out. The endless possibility of Graphics programming + how it utilizes the GPU. Can't wait to see the premier! edit: just watched. great video as always. Love to see you getting better!
@j_respect5948
@j_respect5948 2 жыл бұрын
I dont know about that.... I feel like i become nothing and can't learn anything..... Everything seems impossible
@abuazzan462
@abuazzan462 2 жыл бұрын
any advice on how to start and what language i should begin with?
@not_herobrine3752
@not_herobrine3752 2 жыл бұрын
the day that happens is when i manage to link a goddamn graphics library in windows, and that will happen when pigs fly
@WannibeManisha
@WannibeManisha 3 жыл бұрын
Looks amazing and really natural!! I'm still intimidated by shaders but someday I will tackle it! Always enjoy seeing these small challenges 😄
@Skeffles
@Skeffles 3 жыл бұрын
Great water shader! I've never really gotten on with shader code so it's great to see you making such a neat effect.
@LucyPero
@LucyPero 3 жыл бұрын
That's so awesome. I was just about to use macroquad for my game and resume learning Vulkan in Rust haha. You are so prolific!
@Tantandev
@Tantandev 3 жыл бұрын
Haha what a coincidence!
@dimaspadma8073
@dimaspadma8073 2 жыл бұрын
why you prefer to use vulkan instead of opengl?
@ares2238
@ares2238 3 жыл бұрын
Your channel is so underrated! Love the content!👍
@aliancemd
@aliancemd 3 жыл бұрын
That looks so good. It could also be used for the fire effect, representing the hot air/heat distortion.
@Tantandev
@Tantandev 3 жыл бұрын
Good idea! I definitely should tweak it a bit more so it's a bit more watery looking
@woodmanmade
@woodmanmade Жыл бұрын
Love using "side quest" to describe when you get distracted by a shiny object and spend WAY too much time not working on what you originally planned 😅
@Tantandev
@Tantandev Жыл бұрын
haha yeah!
@SmoothieBuns
@SmoothieBuns 3 жыл бұрын
That water scene looks a lot like a maplestory scene... i love it!!
@guogeorge7956
@guogeorge7956 2 жыл бұрын
Actually I am more intristed in how he made the wrong refletion at the beginning.
@ankitnautiyal2568
@ankitnautiyal2568 3 жыл бұрын
Wow great work. Thanks thanks thanks for trying these cool things out, its really inspiring. Also you are really doing a great job for rust and game dev learners.
@timothyvandyke9511
@timothyvandyke9511 2 жыл бұрын
gotta say those graphics and that water shader make me want to play that game
@algs5483
@algs5483 3 жыл бұрын
3:32 I love this sound. Reminds me of the COWS.
@JesusMartinez-zu3xl
@JesusMartinez-zu3xl 2 жыл бұрын
You give me confidence in learning open gl!
@pup4301
@pup4301 3 жыл бұрын
Thank you so much. I will now proceed to copy your learning path. :)
@Tantandev
@Tantandev 3 жыл бұрын
:) my path to learning Rust has been pretty crazy. I usually make some smaller projects, dabble with different libraries. Some projects I probably never would've made unless I had this channel, it kinda fuels my creativity
@pup4301
@pup4301 3 жыл бұрын
@@Tantandev The fact that project creation took all forms of learning for you has proven what I thought to be true. Experiencing experiences is the best way to learn.
@PeterFaria
@PeterFaria 3 жыл бұрын
I hope you’ve looked at writing shaders as separate files. There are vscode plugins to allow syntax highlighting for shaders.
@DestroManiak
@DestroManiak 3 жыл бұрын
one nice idea might be to slowly reduce distortion of the way as you get closer to the boundary of water
@qxb348
@qxb348 2 жыл бұрын
This channel is golden!
@theburntcrumpet8371
@theburntcrumpet8371 2 жыл бұрын
You have good taste, we have the same monitors and audio interface
@KindStarWonder
@KindStarWonder Жыл бұрын
Love it!
@FlashBreakerOfficial
@FlashBreakerOfficial 3 жыл бұрын
here a small deform shader^^ f = 0.5 ; // factor or intense nm = tex2d(normalmap, vec2( x + time, y )) ; // move in time nm = saturate((nm -0.5 ) * 2 ) *f ; // saturate make the value is betwen 0 ~1, and the -0.5 and * 2 is to scale the map from middle point result= tex2d(render_tex, vec2( x + nm.x , y + nm.y)) // deform render textur with normalmap ^^
@falxie_
@falxie_ 3 жыл бұрын
I looked up Rust game stuff and wasn't disappointed
@adytm
@adytm 3 жыл бұрын
Cool vid Good luck
@_RafaelKr
@_RafaelKr 3 жыл бұрын
6:56 this Ben Böhmer Set on the Cercle KZbin channel is just amazing!
@Tantandev
@Tantandev 3 жыл бұрын
Yes! I listen to it a lot when programming, good eyes!
@_RafaelKr
@_RafaelKr 3 жыл бұрын
@@Tantandev If you like this type of music for programming I can really recommend the set of Mark Tarmonea on the channel "Vibrancy Music". Very good vibes! :)
@LaChips806
@LaChips806 2 жыл бұрын
You can actually create an OBJ parser pretty easily. It's a simple file format. I've been able to do in in a few minutes. Rendering however, is a different story..
@gsbenassi1735
@gsbenassi1735 2 жыл бұрын
I have a question: This type of function is ONLY for the aesthetic use of maps where the player does not use water (in other words: if he falls into the water he dies) OR is it possible to program this function in games where the character falls into the water and can swim and sink in it? Because I can't imagine a characters transition going down, obviously in a single "tale" Since I know that this function only serves to represent the surface reflection. I ask this because I intend to introduce maps where there is a transition between surface and water plane, and I think it would be difficult to use this function in a game like this, where you can fall and swim 🤔
@xbz24
@xbz24 2 жыл бұрын
Love the content
@roucool1323
@roucool1323 3 жыл бұрын
Nice video!
@rustmc
@rustmc 3 жыл бұрын
so hyped, wgpu next time?
@Tantandev
@Tantandev 3 жыл бұрын
Oh wow, wgpu looks awesome! Researching what it was I came across this tutorial: sotrh.github.io/learn-wgpu/beginner/tutorial3-pipeline/#vertex-fragment-what-are-those My interest has peaked!
@abhinavkuruvilajoseph9274
@abhinavkuruvilajoseph9274 3 жыл бұрын
wgpu seems interesting but it does not support older hardware :(
@rustmc
@rustmc 3 жыл бұрын
@@abhinavkuruvilajoseph9274 they do have an opengl backend, although it is apparently is still WIP
@abhinavkuruvilajoseph9274
@abhinavkuruvilajoseph9274 3 жыл бұрын
@@rustmc yes i saw that. till then i cant support older hardware if i use wgpu
@rustmc
@rustmc 3 жыл бұрын
​@@abhinavkuruvilajoseph9274 true, but overall you can still support way more systems with wgpu, heck even the web
@estanforth6754
@estanforth6754 3 жыл бұрын
Vulkan next!
@ajinkyax
@ajinkyax 3 жыл бұрын
I started learning C++ and Dx11 (since C++ has way more tutorials) I used to make games in Rust and Bevy. What will you suggest me ? Since I started Bevy cause of your videos :) So far what I like in C++ wish Rust had, a better IDE support visual studio, Rust analyzer always fails on me, I had to change 3 OS so far to get it working. C++ has better documentations, Rust has the book which is the best thing, but lacks in Rust docs which I never understood.
@coffeecatrailway
@coffeecatrailway Жыл бұрын
This reminded me I have a lwjgl side project...
@cosput
@cosput Жыл бұрын
Solid advice.
@bojanstromboli1306
@bojanstromboli1306 2 жыл бұрын
Rust is more convenient on linux to install in order to make it work. In windows I need to download visual studio and install some components from the workload. I haven't used it in a while but what made you choose rust over c++?
@ahmadj1064
@ahmadj1064 2 жыл бұрын
programming on *nix is better in general
@AdhirRamjiawan
@AdhirRamjiawan 3 жыл бұрын
epic video!
@blackmirror9573
@blackmirror9573 3 жыл бұрын
good work... i really like it....
@KropedStudio
@KropedStudio 8 ай бұрын
most sane rust programmer
@andrewjohnson1835
@andrewjohnson1835 3 жыл бұрын
17 more hours to goooooooooo
@filippocozzi2941
@filippocozzi2941 3 жыл бұрын
What tutorial did you follow? Also great work, i can't imagine how hard it is to learn something completely new in such a short time...
@Tantandev
@Tantandev 2 жыл бұрын
sorry for the late answer, I followed the "glium book" it's in the official glium repository: github.com/glium/glium/blob/master/book/SUMMARY.md
@LunaCoco
@LunaCoco 3 жыл бұрын
Oh, hype
@qops1981
@qops1981 2 жыл бұрын
Maybe you already have by more, but you should try the newer Vulcan API. I think even OpenGL supports it as a successor.
@Byynx
@Byynx Жыл бұрын
Is it possible to have your text editor color layout ?
@jawtaro4583
@jawtaro4583 28 күн бұрын
reminds me of the game, Kingdom
@costelinha1867
@costelinha1867 3 ай бұрын
Aaah Rust, the language with a compiler so strict that it made me run away to C in fear, lol.
@vectoralphaAI
@vectoralphaAI Жыл бұрын
Is there a possibility that Rust becomes just as used as C++ in the games industry for game development?
@Tantandev
@Tantandev Жыл бұрын
I truly believe so, but what we have to see then is probably more game engines being written with it. I could see Bevy having a big impact in the future.
@costelinha1867
@costelinha1867 3 ай бұрын
I mean, I doubt most game devs will use it for scripting, as they'd prefer a simpler language, but I can totally see Rust being used to power future game engines, making them safer and all.
@SuperCacazinho
@SuperCacazinho 3 жыл бұрын
You look so happy
@ninocraft1
@ninocraft1 5 ай бұрын
nice, thx i will steal that xD
@andrewjohnson1835
@andrewjohnson1835 3 жыл бұрын
here to after the the live stream
@pislify34
@pislify34 3 жыл бұрын
rust and opengl looks like that kind of thing that looks forbidden by the C gods
@koldovalnya
@koldovalnya 2 жыл бұрын
I MUST subscibe at least because of THIS xD: 3:33 You are the best dude :D
@ypaut
@ypaut 2 жыл бұрын
I swear
@julienblanchon6082
@julienblanchon6082 8 ай бұрын
I'm strugling to learn opengl for doing some gaussian splatting stuff it's quite hard
@uljonata3947
@uljonata3947 3 жыл бұрын
can u make a game with vulkano-rs/vulkano in 7 days?
@zaleyu5275
@zaleyu5275 3 жыл бұрын
Beautiful keyboard. Is that g915? Thanks
@Tantandev
@Tantandev 3 жыл бұрын
It's a keyboard from a company called Wooting. They keys are analogue meaning it knows how far in you press the keys, pretty cool but I don't use that feature really... My first mechanical keyboard :)
@zaleyu5275
@zaleyu5275 3 жыл бұрын
@@Tantandev thanks, it’s pretty
@ferdinand.keller
@ferdinand.keller 3 жыл бұрын
Nice we can agree on rust being the best
@LucyPero
@LucyPero 3 жыл бұрын
I wish I could learn Vulkan in 7 days... it's gonna be tough 😓
@Tantandev
@Tantandev 3 жыл бұрын
That sounds very hard! :P
@zed4314
@zed4314 Жыл бұрын
Man why are swedish people so damn good at KZbin
@passivecryptoearnings3605
@passivecryptoearnings3605 3 жыл бұрын
Please write your shaders in separated files !!
@peki_ooooooo
@peki_ooooooo 2 жыл бұрын
cool
@spodarman3823
@spodarman3823 2 жыл бұрын
How is his accent so confusing and so clear at the same time
@CreateDefaultSubobject
@CreateDefaultSubobject Жыл бұрын
Does intellisense work well in visual studio code for rust?
@costelinha1867
@costelinha1867 3 ай бұрын
Yes, provided you're willing to wait for the colossal time it takes for rust_analyser to load.
@uotsabchakma
@uotsabchakma Жыл бұрын
Oh thanks! For what? For letting me know that there's a graphics crate named glium!
@thg1nrediar
@thg1nrediar 2 жыл бұрын
good
@minegeymer
@minegeymer 3 жыл бұрын
Cool x2
@wait...6531
@wait...6531 2 жыл бұрын
I'm trying to learn and man it's hard
@Tantandev
@Tantandev 2 жыл бұрын
Yes it is, it's like learning a new programming language almost, so many concepts to grasp!
@itay2826
@itay2826 3 жыл бұрын
I'm not going to lie.. I'm probably the most lazy man I know but I want to start learning to code (I don't know any Programming language except really really noob level py but I'm 14 so I guess it's not soooo bad Situation) and I don't know if should I start with py, java, js, any c (I know they are nothing alike) or rust and I will love to hear from you what do you think because when I starts something I'm putting my whole time to it.. so I want to be sure I started with the best (I knew that I need to know more than one language and that I have a lot of time to discover myself what language it's the best for Me but I want your advice as a very smart and experienced guy) so.. ?
@Tantandev
@Tantandev 3 жыл бұрын
I don't think it should matter to much what language you start our with. Try to make many small projects. I got started with graphical programming using multi media fusion, but I would probably not recommend starting with that. But yeah over time, you are probably going to get to try out many languages. A valuable skill is to be able to find resources to learn, searching for tutorials, articles, videos. Find a language/game engine that you can find a lot of learning resources on
@voodoo_child9831
@voodoo_child9831 Жыл бұрын
It has been more than 7 days, I still can't setup OpenGL properly.
@Tantandev
@Tantandev Жыл бұрын
We've all been there!
@user-qb1jg5pd6l
@user-qb1jg5pd6l 3 жыл бұрын
好可爱!
@Temulgeh
@Temulgeh 2 жыл бұрын
i find it funny that working with the API didn't seem that much of a problem for you, but GLSL was, because for me GLSL was the break after all the API nonsense. Maybe the wrapper you're using is just that good
@bhuwansharmaa
@bhuwansharmaa 3 жыл бұрын
I stopped at the triangle :( .. need to start again
@Tantandev
@Tantandev 3 жыл бұрын
it truly takes a long time to wrap your mind around how everything works together. I'm now doing round 5 or six of making a graphics program from scratch. I'll have video on it later :)
@bhuwansharmaa
@bhuwansharmaa 3 жыл бұрын
Yeah its like iterative process of learning. Get the blurry picture in mind and then sharpen it up with repetitions
@user-xw7fb2og4p
@user-xw7fb2og4p 3 жыл бұрын
Thanks for russian subtitles
@vargatamas6422
@vargatamas6422 8 ай бұрын
I thought Heath Ledger is dead but he's coding in Sweden
@RoboticusMusic
@RoboticusMusic 2 жыл бұрын
What could I do better in Rust than anywhere else?
@VivekYadav-ds8oz
@VivekYadav-ds8oz 2 жыл бұрын
Nothing better or necessarily faster (unless you're not talking about C/C++), just safer and more elegant.
@perforongo9078
@perforongo9078 Жыл бұрын
You can make anything just as good in one language as another, Rust just helps you make good code faster.
@Antagon666
@Antagon666 Жыл бұрын
OGL is pain by itself. But doing it in Rust ? Suicide.
@otistically
@otistically Жыл бұрын
🦀🦀 :)
@null_ham
@null_ham 3 жыл бұрын
steam game made with rust when
@iHelpOfficial
@iHelpOfficial 3 жыл бұрын
I think a game called WitchBrook is being developed by chucklefish with Rust
@avourofficial
@avourofficial 2 жыл бұрын
Please review rg3d rust game engine
@coolmanthecool603
@coolmanthecool603 Ай бұрын
Now do it with vulkan
@Cowboy8625
@Cowboy8625 3 жыл бұрын
confusion is all part of programing. At lest that is the case for me.
@macawls
@macawls 2 жыл бұрын
you are hilarious
@evakuator8118
@evakuator8118 3 жыл бұрын
I wish I didn't have a job
@tecnotrecos1680
@tecnotrecos1680 2 жыл бұрын
Now learn vulkan in 7 days
@Tantandev
@Tantandev 2 жыл бұрын
Some day maybe :D Would actually be pretty interesting experience
@danifeldman8884
@danifeldman8884 3 жыл бұрын
I have wondered at the beginning how you learned OpenGL in 7 days when youtube recommended me this video. So it is just a Rust graphics library, and you modified some examples, ok : )) Something like the Magnum C++ graphics library I use for a game but I guess you can set it up easier. It is ok to understand some basic math used in graphics and shader programming which is a whole new art and science on a lower level. But it is confusing to say that that you have learned openGL in 7 days.
@MCexeOfficial
@MCexeOfficial 2 жыл бұрын
Är du svensk?
@MCexeOfficial
@MCexeOfficial 2 жыл бұрын
nvm jag märkte det sen senare i videon
@nyxkrage
@nyxkrage 3 жыл бұрын
vulkan in 7 days when?
@Hellohiq10
@Hellohiq10 3 жыл бұрын
Imagine using rust
@blockedchannel7032
@blockedchannel7032 Жыл бұрын
So, now let’s learn Vulkan in seven days, because OpenGL is deprecated
@HDmc16
@HDmc16 2 жыл бұрын
took me 7 days just to draw a triangle :(
@evakuator8118
@evakuator8118 3 жыл бұрын
Use neovim Pepega
@t.lnnnnx
@t.lnnnnx 3 жыл бұрын
opengl currently makes me wanna kms
@humptydumpty3805
@humptydumpty3805 Жыл бұрын
when pewdiepie goes programming:
@Tantandev
@Tantandev Жыл бұрын
lmao
@elgusanito6991
@elgusanito6991 3 жыл бұрын
too much hype
@zainliberty4084
@zainliberty4084 2 жыл бұрын
Why you have so many hair
@sytnoff1
@sytnoff1 Ай бұрын
Cuz he is human
@osys7832
@osys7832 8 ай бұрын
I’m a guy who knows things about graphics programming. unless you’ve some experience before there is bo way this is 7 week work. You can’t even understand the whole the foundation of pipeline and vertex buffers arrays etc.
100 Hours Of Graphics Programming
6:48
Tantan
Рет қаралды 144 М.
I remade my voxel game 3 times, this is why
12:11
Tantan
Рет қаралды 119 М.
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 41 МЛН
4 Months of Game Programming With My Own Engine
21:30
jdh
Рет қаралды 396 М.
Recreating Noita's Sand Simulation in C and OpenGL | Game Engineering
10:03
I made my own Text Editor (in Rust)
8:16
FaceDev
Рет қаралды 86 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
3 Devs Make An FPS - Godot vs Unity vs Unreal || GameDev Battles
12:39
I Made a Graphics Engine
6:42
Zyger
Рет қаралды 240 М.
I made Games with Python for 10 Years...
28:52
DaFluffyPotato
Рет қаралды 249 М.
Game Engine Of The Future
9:12
Tantan
Рет қаралды 133 М.
Угадай Цвет 2!
0:23
КОЛЯДОВ
Рет қаралды 1,9 МЛН
Угадай Цвет 2!
0:23
КОЛЯДОВ
Рет қаралды 1,9 МЛН