Click here to Skip to main content
15,897,226 members

Comments by sorauts (Top 5 by date)

sorauts 22-Nov-22 4:26am View    
All I need to know is the position on the plane, no collision or 'up' direction necessary
sorauts 20-Nov-22 20:51pm View    
Given an orthographic projection rotated to (1/sqrt(3), pi/4, 0) to make it isometric, the rotation can be used to directly calculate the screen point's corresponding world point, I'm just not sure what that calculation is.
sorauts 12-Sep-22 21:47pm View    
I did come to a conclusion and answer the question but it's hidden for moderation. Essentially, it seems that my method works fine for 24-bit bitmaps, but fails for 32-bit ones. I need that transparency, so the only option is using PNG. LoadImage and LoadBitmap don't support PNG, so I'm using FindResource with L"PNG" and PNG in the .rc. None of this is explained anywhere on the internet so it was all trial, error and assumptions. At least I've found a method that works now.
sorauts 12-Sep-22 19:08pm View    
That's not working. I had to insert pwPngDataBytes as the 2nd parameter to stbi_load_from_memory. While it's successfully locating the resource and SizeofResource seems to be right (returns 4232 when filesize is actually 4246), it's returning the width, height and bpp as -1163005939, and the image is completely black. With a 24-bit bitmap, it works fine. But I need 32-bit bitmaps, and stbi_failure_reason() returns "bad offset".
sorauts 21-Jun-22 11:20am View    
Thank you - just needed an #include <algorithm> and it's working great