SDL 2.0

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

SDL 2.0

Post by short »

So I saw this link, and wanted to make sure everyone else here saw it.

http://www.phoronix.com/scan.php?page=n ... px=MTE0MDU

It seems that it will have valve's backing, so hopefully more updates. I looked on SDL's official website but didn't find anything, anyone else see anything?
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
User avatar
lalacomun
VS Setup Wizard
VS Setup Wizard
Posts: 114
Joined: Wed Dec 28, 2011 10:18 pm
Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
Programming Language of Choice: C++
Location: Argentina
Contact:

Re: SDL 2.0

Post by lalacomun »

nop, nothing, but SDL 2.0 seems great, finnally 2D Hardware accelerated graphics without using OpenGL :mrgreen:
Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: SDL 2.0

Post by Light-Dark »

- Hardware-accelerated 2D graphics.
Well I'm hyped.
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
TheBuzzSaw
Chaos Rift Junior
Chaos Rift Junior
Posts: 310
Joined: Wed Dec 02, 2009 3:55 pm
Current Project: Paroxysm
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: SDL 2.0

Post by TheBuzzSaw »

I'm glad SDL is moving forward, but I'm tired of C frameworks. I'm investigating SFML to see if I like the API.
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

Re: SDL 2.0

Post by short »

TheBuzzSaw wrote:I'm glad SDL is moving forward, but I'm tired of C frameworks. I'm investigating SFML to see if I like the API.
Personally I'm not a huge fan of the camelCase, but I guess it does help intellisense with visual studio
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SDL 2.0

Post by dandymcgee »

TheBuzzSaw wrote:I'm glad SDL is moving forward, but I'm tired of C frameworks. I'm investigating SFML to see if I like the API.
I've recently started playing around with SFML 2.0 a bit and I have to say it's quite a nice library. Unlike SDL, it's not separated into a bunch of different packages you have to download but rather supports everything you need right from the start. The API seems very reasonable and respectable, and to be honest the SFML codebase is extraordinarily well organized and commented. I like being able to look under the hood every now and then when I'm not sure exactly how something works. I read through SFML's networking code and it's pretty straightforward BSD socket stuff. You could easily modify and recompile the SFML library if you ever needed to.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: SDL 2.0

Post by eatcomics »

dandymcgee wrote:
TheBuzzSaw wrote:I'm glad SDL is moving forward, but I'm tired of C frameworks. I'm investigating SFML to see if I like the API.
I've recently started playing around with SFML 2.0 a bit and I have to say it's quite a nice library. Unlike SDL, it's not separated into a bunch of different packages you have to download but rather supports everything you need right from the start. The API seems very reasonable and respectable, and to be honest the SFML codebase is extraordinarily well organized and commented. I like being able to look under the hood every now and then when I'm not sure exactly how something works. I read through SFML's networking code and it's pretty straightforward BSD socket stuff. You could easily modify and recompile the SFML library if you ever needed to.
Damn it, I keep hearing these same things about SFML but I'm so stubborn I haven't taken the time to try and switch from SDL to SFML.
Image
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
Posts: 303
Joined: Sun Nov 21, 2010 10:56 am
Current Project: Engine
Favorite Gaming Platforms: N64
Programming Language of Choice: C++, PHP
Location: Norway

Re: SDL 2.0

Post by superLED »

eatcomics wrote: Damn it, I keep hearing these same things about SFML but I'm so stubborn I haven't taken the time to try and switch from SDL to SFML.
I would rather start using OpenGL with SDL (if you already are steady with it). Using OpenGL to render stuff. Then you could keep all your code for music, threads, input, networking and such, and just learn how to render with a new API.
Would take some time to do all that over again, if you already have made a framework/engine for your games.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SDL 2.0

Post by dandymcgee »

