How to draw image/graphic form memory buffer?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Posts: 1
Joined: Mon Dec 03, 2018 11:45 am

How to draw image/graphic form memory buffer?

Post by wuuyi123 » 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:

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);

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests