views:

29

answers:

1

Hello. I'm trying to set base to a 2D game with destructible terrain and/or particle effects, scroll, zoom, characters, etc... I'd like to know if there is a graphics library that would support those things in both software and hardware acceleration .. (Need pixel access). I've tried SDL (even with directX backend), but it seems hardware does its job only in fullscreen. Anyway, waiting for suggestions. Thanks!

A: 

Use OpenGL. Perhaps via another library e.g. SDL. I do not know why you can't get windowed HW acceleration working, it might be a platform thing (but it's certainly a different question).

Set the projection matrix to orthographic and use one of the axis (typically z) to organise 'stacking' elements. With an appropriate transformation in the display subroutine, you can align the x/y coordinates with "traditional" drawing (i.e., top-left down, rather than bottom-left up).

Build your graphical elements into bitmaps, convert them into textures and draw them on top of OpenGL Rects.

jmtd