Gpu, old hardware, 3D acceleration and lib

I am writing a 2d lib that will have 3D acceleration, but I would like to do it so that it works efficiently on an older HW. It might be that typedefs is hiding options / features that your target mode does not support. (emulation function can also be enabled)

What are some of the things that are aging HW? here is a list of questions and things I know.

  • Tiles, this will be unsupported. Its old, my lib will support pixel access.
  • Single scrollable pixel buffer. GBA example
  • multiple surface with surface for surface quick wetting (no stretching)
  • multiple surface with stretched surface acceleration surface (maybe this was emulated? do you have any stretching HW images?)
  • HW pixel fill (I thought I saw an option in DX)
  • HW transparent color? (the color which is transparent thought I saw in the DX specs)
  • Textures older use to be power 2. Should the width not be equal to power 2 in height? (example 64x256), either one requires them to be the same
  • Textures, new HWs can have any width and height (or is it a lie?)
  • Textures can be in crazy formats (ARGB 8888, ABGR 8888, ABGR 2 10 10 10).

Also, I can't make a texture for the blit texture? like in 60x40 copy from texture A to B in HW? Also can textures be in the palette? (I will not support this) and finally I have to remember about shaders 8)

What else am I missing?

+1


source to share


1 answer


What kind of 3D appeal do you mean? If it's OpenGL compatible hardware:

  • Textures must have a strength of 2, width and height can be arbitrary strength of two.
  • The no-power textures of the 2 limits are enabled using an openGL extension you can check for (and is present on almost all new hardware).
  • Several different Texture formats are standardized in OpenGL, I don't know the extensions have arbitrary texture formats.

About 2D:



  • Regular 2D hardware acceleration supports beating but not stretching. Stretching is available as "video acceleration". For example, in X11 you can use the xv extension to speed up stretching, but only in the YUV color space.
  • For very fast image drawing operations check out Imlib2. It does everything in software, but incredibly fast. Perhaps the right way to go if 3D hardware acceleration is not available. 2D hw acceleration is notable for its performance, and for example X11 RENDER acceleration is often beaten by Imlib2. http://docs.enlightenment.org/api/imlib2/html/

An interesting project for you might be DirectFB, which tries to make heavy use of HW 2D acceleration: http://www.directfb.org/ p>

+2


source







All Articles