superLED wrote:
eatcomics wrote: Damn it, I keep hearing these same things about SFML but I'm so stubborn I haven't taken the time to try and switch from SDL to SFML.
I would rather start using OpenGL with SDL (if you already are steady with it). Using OpenGL to render stuff. Then you could keep all your code for music, threads, input, networking and such, and just learn how to render with a new API.
Would take some time to do all that over again, if you already have made a framework/engine for your games.
That makes no sense. The rendering is the only part that wouldn't change when you switched to SFML, assuming you were already using OpenGL.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
Posts: 303
Joined: Sun Nov 21, 2010 10:56 am
Current Project: Engine
Favorite Gaming Platforms: N64
Programming Language of Choice: C++, PHP
Location: Norway

Re: SDL 2.0

Post by superLED »

dandymcgee wrote:
superLED wrote:
eatcomics wrote: Damn it, I keep hearing these same things about SFML but I'm so stubborn I haven't taken the time to try and switch from SDL to SFML.
I would rather start using OpenGL with SDL (if you already are steady with it). Using OpenGL to render stuff. Then you could keep all your code for music, threads, input, networking and such, and just learn how to render with a new API.
Would take some time to do all that over again, if you already have made a framework/engine for your games.
That makes no sense. The rendering is the only part that wouldn't change when you switched to SFML, assuming you were already using OpenGL.
If you are going from 'pure' SDL to using OpenGL to render stuff, then you would only re-write the rendering-part of your engine/framework.
If you are going from 'pure' SDL to 'pure' SFML, then you would re-write all of your engine/framework.

Or am I totally lost?

(By 'pure' I mean using only SDL/SFML to do the rendering, music, input and all the other stuff)
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SDL 2.0

Post by dandymcgee »

superLED wrote:(By 'pure' I mean using only SDL/SFML to do the rendering, music, input and all the other stuff)
SFML uses OpenGL to render. It does not have a software rendering mode like SDL. The API simply wraps OpenGL as far as I can tell.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
CC Ricers
Chaos Rift Regular
Chaos Rift Regular
Posts: 120
Joined: Sat Jan 24, 2009 1:36 am
Location: Chicago, IL

Re: SDL 2.0

Post by CC Ricers »

superLED wrote:
eatcomics wrote: Damn it, I keep hearing these same things about SFML but I'm so stubborn I haven't taken the time to try and switch from SDL to SFML.
I would rather start using OpenGL with SDL (if you already are steady with it). Using OpenGL to render stuff. Then you could keep all your code for music, threads, input, networking and such, and just learn how to render with a new API.
Would take some time to do all that over again, if you already have made a framework/engine for your games.
Yep, this is how I started using it once I felt I was ready for "expert mode" for the graphics. Kept everything simple because I hate writing my own input libraries.

I have never used SFML before, has it always been a hardware accelerated OpenGL wrapper? I would also assume it would take advantage of features like alpha blending, 2D matrix rotation, shearing, etc.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: SDL 2.0

Post by dandymcgee »

CC Ricers wrote:I would also assume it would take advantage of features like alpha blending, 2D matrix rotation, shearing, etc.
I'm not sure that it does. Looking at the source for SFML 1.6, the Sprite class seems to be doing very simple immediate mode rendering of a textured quad.
If you want anything more they make it extremely easy to use your own OpenGL code for rendering, but the provided wrappers are fairly typical OpenGL calls.
This is better than SDL in that although both allow you to write your own rendering code, if you don't wish to do so SFML provides some for you behind the scenes,
whereas SDL uses software rendering. In either case, it is possible to get much better performance by providing your own rendering methods. These libraries
are not even remotely as sophisticated or optimized as something like the STL.

The SFML source code is very easy to read, I recommend you download it and judge for yourself.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
lalacomun
VS Setup Wizard
VS Setup Wizard
Posts: 114
Joined: Wed Dec 28, 2011 10:18 pm
Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
Programming Language of Choice: C++
Location: Argentina
Contact:

Re: SDL 2.0

Post by lalacomun »

SFML is nice, but i still prefere SDL & OpenGL, and yes SFML is preaty much a wrapper from OpenGL look at the basic shapes rendering its almost the same thing as OpenGL, a little bit easier on SFML ;) but i recommend SFML A LOT!
Image
Post Reply