CppCon 2018: Guy Davidson “Lightweight 2D graphics with io2d”

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


In this presentation you will learn how to use the io2d 2D graphics library, which is soon to be available on vcpkg for Windows, OS X, iOS and Linux. The implementation contains several examples, including an Asteroids clone. We'll demonstrate the examples and their code in depth, show you how to write your own renderer, talk about the opportunities for casual graphics and teaching, and suggest some future directions.

Guy Davidson, Creative Assembly
Principal Coding Manager

Principal Coding Manager of Creative Assembly, makers of the Total War franchise, Alien:Isolation and the upcoming Halo Wars sequel, Guy has been writing games since the early 1980s. He is also a voting member of the ISO C++ committee, and a contributor to SG14, the study group devoted to low latency, real time requirements, and performance/efficiency especially for Games, Financial/Banking, and Simulations. He speaks at schools, colleges and universities about programming and likes to help good programmers become better programmers.


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

I'm getting some xkcd 927 vibes and that's not exactly a good sign.
It seems an interesting library in its own right, but I don't see any reason to completely standardize it and force it into the std. "Graphics" are not a "basic thing" like simple containers or a threading or sockets library.
Where do you draw the line (heh) of what operations and features to standardize and what not? Did you standardize keyboard input as well? What about audio? Are you planning on standardizing those as well? If not, then honestly what's the point, as people will have to write system dependent code or import another graphics/media library anyway? If you do want to standardize those aspects, then why exactly is your library so much better than the rest that it deserves to be put into the standard? Remember that "easy to use" is very subjective.

Lttlemoi
Автор

I can certainly see there being some utility in having a 'quick & easy' graphics API standardised, but I feel pretty strongly that the things it relies on (all the maths for example) need to come first.

Part of me also feels we should have a 'standard extensions' library for this sort of thing that's not designed to be super performant and would often have to be swapped out for something more hardcore. Basic input and audio might belong there too.
I want everything in std:: to be a good option in all cases. stdx:: would service the 80%.

MSheepdog
Автор

Despite the critics, as a beginner I find this very helpful. Especially comming from environments where all those things are already inside the language. This would make a great base for UI and Graphs. Also this talk was very entertaining. Sadly with next to no knowledge of other graphics APIs, it was hard to follow the code.

OperationDarkside
Автор

I think he meant SFML rather than SMFL.

aaardvaaark
Автор

For those who need serious graphics this is trivial, for those who need toy graphics this has too little built in. Every windowing system already has something as good or better.
"My novice friend is afraid of non-standard libraries" isn't an argument. Using appropriate libraries is a part of the programmer's skill set.

Автор

This proposal seems really interesting for embedded devices as is could be used as an abstraction layer to build widget toolkits for software that must be run without an operating system. They would just need a basic library and even if the standard library is not usually completely supported in them (for example dynamic memory management), it is more reliable to use it than third party libraries on those devices as each microcontroller family has a different ISA and IO hugely depends on the model used

dhombios
Автор

The cat demo doing < 30 fps is just sad.

dragdu
Автор

I don't know... I think Vulkan is powerful enough.

PixelPulse
Автор

VCpkg is the answer. Not this. linux+others need to get their package act together

mrlithium