[ Allegro5 + Win32 api ]
Silver Sthan

I just wonder how to render Allegro 5 in a winapi window ? If it's possible or not.

Edgar Reynaldo

Allegro 5 uses the win32 api behind the scenes. If you want to manipulate the window that allegro uses, use al_get_win_window_handle. If you're saying you want to create a win32 window and then make allegro use it, that is not supported.

Silver Sthan

Ok, Thanks for your reply ! ;)

Edgar Reynaldo

No problem. ;) What did you want to do with the window?

Rodolfo Lam

Well technically he could render to a memory bitmap then blit that to some sort of custom win32 control that understood the pixel format.

The performance of this process might be really bad though... Maybe not so at very small Allegro Display/Target Bitmap sizes.

Silver Sthan

I just want to make a little basic "resources" editor (example : modelsheet,sprites,map, etc) who can use allegro5 render.

But I have found the solution with SFML. The lib can integrate a view in winapi window directly.

Edgar Reynaldo

Why do you need to build your own win32 window? Most everything you could need to do to a window you could do with the handle allegro gives you.

Silver Sthan

Because I need the Gui to manipulate datas more easily.

I work on an editor who can ease me to create a file who contain tile/frame informations.

{"name":"1478352932-editor.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f6c8912cb4be3900d082185cd8ac19a2.png","w":1386,"h":897,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f6c8912cb4be3900d082185cd8ac19a2"}1478352932-editor.png

Thread #616573. Printed from Allegro.cc