Yeah, it's definitely possible. You write an abstraction layer across the top. However, here's one firm piece of advice (unusual for me). Pick your renderer and stick with it - good looking games are targetting to their audience's platform. You could spend alot of time of time making the rendering work in both system only to find you've got the lowest common capabilities between them.
If your requirements are:
* Render a 2D games - sprite based
* At 800x600
Then either works for you. Work out a few more requirements like:
* Want some special effects
* Must work everywhere
* Must have a small download
* Its my first real game, I want someone to ask questions to
* I want to render thousands of sprites per frame
* I've never developed with OpenGL and I need to have this finished next week (short timescale requirement
You could determine what was right for you.