Advanced C++/Graphics Tutorial 1: Installing GLEW (Windows)

preview_player
Показать описание


You should not need glew on mac OS, but I don't have mac so I cant show you any specific tutorials on it :/

In the next tutorial we will open our first window!

Рекомендации по теме
Комментарии
Автор

Only tutorial that actually explains the steps as you go. Thanks!

jonathanrosado
Автор

I love you ben!!! I've been struggling with this for so long (I am a beginner) and this video and the previous one solved all my problems, really thanks!!!

Popexssj
Автор

+Bitan Mandal it is very simple to install it on codeblocks. It's just like the SDL tutorial but easier. All you have to do is drop the include and lib folders in the deps/include and deps/lib, then you just add the libraries opengl32 and glew32 to the linker like we did with libSDL2 and libSDL2main, then finally you copy the .dll file to the same directory as your .exe

makinggameswithben
Автор

+Albert Fornells no you do not need to use glu32.lib. glu just contains a bunch of primitive rendering facilities that are outdated and unneeded.

makinggameswithben
Автор

for the *code::blocks people* who are using the *updated glew*. much like the SDL tutorial you can *right click* your project and *click build options...* next click the *search directories tab* click *add* and add your *include* directory. do the same to your library under the *linker* sub tab. now goto the *Linker settings* tab and add *glew32s* (the static library) and make sure it's the first linked library. you can click on it to *highlight it* then use the arrows to the right to move it around then add *opengl32* and *glew32* now you can press OK. now when you create a class that uses functions like glGenuffers, glbindbuffer, glbufferdata..etc (like in tutorial 6) you have to *add* "#define GLEW_STATIC" before including glew.h in your header file. like this comment if it work for you so others can see it. please comment if you found a better fix.

SukottoSama
Автор

I am trying to get into C++ thanks alot!

nicholaswingate
Автор

"I have a lot of stuff open as you can see" Made me laugh so hard XD

HugoIetsGaming
Автор

You do not need to include windows.h as SDL is cross platform and handles all of that sort of stuff for you. Adding that will make your code less compatible to other platforms in fact, so you don't want to add that in. SDL has functions to handle anything you will need, and it will figure out what is needed for the platform you are on.

NeilRoy
Автор

+Return True what operating system are you on? If you are having to rename libraries then something is definitely wrong.

makinggameswithben
Автор

MakingGamesWithBen It will be helpful for me if you explain little bit more about why we include opengl32.lib at linker input though it was not in directory and from where we get file named opengl32.lib .

rubel
Автор

Just curious. Why do (seemingly) all of the tutorials on YouTube use GLEW or another library to work with OpenGL with SDL instead of the OpenGL management functions in SDL2? Just curious. No hate.

trevorwilliams
Автор

Bitan Mandal
I think when he has to do a tutorial on codeblocks each time. it would take ages before he actually makes progress.
You could find a tutorial online or just get Visual Studio?

officialtsquad
Автор

I know this is old but gotta make sure the lib files actually work before being too happy

puppergump
Автор

You mention Mac more often than Linux. And now I don't understand what to do on Linux. Hm...

AdriansNetlis
Автор

I'm making a game in c++ and I'm using an array. It's a text based game and I can't get SDL2 to render the text

Xan
Автор

Hello.

I've recently gotten into SDL and C++. I was mostly using Unity and C# before, but I feel like that is not a serious enough tool that would actually teach me and prepare me for the industry (my main goal). So, some of the questions that follow might seem a bit noob-ish, so I apologize in advance. I was wondering, what are the differences between using SDL's "SDL_opengl" header and GLUT, GLU, GLEW and similar libraries? Are they essentially the same thing and I would work just as fine with those, because I've been reading a documentation on SDL's site and it seems like it suggest using SDL_OpenGL + using GLU32 library? I am really confused about so a quick explanation would be really appreciated.

Anyways, thanks for the awesome tutorials. Cheers!

mrsecify
Автор

link in description is offline here's what it said

"This sourceforge.net website is temporarily offline.
We are working hard to restore its availability. Please refer to the SourceForge.net Blog for updates."

What do I do now? Just wait?

oopsy
Автор

Hi Ben, Love the videos btw! after the basic C++ I've been looking forward to getting to the graphics!
I'm using codeblocks, and getting the compier errors below:
ld.exe||cannot find -lglew.lib|
ld.exe||cannot find -lglew.lib|
I've done everything like this video and tried to add the headers/libraries etc similarly to your 'how to install SDL with codeblocks' video.
I wonder if there's something different about codeblocks again? Any suggestions?
Thanks!

Peds
Автор

+GameDevCat try manually setting the context version with
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);

makinggameswithben
Автор

Thanks for the good tutorials, just a questions (not any errors) in the linker we added opengl32.lib where is the project getting that file, wont we need to bundle it with the project?

jim_o