How to draw image/graphic form memory buffer?
Posted: Mon Dec 03, 2018 12:00 pm
Hi everyone,
I'm into CEF (Chromium Embedded Framework) and using offscreen rendering.
I remember SDL2 has function draw image from memory buffer, but I couldn't find that in Love2D.
Please help me!
For example:
I'm into CEF (Chromium Embedded Framework) and using offscreen rendering.
I remember SDL2 has function draw image from memory buffer, but I couldn't find that in Love2D.
Please help me!
For example:
Code: Select all
img = LoadImage('abc.png')
buffer = img:toBitmap()
love.drawImage(buffer, img.width, img.height) --
...
Code: Select all
const void *buffer = ...;
DrawImage(buffer, width, height);