SDL_Image Win10 WinRT UWP No VS2015 project in latest source |
MattRobinson
|
Greetings all,
I'm working on a side-scrolling, 2D classic style SHMUP, and even though it's early days and still a work in progress, I'm trying to keep the code clean and as cross platform as possible, hence the reason for using SDL2. It's currently being developed as a Win32 app on the PC and I'd like to try porting it at this early phase to a Win 10 WinRT UWP app, just to see how that goes. I've set up a project in VS2015 community as per the instructions on David Ludwig's SDL WinRT site (https://hg.libsdl.org/SDL/file/tip/docs/README-winrt.md) using the Win 10 VS2015 project and the example code in step 6A of the instructions, building a Win10 UWP app that goes full-screen with a green background. The next step is to import the game's Win32 source files into it but I've come across a problem in that I'm using SDL_Image to load PNG files but there doesn't seem to be a VS2015 UWP project for that even in the latest source https://hg.libsdl.org/SDL_image/file/4088a517f9a5/VisualC-WinRT. Can anyone confirm that there is just the WinRT80/81 and Win phone 80/81, VS 2013/5 files and not a Win10 UWP_VS2015 project for SDL_Image? Note: I only intend to build this game for PC's, because large screens and gamepad inputs are ideal for this game, (I think a touchscreen input would be unsuitable in the extreme, hence no mobile version), so technically I could just build a WinRT81 app instead. Thank you in advance, and for the great work you are doing with this library Matt |
|||||||||||
|
DLudwig
|
I can confirm that MSVC project files haven't been added for SDL_Image + UWP. I can see if I can find some time over the next couple of days to put some together, but I make no guarantees.
If you desperately need something in the meantime, I'd highly recommend taking a look at Sean Barrett's excellent, single-file stb_image library (available at https://github.com/nothings/stb), possibly in conjunction with Daniel Gibson's SDL+stb_image wrapper at https://github.com/DanielGibson/Snippets/blob/master/SDL_stbimage.h. The performance of the loader will probably be a bit slower, however the integration into a project should be pretty straight-forward: include each library's file into your app's project, then read the top of each lib's file for further instructions. Cheers, -- David L. |
|||||||||||
|
MattRobinson
|
Thank you for those links David. I was looking to ditch SDL_Image anyway as I only wanted to load in PNGs and needed a simple PNG loader function that I could drop right into my image loader classes. I did try LodePNG http://lodev.org/lodepng/ which did decode the PNG perfectly, but I had problems making a SDL texture out of the pixel data.
Best, Matt. |
|||||||||||
|
DLudwig
|
If it helps, the SDL_stbimage library (fixed link: https://github.com/DanielGibson/Snippets/blob/master/SDL_stbimage.h ) has functions to load images to SDL_Textures (STBIMG_LoadTexture, for example). Cheers, -- David L. |
|||||||||||||
|
SDL_Image Win10 WinRT UWP No VS2015 project in latest source |
Daniel Gibson
Guest
|
On 04/15/2016 12:08 AM, DLudwig wrote:
Thanks for linking my lib :-) Regarding the performance, I did some tests a while ago (stb_image vs libpng/libjpeg(turbo)) and for png decoding stb_image was between 0% and 40% slower than libpng (which is used by SDL_Image) - the performance difference was bigger with bigger images. It was faster than LodePNG in any case. For JPEG the performance was between libjpeg and libjpeg-turbo, so it might even be faster than SDL_Image there. More details: https://caedesnotes.wordpress.com/2015/03/23/comparing-performance-stb_image-vs-libjpeg-turbo-libpng-and-lodepng/ Cheers, Daniel _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|