Added color structures
This commit is contained in:
parent
712e238ca0
commit
305963fe7e
10 changed files with 213 additions and 23 deletions
|
@ -4,27 +4,25 @@ int main(int argc, char** argv)
|
|||
{
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
|
||||
sdlu::Vector2f vecA(.4f, -2.3f);
|
||||
sdlu::Vector2f vecB(-8.9f, 0.003f);
|
||||
sdlu::Vector2f vec = vecA + vecB;
|
||||
|
||||
std::cout << "Vector2f: " << vec.x << ", " << vec.y << std::endl;
|
||||
|
||||
vec *= 1.8f;
|
||||
std::cout << "Vector2f: " << vec.x << ", " << vec.y << std::endl;
|
||||
|
||||
MyWindow window(800, 800, "Test");
|
||||
SDL_SetWindowTitle(window.GetWindow(), "New Title");
|
||||
|
||||
SDL_Event event;
|
||||
while (window.WaitEvent(&event))
|
||||
while (window.IsOpen())
|
||||
{
|
||||
std::cout << event.type << std::endl;
|
||||
if (event.window.event == SDL_WINDOWEVENT_CLOSE)
|
||||
while (window.PollEvent(&event))
|
||||
{
|
||||
window.Close();
|
||||
break;
|
||||
switch (event.window.event)
|
||||
{
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
window.Close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
window.Clear(sdlu::Color::Magenta);
|
||||
|
||||
window.Display();
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue