35 Commits

Author SHA1 Message Date
Vraiment
d4429244ff Addressed comments in pull request #99 2017-07-11 23:17:56 -07:00
Vraiment
6a3245cf63 Added Color support for Texture 2017-07-11 23:17:55 -07:00
Vraiment
49251c31a8 Addressed comments in pull request #99 2017-07-05 11:02:34 -07:00
Vraiment
daab479c0f Added Color support for Texture 2017-07-05 11:02:34 -07:00
Dmitry Marakasov
970cd74dd9 Merge branch 'master' of github.com:libSDL2pp/libSDL2pp 2017-02-20 16:32:54 +03:00
Dmitry Marakasov
89ea96d008 Mark most single argument constructors explicit
Fixes #91
2017-02-14 14:14:26 +03:00
Dmitry Marakasov
24482d85f6 Follow SDL2 include path conventions
Though these are broken and error prone, as they ignore the possibility
of conflicts between SDL, SDL2 and wrappers thereof discarding useful
include path prefix (SDL2/), since SDL and satellite libraries follow
these it's too hard to stay away.

So don't use prefixes for SDL include paths any longer.
2017-02-08 13:19:04 +03:00
Dmitry Marakasov
83c261cf03 Add Texture::Update() overload which takes Surface&& 2016-11-08 17:59:24 +03:00
Vladimir Gamalian
959d89dce7 Fix missed std::min 2015-09-22 14:17:34 +07:00
Dmitry Marakasov
4e12008bcf Implement Texture::Update() which takes pixel data from Surface 2015-08-27 19:11:08 +03:00
Dmitry Marakasov
689f57b864 Exception rework
Now it explicitely stores name of SDL function which caused an error
and generates complete user-readable error message which contains both
function name and SDL error message. Users can now handle SDL2pp
exceptions along with all others in `catch (std::exception&)' and
get complete error info.

While here, fixed incorrect function names in some throw's
2015-01-19 01:41:37 +03:00
Dmitry Marakasov
7f174505eb Cosmetic fix 2015-01-19 00:59:20 +03:00
Dmitry Marakasov
7e1625a488 Make setters return reference to self: Texture 2015-01-18 03:31:49 +03:00
Dmitry Marakasov
be15f8c1d6 Implement Texture::UpdateYUV() 2015-01-15 17:13:00 +03:00
Dmitry Marakasov
04244eadf0 Implement some Texture getters 2015-01-15 16:26:38 +03:00
Dmitry Marakasov
9e53670b2e Implement Width/Height/Size getters for Texture and Surface 2014-12-29 21:37:44 +03:00
Dmitry Marakasov
25bbd97b3e Add constructors from existing SDL2 objects 2014-12-28 06:06:22 +03:00
Dmitry Marakasov
0557464b56 Merge branch 'surface'
Conflicts:
	CMakeLists.txt
2014-12-28 04:29:07 +03:00
Dmitry Marakasov
fff166becd Allow to create Texture from Surface 2014-12-27 21:45:53 +03:00
Dmitry Marakasov
ad1e6879df Check for errors after calling SDL_image functions
Fixes #20
2014-12-27 05:17:01 +03:00
Dmitry Marakasov
64952aea9a Use stock function instead of reimplementing with RWops 2014-12-27 02:28:42 +03:00
Dmitry Marakasov
6d0213810b Switch to Optional
Remove "valid" flag from Rect and Point, derive them directly from
SDL_Rect and SDL_Point structures, simplify logic. Now x/y/w/h member
variables are directly accessible and Rect/Point may be passed as
SDL_Rect/SDL_Point via pointer or reference.

Change all cases where Null Rects and Points were used to Optional.

invalid state related functions like Null(), IsNull() and Get() are
now deprecated but are not removed yet for compatibility sake.
2014-12-25 19:10:41 +03:00
Dmitry Marakasov
3dd739d4a3 Provide default argument for Texture::Lock() 2014-12-19 19:26:53 +03:00
Dmitry Marakasov
46591a9cbf Update project comment 2014-12-18 02:52:08 +03:00
Dmitry Marakasov
0124e2703a Update copyright years 2014-12-18 02:51:49 +03:00
Dmitry Marakasov
93a77542d8 Fix move assignments
- Add self-assignment checks
- Free resources of object which is going to be replaced to avoid
  resource leaks
2014-11-30 01:22:22 +03:00
Dmitry Marakasov
a97d100372 Implement texture property getters 2014-11-25 23:41:54 +03:00
Dmitry Marakasov
f5fa211cfe Implement texture locking 2014-11-24 19:27:56 +03:00
Dmitry Marakasov
2b84c17ce2 Allow to load texture fro file or via RWops 2014-09-05 05:03:12 +04:00
Dmitry Marakasov
c3702a1eb8 Add explicit check for nullptr before destroying SDL objects
This is not really needed as SDL has these checks internally,
but this way it's still safer and more apparent that moved-from
objects are handled properly.
2014-02-01 03:36:48 +04:00
Dmitry Marakasov
411c62a3cc Implement c++11 move for renderers, textures and windows 2014-02-01 00:18:15 +04:00
Dmitry Marakasov
c6d945120e Use std::swap 2013-12-18 16:21:55 +04:00
Dmitry Marakasov
96576e112d Add method to set color component multipliers 2013-12-18 06:16:10 +04:00
Dmitry Marakasov
92925a9620 Add a way to swap some types of objects 2013-12-18 06:15:46 +04:00
Dmitry Marakasov
c122f11643 Initial import 2013-09-06 01:47:05 +04:00