LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2014, 04:12 PM   #1
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Need SDL2 tutorial and how to I scale textures ?


I'm looking to port an SDL 1.2 program to SDL2, but the API has changed tremendously and is very confusing to me. Any good tutorials yet ? If not I guess I'll wait until then to port it. A C tutorial would be best, but C++ works too.

How do I scale textures nicely (with aliasing) because SDL_gfx rotozoom only works on surfaces ? This is annoying. There seems to be some linear scaling part of SDL2, but who wants that ?

Thanks. I can post the program I am trying to port, it's not very long.
 
Old 05-04-2014, 08:57 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Original Poster
Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Alright, I found a decent tutorial, so I will mark this solved.
http://lazyfoo.net/tutorials/SDL/

I was confused about the new rendering system, but I didn't realize that I don't have to use it. Fixed it up in 10 minutes after looking over the tutorial. Mostly just search and replace stuff.

EDIT:
Here's something weird tho. While messing with the rendering system I was able to cause Xorg to hang with 'EQ overflow' or something like that. Oh well.

Last edited by metaschima; 05-04-2014 at 08:59 PM.
 
Old 05-10-2014, 11:25 AM   #3
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Original Poster
Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
In case someone is looking for migration guides:
https://wiki.libsdl.org/MigrationGuide
http://www.alexdantas.net/notes/moving-to-sdl-2.html
http://forums.tigsource.com/index.php?topic=36909.0

As a note, SDL2 no longer updates the window when it is exposed, you have to do this yourself by checking 'SDL_WINDOWEVENT_EXPOSED'. This took me a while to figure out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SDL2 Released dugan Linux - News 1 08-13-2013 02:49 PM
LXer: SCALE 10X to host SCALE Kids Conference LXer Syndicated Linux News 0 10-18-2011 08:10 PM
LXer: SCALE ready for launch – Pre-registration for SCALE spikes, WIOS/OSSIE and more LXer Syndicated Linux News 0 02-19-2010 03:00 PM
LXer: SCALE 8x Update: Jobs@SCALE (not Steve), T-shirts, SCALE Uni and UpSCALE talks LXer Syndicated Linux News 0 02-13-2010 01:10 PM
LXer: SCALE University Returns for SCALE 8X LXer Syndicated Linux News 0 12-01-2009 02:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:11 AM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions