Comments (8)
Ok, should be fixed now. I moved the WINAPI macro inside (*)
as in the other GL loader definitions.
Curious though that I wasn't able to reproduce the stack corruption, neither in debug nor release mode (tested with MSVC).
PS: thanks for the bug report and investigation :)
from sokol.
Are you compiling for 32-bits x86 maybe? E.g. I'm seeing this in the MSVC docs:
All __stdcall functions must have prototypes. This calling convention is only available in compilers that target x86, and is ignored by compilers that target other architectures.
...might explain why it didn't crash for me because I'm not testing 32-bit builds anymore (at least 32-bits x86, technically WASM is 32-bits).
Yes, I am compiling at 32-bits x86.
from sokol.
Ah ok makes sense. If you stumble over additional problem please open new tickets. I don't want to "officially" support 32-bit x86, but if it's only about minor things like this then there's no harm in fixing the issues :)
from sokol.
Looks like an oversight on my side, but interesting that it didn't show up during testing. What compiler are you using?
from sokol.
Looks like an oversight on my side, but interesting that it didn't show up during testing
I use Embarcadero's clang compiler.
But more than the type of compiler, it is the type of call that you have configured in your test projects, probably __stdcall since it is the same as WINAPI.
In my case I had __cdecl defined by default.
from sokol.
Are you compiling for 32-bits x86 maybe? E.g. I'm seeing this in the MSVC docs:
All __stdcall functions must have prototypes. This calling convention is only available in compilers that target x86, and is ignored by compilers that target other architectures.
...might explain why it didn't crash for me because I'm not testing 32-bit builds anymore (at least 32-bits x86, technically WASM is 32-bits).
from sokol.
Ah ok, that explains it at least. Is there a specific reason for using 32-bit builds though? E.g. in my last job we supported old Windows versions for much longer than even Microsoft did, and we dropped 32-bit support in 2017 and Windows XP support around 2020 or so :)
from sokol.
It is due to poor design on my part of my old libraries and the abusive use of ints.
I have never found the time to migrate them since I have not had any need to use elements that require 64 bits (except when accessing files, which I have resolved with a specific type).
In other cases for fast model loading, the format is a copy of the structures in memory with 32-bit pointers between them and a relocation table at the end.
from sokol.
Related Issues (20)
- [sokol_app] Alt-tabbing issues on windows in a FPS game on a multi-monitor setup HOT 2
- D3D11 storage buffers do not compile on wine HOT 1
- Seems .c file not generated in bindgen, producing errors HOT 2
- test
- Sokol Fetch Http response 200 is reported as an error HOT 7
- [sokol_gfx d3d11] update_image is wrong for 3d textures HOT 10
- Offscreen with alpha background. Is it possible? HOT 4
- [webgpu] Bindgroups cache breaks down with init/uninit pattern.
- macOS huge memory usage when window minimized HOT 1
- Questions regarding default GL version HOT 5
- App Window Size on Android HOT 3
- Default value _sg_gl_uniform_t::gl_loc when uniform_desc's name isn't given in sokol_gfx HOT 1
- sokol_gfx.h: wrong define in log related to SOKOL_TRACE_HOOKS HOT 1
- WebGPU TextureView validation error HOT 6
- sokol_fetch on Android
- partial updates to buffers/textures (e.g. offset and size args to glBufferSubData, glTexSubImage) HOT 1
- Right shift is recognized as "invalid key" on Windows. HOT 9
- SAPP_EVENT_CHAR for Space is fired when Ctrl+Space is pressed. HOT 2
- Key events on Linux always use the **first** keyboard layout in the system's keyboard layout list. HOT 1
- Continuous Bind Slots Restriction Unnecessary? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sokol.