graphics icon indicating copy to clipboard operation
graphics copied to clipboard

Is there a way to draw graphics to ImageBuffers or Textures?

Open radix opened this issue 8 years ago • 6 comments

I haven't been able to find any obvious way to use graphics calls with ImageBuffers, but I may be missing some way to do it -- is it possible at all now?

If it's not, would it be a good idea to have an implementation of Graphics for ImageBuffer?

radix avatar Dec 13 '16 06:12 radix

I've started working a software rasterizer that implements Graphics. Not sure about the design yet. Some issues:

  • Need a color buffer (rgba) and stencil buffer (u8)
  • Need to wrap image buffers in a new type that implements ImageSize

bvssvni avatar Dec 13 '16 21:12 bvssvni

Should we do it with software? This is commonly achieved by a separate framebuffer; afaik gfx supports it from years ago.

ishitatsuyuki avatar Feb 22 '17 13:02 ishitatsuyuki

I'd love to use this in an http server. Is that possible at the moment?

lilith avatar Aug 03 '17 20:08 lilith

I believe it's possible, but it depends on the graphics backend.

bvssvni avatar Aug 04 '17 21:08 bvssvni

Sorry for bringing this one up again, is there a relatively simple way to draw graphics (like a line) to a texture which later gets drawn to the window (eg. via draw_2d)?

ivansandrk avatar Oct 21 '18 20:10 ivansandrk

@ivansandrk I think you need to configure OpenGL to use a texture for rendering.

bvssvni avatar Oct 21 '18 22:10 bvssvni