SDL2/C++ Tutorial. Setting Up SDL & Creating Your First Window

preview_player
Показать описание
For Windows Setup see my other video

This video shows you how to download and set up SDL2 on OS X using Xcode. I Then continue to show you how to create your first window in C++.

If you have any questions/comments please leave them below and I will do my best to get back to you.
Рекомендации по теме
Комментарии
Автор

I am a couple of weeks into working on my own game, mostly as a learning experience. I SO wish I had stumbled upon this series earlier. Sincerely- thank you! Just finished your first one, and will jump into the others to see what I can do differently. With any luck my methods up till now will match your recommendations. Again, thanks!

crane
Автор

For anyone that's having the program build and run successfully but no window coming up, here's the solution.
After setting the draw color, have the following:
SDL_Event event;
SDL_PollEvent(&event);

You should see the window pop up.

PMilly
Автор

Error: SDL.h - file not found
Fix: Try adding SDL.h file to project along with framework. This will do the job.

Also thanks man for this amazing series. Looking forward to learn the cool and dirty stuff. Love from India.

srid
Автор

Please update this video for Xcode 11. The include stuff isnt working. For me it works only with absolute path:
#include

voidfalse
Автор

@let's make games, I have read. through the other comments thoroughly, but am still getting the "SDL2/SDL.h file not found" error. I have uploaded the framework to the workspace as shown in the video, and cannot figure out what's wrong. Can you help me fix this?

UnofficialTaylors
Автор

can you please explain why there are so many warnings after you build the program? Is it ok to just let them be or is it an issue that needs to be fixed? Thanks a lot for your answer.

sasarepkova
Автор

because my window can not be dragged, minimized, or closed giving the x, the latter if you can but with the x of the console that opens with the program.

Laibuton
Автор

I run and i did not get the red background like u. it just gets 2020-03-19 22:23:46.381466+0700 TRY SDL[1182:54380] Metal API Validation Enabled

Program ended with exit code: 0

huyennur
Автор

For some reason my red window renders *behind* the Xcode window, took me a while to figure that out!

harrywright
Автор

Can you post what I've studied in this video on my blog? I will use it for personal study. I will write a post saying that I studied this video.

이범호-lq
Автор

I' don't see the string 'Title' defined in SDL_CreateWindow("Title"..) appear in the Windows Box

dotslash
Автор

I don't know. I tried everything. I can't get this shit working. Every time, i've the error with 'SDL2/SDL.h not found'. I can't get it, i don't know why Xcode doesn't want to work like he did for you.

IuzTv
Автор

I keep on get an error on the “title” part of SDL window

InfoCryptid
Автор

Are you the brother of Hydra the priest from world of warcraft?

pazlord
Автор

Did you do the installation point of view from a windows computer too?

yamm_gx
Автор

If you are not seeing the window like I was check add this code instead of the delay function:

Andrei_Calazans
Автор

flower your step. but can't find #include <SDL2/SDL.h>

moonwinghuang
Автор

It keeps telling me "SDL2/SDl.h not found" Please help.

wyatttownsend
Автор

Bro serious question you think you can do an assignment for me? I’m willing to pay

generalk
Автор

you forgot the SDL_Quit(); at the end.

logangraham
visit shbcf.ru