Added: 4 years ago
From: mittrekkie
Views: 138,565
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (201)

Sign In or Sign Up now to post a comment!
  • opengl or directx?

    some people say that directx is better, is that true?

    and they say opengl doesn't have tesselation, i wanna which is better . plz reply im still a noob at c++ :P

  • @XxDahamonnahxX OpenGL is a Open source project that is universally accepted, wheres Direct X is proprietary software owned by Microsoft. OpenGL is for Video Rendering Through Hardware Acceleration (Graphics cards) but Direct X does a lot more, like sound design (Direct Sound), Video Rendering (Direct 3D), Scripting and other special hardware tasks. OpenGL is for Video in General, but Direct X was made for Game development in mind, note that Direct X is only on Windows

  • hehehe std hehehe

  • I am watching this in December 2011. I love you for this.

  • I see you have a "From Linux" folder on your hard drive. Dual-boot setup?

  • you can also check out my channel. it features videos about the program i developed that do projectile motion. if you're interested in this program you could download it from softpedia. thanks a lot in advance

  • Excelent tutorial!!! Thank you very very much :)

    

  • This is a great intro that does not rely on GLUT, SDL, etc. Also a good example of why someone might want to disable comments on his/her videos.

  • TO BEGINNERS:

    If you want to learn C++, get a book. If you want to learn OpenGL, get a book. If you want to learn Win32, get a book.

    For C++ I recommend [C++ Primer Plus]

    For OpenGL I recommend [OpenGL SuperBible] (the opengl redbook 7th edition is shit, stay away from it)

    and for Win32 I recommend [Programming Windows®, Fifth Edition]

    Books, books, books. These videos teach you jack shit (no offense meant, mittrekkie). They are just not long enough to go in depth.

  • @DonOfTheInternet

    Yeah, cos u don't want to actually use the media possibilities of a computer to learn stuff about computer programming, cos that would be like using the tool your going to exploit to learn how to exploit it... which would be, like, er, crazzzy, yeah?

  • @DonOfTheInternet Thanks, even though I've already got two of the books you named!

  • @DonOfTheInternet

    Meh, I manage to figure out anything I need to do with Win32 using Google and MSDN.

  • great video thanks man

  • whats " opengl"?

  • @delgadogorn OpenGL is a graphics API, you need it if you want to easily communicate with the GPU.

    "Open GL" means: Open Graphics Library

  • good explanation

  • I started laughing when you began explaining "using namespace std;".

    This is an OpenGL tutorial, not C++ for beginners.

  • @Ilikemustard True, if you want that, go to antiRTFM's C++ tutorials, but it is good to make sure people understand what it is they're doing if they don't know what they're even getting into, especially since OpenGL isn't a good beginner's start. I've been learning SDL OpenGL for the past few days and I want to make the full transition to OpenGL, I don't need the beginner's guide, but it's nice to have.

  • @mittrekkie

    thank you those tutorials ware very helpful, but can you please make new tutorials for OpenGL 4.1 ?

    thank you

  • lol @ windows xp

  • @Saithize LOL at upload date (May 30, 2007)

  • Your voice is very C@@L and smexy.....

  • @MrVirtualCoder

    Don't know what your problem is... I myself, like many others, found this tutorial very useful.

  • @MrVirtualCoder

    it's called learning. no one is just gonna know the basics, they have to learn the basics before they can move forward, simplifying it makes it easier to learn. And once you learn the basics, then you can learn the more difficult shit. You build up. Teachers in elementary don't just bust out with algebra and calculus, they start with basic adding and subtracting.. But I guess any 8 year old that doesn't understand the concept of algebra should just give up on basic math, right?

  • @iceshadow625 Yes. Until his or hers brain is able to comprehend the information send from other people. How would you feel, if suddenly we had millions of mental retarded people, programming because some fool stupefied it. Learning is supposed to be an task in which you LEARN by using your brain, to cold-heartedly "figure it out" and not get spoon-fed every bit of information.

  • @MrVirtualCoder I see, so basically you're saying, it's better to actually know and understand what you're doing than to just use what you memorized? (sadly that's what schools try to do, is make you memorize) well anyways, with language syntax, isnt that what you really are doing? just memorizing it. Understanding comes into affect when you add the logic that makes it work. So if a million retarded people wanted to draw shapes, then good for them. But that's about as far as they'll get with it

  • 6:20 We're passing floaters. XD

  • I have question i know this open gl thing but why waste time type lines of codes just to make a simple square if you can made these easily on programs llike maya and 3ds max please enlighten me. is there a way to import the objects in programs like maya to use in c++???

  • @4Got10Shadow Yes, this is just a basic example to learn OpenGL and to understand 3D. You don't just jump right into importing models into your games when you don't know any OpenGL at all, but later that's what you do for models more advanced than like cubes.

  • @bananavice

    but i made simple games thru blender without knowing opengl

  • @4Got10Shadow Blender probably uses OpenGL or DirectX to render the games.

  • @bananavice

    I see, but they didnt require me to learn open gl to make a game??

  • @4Got10Shadow No, but you can only use functions that Blender provides. If you wanna use your own functions or make your own engine you have to learn OpenGL.

  • @bananavice

    thanks for enlightening me your a big help.

  • thanks for all so much

  • why i cant start debugging?

  • holy shit you motherfucker use windows and even worse visual c++??? are you a fucking retarded programer piece of shit newfag?

  • @GenoSkill What should i use for OpenGL i am just starting out, but i am getting a lot of errors when compiling HELP!

  • @MultiGamingGod Linux of course linux if for true people true humans

  • @GenoSkill LINUX IT IS THEN but how would i make games with it? is opengl intergrated into linux?

  • @GenoSkill Lol you suck at trolling...

  • Thanks for the tut's, real helpful to hear someone talk about it.

  • does this also work with v ++ 2010 express

  • How can I set this up in code::blocks?

  • "It's too far away, we don't care about it anyway" - Just great ;)

  • its virus on your website. so you have crash one of my computer. thank you

  • @zlakie How the fuck is source code a virus? unless you're a dumbass and ran an executable

  • U suck!

  • the people who wrote the header files for the OpenGL and GLUT mac frameworks(which I think are basically the same as those for windows and others) failed to put any comments describing the methods declared(I know that GNU had something to do with OpenAL, which has the same lack of comments). Thanks for the tutorial; I now understand what at least some of the functions in OpenGL and GLUT are used for,

    ... Not that it will matter, because I don't really plan on coding objective-c++ any time soon.

  • oh HELL yes i've been looking for something like this

    thank you for individually going through each aspect of the code and explaining the parameters and such, i really was not getting that from my professor.

  • is opengl free?

  • @MultiPivotmasterdx : Yep dude... You can download it from the Official site...

  • @MultiPivotmasterdx lol, ofc

  • dude I don't know what this openGL means but I really  need it!!!! I have a game that I would really like to play but every time I enter it, the game crashes on me a there is a big message saying ''GLW_StartOpenGL() - could not load OpenGL subsystem,,! Could u help me!

  • @stingerhead666 Have you downloaded openGL on your computer yet?

  • Will this work with code blocks environment??

  • This tut is a shit.. and you use shitty microsoft IDE...

    Half of this tutorial is not about programming, but using IDE... wtf...

  • Awesome tut! possibly the best ive seen. (actually it definitely is.) Could you tell me the numbers representing the keyboard keys, at least for the alphabet? what would mouse1 be?

  • "kinda lame.. but that's ok.. things will pick up" <= EPIC LINE!! :D

  • olol windows.... next time please platform-independent

    windows is EVIL

  • This is cool. I'm learning C right now. Hopefully sometime in the not so distant future, I will be doing something similar to this =]

  • wow i went to your website and i loved the tuts, thanks, simply amazing, i was feadin g the book opengl super bible and i dint get it, but with your tuts i really understand what i'm doing, thank you so much.

  • I'm using Dev c++

  • Thank you :)

  • Thanks for this tutorial man! I appreciate it :]

  • g++ -Wall -o basicshapes main.cpp -lglut

    /tmp/ccbX4g4j.o: In function `handleResize(int, int)':

    main.cpp:(.text+0x96): undefined reference to `gluPerspective'

    collect2: ld returned 1 exit status

    make: *** [basicshapes] Error 1

    Epic fail

  • you didn't import glut properly..

  • @FusilliJerry89 I used the same source as he did.

  • Probably a linker problem. You need link the following files:

    -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32 (the last two might not be needed, but I think they are needed on a Windows machine.) Let me know if you still have problems, I'll be glad to try and help.

    Are you using Windows? If so, I would suggset getting Dev-C++. You can download the opengl and glut updates automatically, and it's linked for you.

  • P.S. you don't link the files in the source code. You have to go to compiler options or something on your C++ editor.

  • @FusilliJerry89 No, I'm using the Penguin. (Arch Linux)

  • I do not care what anyone says for starters but I thank you for posting these videos may God bless you tremendously! Keep up the game design videos from this one I seen your doing great.

  • OpenGL kicks my monitor to 60Hz everytime I play something.

  • mines says cant find opengl32.dll

  • @t377y000 dont have the sdk

  • sorry i figured that out, afterwards, im also working on ds dev you interested?

  • yeah right it loaded so fast, this can't be windows that you are using.

  • Comment removed

  • NOW YOU KNOW HOW IT FEELS!!!!

  • Thanks for making a opengl tutorial but the line return 0; will be reached when esc is pressed because that is how the program will know to return control back to windows. You could also use the macro EXIT_SUCCESS;

  • so what? It doesnt matter what you which one you use so why bother pointing it out? Both ways work dont they?

  • GLUT automatically calls exit(0); when you close the main window. Once you call glutMainLoop(); nothing after that line will get executed.

    Also EXIT_SUCCESS evaluates to 0 on every platform I've ever developed on ;)

  • @GamingJediPwns - actually you're wrong about that. The handleKeypress() function calls exit. The 'return 0' never gets called.

  • Apparently i'm the only person on this planet with a youtube account that uses the OpenGL with Delphi instead of with C++ o_O

    (sorry, but i just don't LIKE C++ lol)

  • no, u are not the only person. i'm also here ^^

  • O_O you don't like C++?

    whats the prob with it?

    And i remember Delphi is some kind of pascal(or not?)

    Anyway i like C++ :P

  • Well... C++ is a good language to develop hardware based applications. For everything else, it's utterly terrible syntax, outdated techniques (preprocessor) etc are simply not excuseable anymore. The speed is a good point in C++, but for many applications it's utterly unneeded. E.g. in Python you can do almost everything in a high level language, while still maintaining high speed by implementing expensive functions in C++.

  • You don't like anything. Almost all your comments are just putting things down. C++ isn't the problem, you are.

  • @narutofan9999 I think that's just a matter of perspective. If you're working with low-level functions, I find C++ is a great language - like you said about hardware based applications. If you're trying to develop simpler programs that don't have such complexity, then yes, something like Python may be more appropriate. I find that C++ was designed to handle both simple and more complicated low level applications, so of course the syntax has a..."little more to it",

  • @Tarandarklord

    Well... "Terrible" syntax is maybe a bit exaggerated. I am using it myself after all. What I mean is that if you don't pay attention, you can create hardly readible code. And yeah, I am pretty sure that C was created to give access to low level functions with a relatively high level language (If I remember this right, it was something about the original creators of UNIX being unwilling to write the system in assembly).

  • You obviously don't understand it. OpenGL isn't some graphics program. It's a library which consists of a number of procedures/functions which are used to display graphics. OpenGL in itself is a standard. And it exists since roughly ten years (a bit longer), and has been constantly developed further.

  • @narutofan9999

    it's a program yes,but more than a program technically it's known as a pipeline.

    it's not just only a library.

  • Comment removed

  • @narutofan9999 really, OpenGL is a specification. The libs themselves are created by the Graphics card vendors.

  • @SuperFeimer

    you beat me. i shall be silent.

  • @narutofan9999

    You obviously don't understand it. OpenGL isnt some library. Its a graphics API.

  • @EpicOkapi

    Sorry for my incorrect terminology, but I meant just that.

  • @narutofan9999 k sorry if you think this is a dumb question

    but im 14 and i want to get into the games industry either through graphical design or animating

    if i wanted to graphics would i have to learn this or would this be left to programmers

  • @SultanaKidStudios

    If you aren't a programmer, specifically a graphics programmer, chances are you aren't going to need to know how OpenGL (or any other graphics API for that matter) works. Though you'd probably still have to deal with the technical implications, like how many textures can be used at once and stuff like that... I say probably cause I am not working in this field, so I can't say for sure.

  • @narutofan9999 k thanks

  • what I didnt really appreciate in these tutorials about

    OpenGl; Is that there is no explanation of how those vertices are drawn, you cant just say "this is 3 float numbers aaaaand thats it"

    You can forexample say this number: "1.0f" is a vertex drawn "X" pixels into, out of or left of the screen. and then the second coordinate of the vertex is drawn.. I dont understand that vertex call and 3 float nrs at all actually when I think about it..

  • I know .. you explained the eye model and how its drawn in the beginning.

    okey im soory will study those words you said more closely..

    I guess im a teaspoon student..:P

    !

  • Comment removed

  • wow, that was hard........... looks like im moving onto proper programming languages!

  • This video should have been 1 minute long ...... at the most ...

  • he wouldn't have taught anything if the video was 1 minute long........

  • go read a book

  • What?

  • std stands for standard in the C++ world, not Sexually Transmitted Diseases like you were PROBABLY thinking.

  • shutup idiot. u dont now enyfin!

  • Riiiiiight. You keep tellin' yourself that =P

  • srry, I don't even know why I said that to you. Was just a random YT insult.

  • ah. Alright. I forgive you =P

  • @Tarandarklord smexy

  • @Tarandarklord hahah, that's a good one for all those trolls out there ;)

  • @Tarandarklord or stupid teenage di*kheads

  • @Tarandarklord I wouldnt touch strings, they probably have HIV.

  • @headchopperz Lol that true mate !

    

  • @headchopperz

    :DD

  • @Tarandarklord

    Thanks! I've been going around for years wondering wether it was Sexually Transmitted Diseases or standard but now I know!

  • @XxPouringRedRainxX You're very welcome! Just remember, that's what std means in programming, not in the "real world", so long as you don't get those two mixed up, you'll be totally alright!

  • can someone give me the link to download the openGL file..thanks =)

  • Lol windws :D

  • very nice

  • u rock.

  • I am realy pleased by your work and teachings.

    THANK YOU.

  • I'm officially your fan...

  • and thats how you first 3D program....

  • can you create a fps with this?

  • Yeah you can. In fact, the video game Doom 3 was created with this!

  • well I know that, but first I need to improve my c++, and Doom 3 was created by a team of professionals, not a bunch of newbies. You should also look at directx, it is used in games too.

  • Ooh. Does DirectX work with the Code::Blocks compiler?

  • I use microsoft's visual c++ 2008 express edition, not Code::Blocks. I'm not sure how code blocks works, but if you want directx programming, you need the directx sdk. (dx9 for windows xp, dx10 for vista)

  • Whenever I try to install Visual C++ 2008, it can't. It just says "Installing: Attempt 1 of 5" then "Installing: Attempt 2 of 5" etc. etc. and it never works! D:

  • okay just download the installer, run it and make sure your operating system is up to date. Do you have windows xp? if you do just upgrade to service pack 1, if you have a lower version, don't upgrade if you have sp2 or sp3. Oh and download from microsoft's site ONLY.

  • Make sure you have your antivirus turned off. It's firewall might be stopping the installer from downloading the needed files.

  • Weird... Just yesterday it successfully installed :D

  • What, DX10?

  • No, Visual C++ 2008 Express.

  • Oh, good for you.

  • DX9 for everything. DX10 is slow.

  • can your computer even run dx10? My computercan't but if yours can then explain why.

  • Either my graphics card can handle it, or I have the right drivers for it. But either way, I'm sticking with DirectX 9. A model that will be rendered at 60 FPS in DX9 will run at 3 FPS in DX10.

  • it would mean he has the proper device drivers and system requirements to run DX10. =/

  • Agreed. DX9 ftw

  • The graphics API should not matter so long as you abstract it in your engine, I usually code for DX9/DX10/GL1.1/GL2/GL3 all at once. DX9 is nice, but it really begins to show its limit once you dig into DX10

  • I knew that, I was comparing DX9 to DX10, that's all. I prefer DX9 over DX10 when it comes to OpenGL.

  • Where can I download OPENGL???

  • is there a difference between Open GL and GL Basic?

  • dude, u ROCK...

    I just bookmarked ur website.

  • omg, please, dont use and advertise necrosoft production in tutorials... People! OpenGL works fine on Linux too and we have Code::Blocks IDE, which is free and _opensource_ + crossplatfrom, so we can use it on windows too...

  • VIM is ever faster and extra crunchy by the way.

  • guys here's a tip to get visual studio, if your a student u can go to Microsoft website verify your a student and then it will let u download for free but u gotta send in a form of student id it might have been a promo, and it could be over but i think its worth checking out. plz don't mark this as spam i posted this so it could be useful info to some1 that doesnt have 150$ to buy Microsoft visual studio

  • visual studio 08 is free. its only a express but it has everything you need no extras, i still prefer 05 tho

  • i got vs2008, server 2003, vs2005, sql server 2008, expression studio...all free. cos im a uni student

  • Not true you only get a discount tryed it

  • Good work, i am gonna use this tutorial

  • here is the error it gave me

    LINK : fatal error LNK1104: cannot open file 'winmm.lib'

  • add -lwinmm

    that should fix it

  • never mind this is jus to compicating, do anyone knw of a compiler that already comes with the opengl settings? doesnt have to be free.

  • Code::Blocks And BloodShed dev- c++

  • Maybe some people don't have enough $ to buy Visual Studio ;) I prefer MiniGW.

  • its free =)

  • Free != Bad.

  • haha, like the way u put that ;)

  • LOL!!!

  • it gives me compiler error every time i try to compile a OpenGL thng. it sucks

  • What compiler error do you get? You may want to see my other video on how to get OpenGL set up on Windows.

  • Thanx mittrekkie! I have written my first 3-d program! Now I can finally take steps to flesh out my ASCII RPG!

  • Cool, good luck with that. :)

  • cool!

  • this doesnt work for me. cant i jus run this without installing microsoft platform sdk??