treeform / fidget

Figma based UI library for nim, with HTML and OpenGL backends.
MIT License
763 stars 32 forks source link

Not able to draw in memory image #164

Open louisyulu opened 2 years ago

louisyulu commented 2 years ago

I am trying to draw an image generated in memory(no file exist for it), but the drawImage in opengl/context.nim always depends on an external image file(calling getOrLoadImageRect), that prevents me doing a quite important use case of display data in matrix form. I looked into tests/imagestatic and imagegen, they depend on flippy lib, cannot be compiled.

treeform commented 2 years ago

If you want to just draw an Image in memory without openGL you should use (pixie)[https://github.com/treeform/pixie] it even has context api that is very similar to the way its done Browsers or Cairo.