Why every opengl tutorial using c++ instead of c? I mean opengl is written in c and that language is really nice so why not?
@viragvarga80552 күн бұрын
Hi, I really like your videos, but I'm having some trouble with connecting the fragment shader along the line, because the color of the triangle is white instead of the color I/you set. I don't really know why or how to solve it. It doesn't show any errors and even the compileError function in shaderClass is silent. I only noticed this mistake a video or two later, but when I compared my files to yours, I couldn't find anything that differs. I know it's a long shot, but maybe you have some suggestion, how to find where the data to/from the fragment shader disappears? Otherwise, great videos, they are a lot of help.
@VictorGordan2 күн бұрын
@@viragvarga8055 it’s probably a typo in the fragment shader. It’s a common issue
@viragvarga80552 күн бұрын
@@VictorGordan I checked again and used ctrl+c, ctrl+v on the fragment and vertex shader files (to make sure it's identical to yours), and I also checked all the other files as well, but it's still not working, the triangle is still just white. do you have any other ideas, maybe? ( I don't have any error messages or warnings appear either)
@VictorGordan2 күн бұрын
@ then I don’t really know tbh :/ could be some system specific problem
@viragvarga805522 сағат бұрын
In case you have a problem like this, make sure you didn't accidentally create a new GLuint ID variable in one of the functions of VBO.cpp, VAO.cpp, EBO.cpp or shaderClass.cpp. Also, glGetError() is a great way to find problems. Thank you for the help anyway, and the exceptionally quick replies. <3
@orionconstellation22 күн бұрын
can i open imgui menu in game without glfw?
@VictorGordan2 күн бұрын
@@orionconstellation2 glfw creates the window, so no, without a window you can’t open the UI menu (thought you could create a window with another library such as SDL or SFML)
@orionconstellation22 күн бұрын
@@VictorGordan im trying to create a menu for ets2 , im a beginner lol, i dont understand anything im doing haha, its all help of ai, thank you for the reply
@splits89994 күн бұрын
wow, this is why linux matters
@VictorGordan3 күн бұрын
To be fair it's mostly a C++ thing rather than an OS problem. C++ just kinda sucks at handling libraries, especially compared to something like python where it's hilariously simple
@splits89993 күн бұрын
@VictorGordan true, tho, tbf i dont have any experience with c++ or opengl but im pretty sure on linux itd be as simple as installing the dynamic library packages system wide, #including akd linking in the makefile? What i was complaining about was mainly all the unzipping and manually moving dlls
@white_cloth4 күн бұрын
Beautiful algorithm on display here. It’s surprising how accurately (not talking about energy conservation) Blinn-Phong can simulate specular lighting in spite of its simplicity and efficiency.
@Domo22xD4 күн бұрын
Thank you!
@emiliozalva57196 күн бұрын
Very useful. Thank you very much buddy.
@bruthermunbill5296 күн бұрын
Great tutorial other than the super fast skipping ahead like at 3:07. The skipping makes it kinda hard to follow along.
@jesseekoh38166 күн бұрын
Hi, I am currently following your tutorial and it's been an interesting one. For some reason I can't get the pyramid to rotate along it's axis even when is set model to glm::translate(model, glm::vec3(0.0f, 0.0f, 0.0f))
@galacticduck64298 күн бұрын
Thanks so much! One issue I've just had was that I didn't place the gl_Position at the end of the default.vert's main() function. Its not clear to me why this needs to be at the end? Having this line at another location in the main() function caused my floor to not be displayed.
@CHESShireCat9 күн бұрын
See this is exactly what I wanted to learn from my professor. But he kind of just dropped us into the deep end with no explanation. Thanks for the tutorials you are the only hope for me to pass this class.
@Tayoky9 күн бұрын
how to not open a terminal window ?
@ToxicTrack_9 күн бұрын
My project just has a main, (no WinMain) and to disable console, I just set Linker->System->SubSystem to "Windows (/SUBSYSTEM:WINDOWS)" instead of "Console (/SUBSYSTEM:CONSOLE)" and the console goes away.
@manuelmeekattukulam11 күн бұрын
Thank you for the amazing tutorial!!!
@manuelmeekattukulam11 күн бұрын
For anyone who can load the model, but the texture looks messed up. Try this: in default.vert line 42 change the line from texCoord = mat2(0.0, -1.0, 1.0, 0.0) * aTex; to texCoord = mat2(1.0, 0.0, 0.0, -1.0) * aTex; This fixed the model textures for me. I think this is just flipping the texture.
@fft202011 күн бұрын
when I was programming BASIC in the 80s I could draw a triangle on screen withe 3 commands, not 1000 like here... but hey... progress
@VictorGordan11 күн бұрын
@@fft2020 if you want to just do simple 2D draw calls in a few lines, then this series is not for you. I recommend you check out SDL and SFML, those might suit your needs better
@fft202011 күн бұрын
just the instalation seems a nightmare.... this is where I get off
@Sirbozo14 күн бұрын
help "filepath" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
@topraktuncer69747 күн бұрын
i have the sampe problem. Have you found a solution?
@galacticduck642915 күн бұрын
One issue I came across, should anyone need it, was I tried to combine "get_file_contents(vertexFile)" with "vertexCode.c_str()", i.e. "const char* vertexSource = read_file_contents(vertexFile).c_str();". This lead to a compilation error of the shaders that I missed for a while. I think the cause was the std::string component going out of scope. So, having these on two separate lines is important!
@GamingForLifeGF17 күн бұрын
2024, VS2022 and still works.
@pookab590517 күн бұрын
its a good video but its well beyond me with all of the coding or scripting.
@SpartanJoe19319 күн бұрын
Just adding GGX to Halo 3 with metallic workflow thanks to this video. Apart from a few artifacts it's alright.
@mr.hashundredsofprivatepla371112 күн бұрын
How? Are you modding or reverse engineering it?
@SpartanJoe19312 күн бұрын
@mr.hashundredsofprivatepla3711 Modding. 343 released the mod tools when MCC was ported to PC. You can compile shaders there.
@Eggnog41720 күн бұрын
Those following in later years, use version 1.82 from the releases tab (page 3 as of posting). Functions change over the years xD
@VictorGordan20 күн бұрын
@@Eggnog417 yeah, I’m starting to see some of my tutorials going out of date. I should have probably also shown the steps I took to find the correct functions instead of just telling you which one to use
@Nufflewuck24 күн бұрын
The best way to experiment I found was to assign a few keys using earlier methods to the increase and decrease of a & b. Use uniforms in the shader. Good homework task :D
@jawtaro4583Ай бұрын
*same vibe* 0:06 "first we'll *slightly* modify our camera matrix" some artist: "first we'll add the outline, and then add the details"
@VictorGordanАй бұрын
Hahahaha
@Samit-r3hАй бұрын
Do I have to use Cmake, I have never really used it before and have only worked with visual studio solutions, so I don't really know how it works, so I'll just continue without cmake for now ig but if you think I should learn it, then I will, please reply
@MalekAli-yg5btАй бұрын
i spent 5 hours just to find out i wrote ./ instead of ../ std::cout << "kill me" << std::endl; edit: these videos are great, thanks;
@VictorGordanАй бұрын
Hahaha it happens, we've all been there :')
@fydamaraАй бұрын
You are a SAVIOR, thank you for this tutorial!
@shadowlordalphaАй бұрын
Its been out for quite a while but I think doing Mesh here and Light after would have been the better order to the tutorials. still a good tutorial though
@VictorGordanАй бұрын
@@shadowlordalpha why do you think that? Meshes are more complex than lighting and people tend to drop off as the complexity increases so it's better to have the lower complexity stuff first imo
@shadowlordalphaАй бұрын
@VictorGordan it finishes moving the last main rendering part out of the main code so nearly all rendering code is now in its own classes. Changes the way we load the data allowing for the normals to be more easily loaded in after depending on how loading is done Does not require lighting to function in a decent way. People can now load their own models or art which is bigger then you would expect and making it look even better is a nice push. But mainly I just really dislike using hardcoded points and lighting itself is a very complex topic and harder for some people to get
@VictorGordanАй бұрын
@shadowlordalpha fair points. If I do a series like this again I'll consider having the models loaded early on!
@PP-ss3zfАй бұрын
Hi Victor, thank you for the video. I have a question about an example I have seen someone do where they have a scene that has multiple light sources, like a TV backlight, a tube light, and a lamp. From this they baked a lightmap, and for each of those three objects the lightmap was red, green and blue in those areas. They later used this lightmap, and mixed the colours using a fragment shader, and they controlled the scene's lighting by passing different values for the r g and b using uniforms. There were three light sources, and thus they used r g and b for each light source. But I'm wondering what happens if someone has more than three light sources. In this example they have one light source corresponding to a r/g/b channel of the lightmap. But I'm wondering what happens if there is a 4th, 5th, multiple light sources.
@VictorGordanАй бұрын
An image is limited to 4 channels max. So u could bake another light into the 4th channel in this example, but after that the only way to add more baked lights to the same lightmap would be to increase the size of the channels from let's say 8bit to 16bit and then use bitshifts to store two object related baked lights per channel, but it's easier to just make another lightmap imo
@PP-ss3zfАй бұрын
@@VictorGordan thank you! when you say its easier to make another lightmap - is it still the same principle, just split over multiple textures? i.e., you have to just mix/blend from more than one source
@captainbiddy4942Ай бұрын
hands down, to this day one of the best tutorials ive seen. thank you brother and keep up the good work.
@cicada-yd8hoАй бұрын
Hi, I have problem with memory acess violation because of NULL pointer propably in Textures.h and .cpp. Problem is with stbi. Can you please help me?
@poopingnutsАй бұрын
had to play this one at 0.25x speed
@edipedipbulmazАй бұрын
this is way more unorganized than the previous video. it looks like you created bunch of unneccesary files that are imposibble to control
@edipedipbulmazАй бұрын
Why did you just jump to linear algebra? we weren't even doing any math previous episode.
@edipedipbulmazАй бұрын
i hate myself now but hoorray now i can draw a 2d triangle in a 3d domain
@tomasrasimavicius1914Ай бұрын
For anyone trying to get this setup to work with SFML 2.6.x, you should get imgui-sfml from the 2.6.x branch and get an older version of imgui (1.90 worked for me).
@XanthumSАй бұрын
thank you so much
@sohankaushik7Ай бұрын
If fps is clamped to 60fps even after setting swapInternal(0). If you got Nvidia then go to Nvidia Control Panel and turn off V Sync
@ayushbhardwasАй бұрын
Btw, why are we passing the VBO to the VAO::LinkAttrib function in the first place?
@undeadpresidentАй бұрын
I appreciate the tutorial. I wish you would use DSA functions though.
@VictorGordanАй бұрын
@@undeadpresident I think I touch upon them in one of my Modern OpenGL videos. Not 100% sure though
@kuty701Ай бұрын
thank you!
@l9314Ай бұрын
LOL don't work ... f**k that shiiiiiiii
@zephyros1938Ай бұрын
literally the best tutorial out there thank you
@omarmostafa4173Ай бұрын
erorr: cannot open glfw3.lip
@adambelos2157Ай бұрын
BRAH! you saved my whole semester! i was so depresed i was sitting on this shit for 2 weeks did not understand how the fuck i should fucking add camera.. thaaanks bro. you made it look giga ez and fast
@manuelmeekattukulamАй бұрын
You are hilarious bro!!
@shengfuzhaoАй бұрын
Does it need to glDeleteBuffers() in the end of your code in DSA?
@ProjectGhostfang-qc1eyАй бұрын
For you vs code users make a file called task and make it a .json and put (The code i gave you) inside of it and build and it should work perfectly now { "version": "2.0.0", "tasks": [ { "type": "shell", "label": "Build OpenGL Project", "command": "C:/ProgramData/mingw64/mingw64/bin/g++.exe", "args": [ "-g", "-std=c++17", "-I${workspaceFolder}/include", "-L${workspaceFolder}/lib", "${workspaceFolder}/src/main.cpp", "${workspaceFolder}/src/glad.c", "-lglfw3dll", "-lopengl32", "-o", "${workspaceFolder}/YourProjectName.exe" ], "options": { "cwd": "${workspaceFolder}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: C:/ProgramData/mingw64/mingw64/bin/g++.exe" } ] }
@Roufoxx2 ай бұрын
Hey Victor! Thanks for these amazing tutorials. It's crazy the ressources you can find for free on the internet. Anyways, i'm thanking you here for these tutorial as I am stopping here. It's quite too complicated and fast paced for me. I also find it quite difficult to grasp onto the subjects that are talked in these tutorials. And, the more I follow them, the more complex it gets and, when having trouble on the earlier subjects, it becomes impossible to move onto the new subjects. OpenGL is definetly interesting and I am going to continue learning it, only i'm going to do it on my own, at my pace. Anyways, thanks for the content :)
@nikitaegle55332 ай бұрын
I rewrote the code 5 times, but I have a small piece of texture illuminated, but not the main one, but the specular, and everything else is completely black,what am I doing wrong?