15,897,226 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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