C++ OpenGL #1 - Some basic GLUT

  Рет қаралды 251,386

Oskar Veerhoek

Oskar Veerhoek

Күн бұрын

Пікірлер
@nicholasfoster1247
@nicholasfoster1247 3 жыл бұрын
Coming at you literal 10 years later, this tutorial is fantastic! Just started a masters course and we've been covering openGL for computer graphics. You hit every nail on the head ^^ This was great for getting started with my projects.
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
Thanks for the kind words! I've decided I'm going to continue these tutorials, but I'm going to redo this episode.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
Thank you for your feedback. I thought the university-level lecturing would be more helpful, but I definitely see your point. Perhaps I could include a practical demonstration application in the new series, allowing for cool bits of trivia and a more visual approach. What do you think?
@samskins
@samskins 12 жыл бұрын
2 weeks of trying to figure out how to setup the compiler, finally succeeded. Then I can't even code without errors everywhere. This video made everything so clear and now I can make other simple objects (multicolor cubes for example). So THANK YOU!
@TheCodingUniverse
@TheCodingUniverse 13 жыл бұрын
@Redemptie First off, Notepad++ isn't an IDE, it's just a beautified text-editor. If it's syntax highlighting you're after: yes, notepad++ does support the C++ syntax. Visual Studio Express for C++ on the other hand is an IDE, but it requires you to set-up the .dll files for opengl and glut. Fat chance tutorials for that will be up soon.
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
I don't think everyone wants me to stray off from Java. In fact: I think most of the subscribers want to see more Java, because that's what they subscribed for. This series will be continued in another form. I have been working on this for several weeks. If you don't like what you see, go and unsubscribe.
@adnanmunawar7972
@adnanmunawar7972 11 жыл бұрын
Awesome video. You really know how to teach in a manner in which a person with no knowledge of opengl can understand. Well done and thanks for the video. Please make more
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
Indeed. I am using Sublime Text 2 in this video.
@hasankurisan6224
@hasankurisan6224 8 жыл бұрын
You said "series" but no more videos about this :(
@michaeljones1686
@michaeljones1686 5 жыл бұрын
2sad4me
@TheCodingUniverse
@TheCodingUniverse 13 жыл бұрын
@GingerGames This compiling bit only goes for Macintosh users and they need to have the Xcode stuff installed to use the c/c++ compiler and OpenGL framework. For Windows users I recommend using freeGLUT (google it).
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
That's true. Learning Java properly supplies you with a solid knowledge of a clean, object-oriented approach.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
As I said in the video description, I have continued this series in the form of the Beginners' OpenGL series.
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
What you're seeing is a text editor called "Sublime Text".
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
I'm glad the video helped. The Beginners' OpenGL series is supposed to replace this one.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
In the 'keyboard' function, you should change the if-then statement. The value to which 'c' is compared is the ASCII character code that the program reacts to.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
I think the next video I make will be a Beginners' OpenGL one, yes.
@gar0u73
@gar0u73 11 жыл бұрын
Salman, He's just using a text editor called 'Sublime'. It's very nice for software coding.
@zKrellyn
@zKrellyn 12 жыл бұрын
Oh, absolutely. I find learning Java in school really helped when learning the C languages. The C languages, to be proficient with, of course, you really need to be able to think with code in the air, ya know what I mean? Once ya learn how to make the long line of code in Java, it's much easier to visualize the 1/8th length of code in C++ haha.
@Balu108
@Balu108 3 жыл бұрын
Even after so many years, this is still relevant and very helpful! Thank you so much for your videos. :)
@rolpon2871
@rolpon2871 2 жыл бұрын
Yes! Also, does anyone know what happened to this guy? He hasn't uploaded in years!
@xpw1990
@xpw1990 12 жыл бұрын
Can you make more videos on C++ openGL and explain the glut/gl and render functions?
@LightTheMars
@LightTheMars 11 жыл бұрын
Yep, the code from this video runs on every platform that GLUT supports (that's all desktop systems). Though on Windows or Linux you can't compile with "g++ -framework ...", that's OSX specific, you'll need to manually link the opengl32.lib and glut32.lib. Or just use an IDE (like CodeBlocks or Visual Studio).
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
Maybe I'd agree with more if I had an Android, but I don't have an Android. I don't think Java is necessarily more useful than C++, but I do think that the community is better and that Java has it has certain convenient elements such as automatic memory management and a wide variety of built-in libraries. C++ can run natively on Android too.
@gar0u73
@gar0u73 11 жыл бұрын
Great tutorial. Was trying to get a terrain elevation tutorial work, and they were missing a lot of little bits. Thought I'd back up and start at the beginning with GLUT, and your tutorial worked perfect on my Ubuntu 12.04 box. Thank you! Very helpful!
@TheCodingUniverse
@TheCodingUniverse 13 жыл бұрын
@jsgnextortex I don't really get what you're saying here, namely: NVIDIA doesn't make CPUs. but I presume it has to do with a conflict between different architectures, in which case you're probably using OpenGL extensions that aren't supported on the other system and are thus emulated, resulting in a slow emulation process. This could also have to do with your definition of "slow", try implementing the delta-pattern.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
In this video I use a programming editor called Sublime Text.
@GingerGames
@GingerGames 13 жыл бұрын
@TheCodingUniverse I'm on a mac. I fixed the problem. I had unistall xcode then reinstall it again to get g++/gcc work fine.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
In this video I am using Sublime Text. Good guess though.
@GingerGames
@GingerGames 13 жыл бұрын
When I try to compile the code at 2:15 , I get a long list of undeclared scopes and things that say /System/Library/Frameworks/GLUT.framework/Headers/GLUT.h:60:23: error: OpenGL/gl.h: No such file or directory etc.
@sacred8510
@sacred8510 12 жыл бұрын
Thank You! This tutorial is very helpful for beginners like me. I am new to c++ graphics, but i understand your explanation, please make more! =D
@TheWarriorofDestiny
@TheWarriorofDestiny 12 жыл бұрын
Dude the tutorial was amazing. I have never seen anyone working on Mac (or anyone using a Mac) and still i got everything (I use Windows, IDE Bloodshed Dev-C++). Could you continue these tutorials? I think there would be plenty of users like me who wants to depend on your stuffs.
@TheCodingUniverse
@TheCodingUniverse 13 жыл бұрын
@TheMrOlini I'll probably pick it up in the next JGD tutorial or the one after that. It depends how much time I have.
@jos3583
@jos3583 9 жыл бұрын
you've answered the question i needed an answer too for quite a few days now. Thank you, you're an extremely intelligent person.
@TheCodingUniverse
@TheCodingUniverse 9 жыл бұрын
Jo S You are more than welcome, and thank you for the compliment!
@olendotatv
@olendotatv 8 жыл бұрын
I have similar code as yours and triangle still not showing, just black screen :(
@olendotatv
@olendotatv 8 жыл бұрын
sry ok now
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
On Windows the process is more complex. In particular the use of higher version OpenGL functions. It is too much for me to explain in this comment, so I suggest you search for help on how to set-up an OpenGL workspace in Visual Studio (Express) through Google.
@Redemptie
@Redemptie 13 жыл бұрын
I've never used notepad++ because it was a general not specific question; I though i would put it in, with out getting into what is and what is not an integrated development environment! Not everyone is stringent to the rules and regulations.
@DDlol01
@DDlol01 6 жыл бұрын
Please never delete this!
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
Thanks for the feedback. I will consider it.
@TheCodingUniverse
@TheCodingUniverse 13 жыл бұрын
@Fayimora Too little exposure and reactions at the time lead me to believe I'd better put my time into Java Game Development.
@K.V.N.
@K.V.N. 2 жыл бұрын
Great video, but what happened to the next parts? I can't find any "C++ OpenGL #2" or so on... :(
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
Which error do you get?
@AllanJeremy
@AllanJeremy 11 жыл бұрын
Well this is awesome. But what happened to the other tutorials in these series?
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
Thanks. This series has been continued in the form of the Beginners' OpenGL series. (link in the video description)
@ncvitak
@ncvitak 11 жыл бұрын
I'm surprised you are not using Xcode to write c++ on mac. I would asume that because you use Eclipse and NetBeans for Java, that you would do something similar by using Xcode. Xcode also has a ton of neat features where it'll find memory leaks in your code.
@geannaaferatseu4609
@geannaaferatseu4609 4 жыл бұрын
Wow, this seems simpler than what I'm doing using OpenGL with XCode and freeglut. But can I know how if I want to make the object move? I learnt in my class today but the lecturer was using Windows and GetTickCount() is apparently a Windows thing. I tried using mach_absolute_time() to replace it but it does not work.
@MatejKramny
@MatejKramny 12 жыл бұрын
Could you make a tutorial on how to map textures to e.g. rectangle in c++ (mac env.)? Thats what I am having problem with, and can't seem to find a guide on google. Don't know if I am searching wrong or something.. Thanks
@Batin84s
@Batin84s 11 жыл бұрын
What IDE are you using here? I've been looking for simplistic IDE's and this looks like the best one.
@michaeljones1686
@michaeljones1686 5 жыл бұрын
Yes! I can draw a triangle! Nothing can stop me now!
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
You mean you weren't able to read a fragment shader?
@zigo750
@zigo750 12 жыл бұрын
where did you learn to do this??... impressive!!!
@SpookySkeleton738
@SpookySkeleton738 12 жыл бұрын
Just download glut and copy glut(dot)h to your include folder then do what he does but where it says Opengl/glut .h just put glut(dot)h
@hrbharry
@hrbharry 11 жыл бұрын
How do I change how it reacts to key presses? No matter what I change the 'c' to in the keyboard function, it closes no matter what key I press.
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
Would you like me to put up an annotation that tells people how it would work on Linux?
@adithyapandiri251
@adithyapandiri251 3 жыл бұрын
Very good explanation!! Is there a part 2 of this series? Please add more videos
@Lele665
@Lele665 13 жыл бұрын
Thanks for sharing :) What application are you coding in? the ui looks less cluttered than xcode.
@TheMBK83
@TheMBK83 11 жыл бұрын
Thanks a lot for the great tutorial,,, can you make a video about adding a 3D model. I want to add more than one 3D object, extension TRI to my project and then apply diffrent kind of shading (Phong, gouraud , flat shading) and transformations(translation, rotation,etc) on them. help plz
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
Thank you, but what does Santiago mean?
@Redemptie
@Redemptie 13 жыл бұрын
will glut work with an IDE for windows like: visual express or something like notepad++;
@MatejKramny
@MatejKramny 12 жыл бұрын
If you want a suggestion, I couldn't load files from fs in the mac environment from c++..
@carltoncooke1622
@carltoncooke1622 4 жыл бұрын
this is the best video of come across, please do more!
@AntinKrauss
@AntinKrauss 13 жыл бұрын
The BEST C++ OpenGL (glut) lessons i ever see !! ) Thnx
@ORTIZ26X
@ORTIZ26X 12 жыл бұрын
hello friends I really liked the tutorial and it worked to perfection. perogun if I can put another imajen and if I can dae mobimiento the image and if I can create functions, buttons and things like that.
@pablobertaco9351
@pablobertaco9351 11 жыл бұрын
how do i get the headers, libs and dll for the gl on widows? S; I'm tryng to make it work with Visual Studio for some weeks and I still can't draw a triangle...
@DiamondSane
@DiamondSane 7 жыл бұрын
5:38 a real programmers deal
@MrAnky97
@MrAnky97 7 жыл бұрын
Dude, like can you please continue this playlist.. because i cannot find any good opengl tutorial elsewhere..
@PooLeeBoo
@PooLeeBoo 12 жыл бұрын
What is your IDE? ;D It looks very clearly.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
Thank you for the kind words.
@projectflowin
@projectflowin 9 жыл бұрын
how to download and open glut to program as how you do? Thanx ... I downloaded but i dont know how to open?
@hrbharry
@hrbharry 11 жыл бұрын
I actually fixed it. I had to do some wierd thing to my project. Anyways, I think its cool that ur doing c++ on a mac!
@C5FlyingSquad
@C5FlyingSquad 12 жыл бұрын
I get this error: ld: can't open output file for writing: tryingGLUT, errno=21 for architecture x86_64 collect2: ld returned 1 exit status Please help
@johnsherfey3675
@johnsherfey3675 9 жыл бұрын
All I want to know Is how to make my ray tracer real time cross platform. So is there any way to some how just right pixel straight to the screen, or on a polygon then to the screen.
@jsgnextortex
@jsgnextortex 13 жыл бұрын
How to make Glut apps run good in Nvidia...I compile them in my notebook(intel graphics 256mb) but when i try them in my CPU(Nvidia 512mb) they run slow as hell
@sirus3002
@sirus3002 10 жыл бұрын
this was a really clear tutorial.learned a lot,thank you sir.
@TheCodingUniverse
@TheCodingUniverse 10 жыл бұрын
You're welcome!
@harry-ie5xd
@harry-ie5xd 5 ай бұрын
this video is nearly as old as i am yet it is still useful
@TheKuleluke
@TheKuleluke 11 жыл бұрын
I think it is just a text editor with syntax highlighting.
@ivanrazvor6962
@ivanrazvor6962 10 жыл бұрын
Best OpenGL video tutorial of those, that i have seen. Its also good, that this tutorial for OS X.
@TheCodingUniverse
@TheCodingUniverse 10 жыл бұрын
Ivan Razvorotnev Thank you!
@projectflowin
@projectflowin 9 жыл бұрын
Can i use these knowledge to create softwares like make human and blender?
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
You're welcome. I'm glad you got what you wanted.
@arsnakehert
@arsnakehert 12 жыл бұрын
Wow, great tutorial! I finally (think I) understand the mouse and keyboard callback functions! XD
@johnnyvesa6845
@johnnyvesa6845 10 жыл бұрын
Build your own games and consoles! Lessons offered. Please message for details.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
The setting up of libraries is much less complicated on Mac than it is on Windows.
@deltakid0
@deltakid0 4 жыл бұрын
It's even easier in Debian. By the way, thank you very much, I hope you read this comment since you have no activity from 5 years ago.
@echeij
@echeij 12 жыл бұрын
Are you going to continue this serie?
@NyrixCorp
@NyrixCorp 12 жыл бұрын
Nice tutorial bro. I'd be interested to watch some more episodes, if you ever get time.
@Themistocles425
@Themistocles425 12 жыл бұрын
How do I setup OpenGL/GLUT for Microsoft MS Visual Studio C++ 2010?
@FadyMorris86
@FadyMorris86 11 жыл бұрын
Great tutorial , very clear and organized ! Thank you very much !!!!
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
You are welcome and thanks for the compliment!
@regularieeregular8465
@regularieeregular8465 3 жыл бұрын
How to write a Program in C/C++ with OpenGL using Glut.h to display your "First Name" using output primitives by defining vertices in 2d/3d.
@hamzarahman7763
@hamzarahman7763 10 жыл бұрын
Plz plz continue tutorial.. As soon as possible .... I need it...
@md.imamhossain1890
@md.imamhossain1890 4 жыл бұрын
I have learned a lot.
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
I have continued this series in the form of the Beginners' OpenGL series.
@Lele665
@Lele665 13 жыл бұрын
@TheCodingUniverse thx, ill try it out.
@degamemeneer
@degamemeneer 12 жыл бұрын
What compiler are you using? I need a good free IDE :(
@ans66ff
@ans66ff 7 жыл бұрын
why is the colour 1 and not 255
@huuchinduu
@huuchinduu 12 жыл бұрын
what is the name of your compiler?
@C5FlyingSquad
@C5FlyingSquad 12 жыл бұрын
which code editor are you using?
@johnfakename1823
@johnfakename1823 8 жыл бұрын
tried opengl to tutorials several times over the years, and the libraries and packages update/change so fast that it breaks most tutorials. I just decided that I won't learn it
@TheCodingUniverse
@TheCodingUniverse 11 жыл бұрын
For video tutorials it is no problem.
@TheCodingUniverse
@TheCodingUniverse 12 жыл бұрын
I'm working on it.
@ArtChartable
@ArtChartable 11 жыл бұрын
Why the code should stay the same?
@shreyashwagh4860
@shreyashwagh4860 7 жыл бұрын
NICE VIDEO ....LAST TIME RESCUE...AMAZING TYPING SPEED!!!
@ab.3800
@ab.3800 12 жыл бұрын
You can use C macros for cross platform includes. Like #ifdef __WIN32
@beytullahsengul
@beytullahsengul 2 жыл бұрын
hey this is quite old video but the things you taught are always impressive
@imparadiseknowitbtch7790
@imparadiseknowitbtch7790 11 жыл бұрын
dude awesome but could you show where to get and how to instal Open GL??
@admin1b12
@admin1b12 4 жыл бұрын
is the codes are same with windows
Modern OpenGL (Glad) | Game Engine series
19:39
The Cherno
Рет қаралды 92 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
6 Months of Testing C++ Build Systems: Here’s What You Need to Know
16:33
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 845 М.
OpenGL Tutorial - 3 | Animation | OpenGL in C++ with the GLUT library
19:59
The Pentamollis Project
Рет қаралды 78 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 175 М.
You Should Learn C++ (for hacking games)
6:11
cazz
Рет қаралды 467 М.
My first 3D game using OpenGL + Glut (Extended)
7:46
OneGoldenCat
Рет қаралды 499 М.
How you can start learning OpenGL
6:02
Low Level Game Dev
Рет қаралды 109 М.
New Graphics Library in C (Olive.c Ep.01)
1:58:46
Tsoding Daily
Рет қаралды 147 М.
Making a New Compiler
15:36
Modern Retro Dev
Рет қаралды 9 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН