How To Set Up OpenGL (and freeglut) on MinGW w/ CLion + Run Demo Programs | Game/3D programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ส.ค. 2018
  • The audio recorded way out of sync. Apparently, my laptop has a really hard time handling recording (My desktop is out of commission doing a 2 day render, so I had to use my laptop for this). Hope it turns out clear enough.
    When I say OpenGL hasn't been updated since the ice age, I mean openGLUT.
    Find me, support me:
    Stream: / overridetheprogram
    Patreon: / codetechtuts
    One time donations: www.paypal.com/paypalme/matte...
    Shop via my Amazon Affiliates Link: amzn.to/3bVQ9X0
    Business inquiries: codetechtuts@gmail.com
    Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 48

  • @h-devo
    @h-devo 5 ปีที่แล้ว +13

    The only good way I found in hours of searching... Thank you !

  • @baturalpk.456
    @baturalpk.456 3 ปีที่แล้ว +2

    After tons of research I finally found you and did it man, thanks a lot!

  • @saulfernandez4878
    @saulfernandez4878 2 ปีที่แล้ว

    Fantastic video! I was so glad to see the triangle window pop up. Thank you!

  • @yanchengdu4795
    @yanchengdu4795 3 ปีที่แล้ว +1

    Such a good tutorial. Got everything I needed. Thank you.

  • @icaruspadlus7970
    @icaruspadlus7970 5 ปีที่แล้ว

    hello! can you tell what stuff are contain in main.cpp file when you show the pyramid? i’m dumbass, sorry...

  • @SencerAramok
    @SencerAramok 5 ปีที่แล้ว +2

    YOU GAVE ME a lots of time , thanx

  • @elitebruce
    @elitebruce 5 ปีที่แล้ว

    you saved me lots of time, thanks

  • @rabeebibrat1805
    @rabeebibrat1805 3 ปีที่แล้ว +1

    Thanks, man. Awesome tutorial! Also the simplest one

  • @dimensionaltraveller1550
    @dimensionaltraveller1550 4 หลายเดือนก่อน

    What options do I have to accept in the mingw to install all I need??
    is it just all of it??

  • @ByrdInfluenza
    @ByrdInfluenza 4 ปีที่แล้ว

    Thank you for sharing!

  • @Sculman7
    @Sculman7 2 ปีที่แล้ว

    you are a literal God. Thank you so much

  • @akj7
    @akj7 5 ปีที่แล้ว +1

    Thanks man.

  • @unlink1649
    @unlink1649 5 ปีที่แล้ว

    Soooooo does this work on OSX too?

  • @spectator1635
    @spectator1635 5 ปีที่แล้ว

    Thanks !

  • @dominikheinz2297
    @dominikheinz2297 5 ปีที่แล้ว +2

    Good video!
    I have 2 questions:
    1) Will this work just fine on linux aswell? Because I sometimes work on windows and sometimes on linux and it would be nice if it compiles and runs with one click on bioth systems without the need to do any complicated changes.
    2) Whats the advantage of freeglut over GLAD GFLW3 etc? I was always told to use GLAD/GFLW3.

    • @CodeTechandTutorials
      @CodeTechandTutorials  5 ปีที่แล้ว +2

      Should work on linux as well, there may be some minor changes needed. The good news is you don't have to worry about the mingw setup part, the gnu compiler will work fine, but you'll have to use command line to launch it most likely. I could make a quick vid on doing this in linux sometime if it would help ppl. From what I understand, Glad and GLFW3 are more mature and kept up to date. I moved on to using GLAD/GLFW3 myself since this video as well. The windowing system is much better with GLFW3 for games and stuff. GLUT is nice for a quick setup for a demo or simulation but you are right, there are better options these days for long term projects.

    • @rankala
      @rankala 5 ปีที่แล้ว +1

      Code, Tech, and Tutorials hey, I would like to see a Linux tutorial. Especially for a group work to develop on Linux and windows at the same time. I’m new to the cpp world.

  • @jonathanmontrose6102
    @jonathanmontrose6102 2 ปีที่แล้ว +1

    This must be outdated. It no longer works. When you set the toolchain to the downloaded minGW it says that the package is missing the C++ compiler and the mingw32.libz(zlib1.dll) files. I have tried for many hours to fix this and decided it is just not worth it to try to code on windows. Linux (Pop OS) took 3 mins to set up and works natively out of the box.

  • @mihneafilipovici4385
    @mihneafilipovici4385 2 ปีที่แล้ว +1

    This video is a god damn life saver! You need a better thumbnail my man and you'll get 100k views in no time. I skipped the video at first and went through alot of other useless google results

  • @user-ud2pv1pb4j
    @user-ud2pv1pb4j 11 หลายเดือนก่อน

    is this work for m1 air?

  • @ruslan_yefimov
    @ruslan_yefimov 4 ปีที่แล้ว +2

    Maybe i'm a bit stupid - pretty possible, but can we use glut without adding it to mingw?
    p.s. I'm a beginner who decided not to use visual studio and it's challenging for me now :)

    • @CodeTechandTutorials
      @CodeTechandTutorials  4 ปีที่แล้ว +2

      Ahh yes coding sometimes makes us all feel stupid at times don't worry about it. You'll need some sort of compiler to go with glut, other ones will work too just might have to tweak some things differently. I would recommend glfw3 instead of glut these days

  • @faycalbeghalia2259
    @faycalbeghalia2259 ปีที่แล้ว

    Insane ty

  • @yeeter269
    @yeeter269 ปีที่แล้ว +1

    thanks, Gilfoyle from silicon valley its appreciate it.

  • @grammarnazi1868
    @grammarnazi1868 4 ปีที่แล้ว

    This gives me an error when trying to execute. Could anyone help me fix it?
    "C:/Qt/5.14.1/mingw73_64/include/GL/glut.h:487: undefined reference to `__glutInitWithExit'""
    It's like the GLUT library itself has compiling errors, but when I open that file, I can see that the method "glutInitWithExit" is defined right there, but it still counts it as an undefined reference for some reason. Thank you very much.

    • @CodeTechandTutorials
      @CodeTechandTutorials  4 ปีที่แล้ว

      Sounds like a linker error. It sees your header, but the definition is likely precompiled as a static library (.lib file) (also the .lib file needs to be the correct x64 or x86 and debug or release depending on how you are compiling). So your linker command is probably what needs fixed. It has been a while since I've used freeglut so I might be a little mistaken on this but it sure sounds like the linker command or lib file or both is the issue. (I moved on to using glad.c and glfw3).

    • @grammarnazi1868
      @grammarnazi1868 4 ปีที่แล้ว

      @@CodeTechandTutorials Thank you so much for answering that! Do you know by any chance how I can fix that in CLion? I'm desperate for an answer.

  • @klujavaprogramming6895
    @klujavaprogramming6895 4 ปีที่แล้ว

    LIFESAVER

  • @aayushmishra6469
    @aayushmishra6469 3 ปีที่แล้ว

    I know this video is old and I might not get any help but still, I followed every step of the tutorial, in my main file, #include throws an error GL/glut.h file not found, if anybody can help me with this

    • @CodeTechandTutorials
      @CodeTechandTutorials  3 ปีที่แล้ว

      extract glut to your include directory(or maybe it is already there, I have no way of knowing), in the CMakeList.txt put target_include_directories(targetname path/to/includes) after add_executable. re-run cmake and it should see it after that. If you're still not sure, link the code somewhere and someone should be able to help

    • @aayushmishra6469
      @aayushmishra6469 3 ปีที่แล้ว

      @@CodeTechandTutorials like how you told in the tutorial all the files from freeglut folders are in the minGW directory, the include folder under minGW does have a GL folder which has a glut.h, i.e. (minGW64/include/GL/glut.h) is present but when I write the code in the "main.c" and type #include,when including the header files like #include when you code in C, CLion tells me that file not found. My CMakeList.txt is exactly the same as shown in the video except for the project name part. My main.cpp and CMakeList.txt are included here:- drive.google.com/drive/folders/1dJazp0LXzpHxB8OQI781tq2p8l8i2rh0?usp=sharing

    • @CodeTechandTutorials
      @CodeTechandTutorials  3 ปีที่แล้ว

      @@aayushmishra6469 It seems freeglut isn't well supported anymore for mingw. I tried to see if i could get it up and running again. I couldn't find the precompiled binaries and when I tried to compile them myself with mingw, there are some issues with the source code.

    • @aayushmishra6469
      @aayushmishra6469 3 ปีที่แล้ว +1

      @@CodeTechandTutorials thank you very much for the response, now I don't have to bash my head against the wall for a problem that cannot be fixed

  • @davidpenta8477
    @davidpenta8477 2 ปีที่แล้ว

    God bless you

  • @danieleccleston7928
    @danieleccleston7928 3 ปีที่แล้ว

    Yea freeglut did confuse me, I thought I would be getting an opengl.zip kinda like sdl

  • @ukyoize
    @ukyoize 3 ปีที่แล้ว

    What if I don't want to use IDE?

    • @CodeTechandTutorials
      @CodeTechandTutorials  3 ปีที่แล้ว

      Sure, havent made an exact video on that but check cmake episode 10, probably has most of the info you are looking for

  • @moritzmaibaum8494
    @moritzmaibaum8494 2 ปีที่แล้ว +1

    Do not work for me

  • @sweetweakness9812
    @sweetweakness9812 4 ปีที่แล้ว

    god ty

  • @kosbarable
    @kosbarable 4 ปีที่แล้ว +1

    Why glut? Why not GLFW?

  • @kennethchao1290
    @kennethchao1290 3 ปีที่แล้ว

    Thanks a lot, all these documentations for MINGW online are anti-human

  • @DesertCookie
    @DesertCookie 5 ปีที่แล้ว

    RIP headphone users.

  • @_xuver_1578
    @_xuver_1578 3 หลายเดือนก่อน

    Ай, Иисус - красавчик просто! Дай тебе бог здоровья!

  • @matthewrix1047
    @matthewrix1047 ปีที่แล้ว

    You should try moving your cursor in a circle more I don't think you did it enough