chore: Add MIT License and fix Windows platform support
- Add MIT License file for open source release - Update README.md to reference LICENSE file - Fix test_bgfx_triangle.cpp: Add Windows platform support (_WIN32) - Fix test_bgfx_sprites.cpp: Add Windows platform support (_WIN32) These visual tests now support both Windows (wmi.info.win.window) and Linux (wmi.info.x11.window) platforms. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b39854cf2c
commit
5d9cd3ad30
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 StillHammer
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@ -189,7 +189,7 @@ Complex behavior emerges from the interaction of simple, well-defined modules.
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
To be defined
|
MIT License - see [LICENSE](LICENSE) file for details
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@ -62,8 +62,15 @@ int main(int argc, char* argv[]) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* nativeWindowHandle = (void*)(uintptr_t)wmi.info.x11.window;
|
void* nativeWindowHandle;
|
||||||
void* nativeDisplayHandle = wmi.info.x11.display;
|
void* nativeDisplayHandle;
|
||||||
|
#ifdef _WIN32
|
||||||
|
nativeWindowHandle = wmi.info.win.window;
|
||||||
|
nativeDisplayHandle = nullptr;
|
||||||
|
#else
|
||||||
|
nativeWindowHandle = (void*)(uintptr_t)wmi.info.x11.window;
|
||||||
|
nativeDisplayHandle = wmi.info.x11.display;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::cout << "Window created: " << width << "x" << height << "\n";
|
std::cout << "Window created: " << width << "x" << height << "\n";
|
||||||
|
|
||||||
|
|||||||
@ -174,8 +174,13 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
// Setup bgfx platform data
|
// Setup bgfx platform data
|
||||||
bgfx::PlatformData pd;
|
bgfx::PlatformData pd;
|
||||||
|
#ifdef _WIN32
|
||||||
|
pd.ndt = nullptr;
|
||||||
|
pd.nwh = wmi.info.win.window;
|
||||||
|
#else
|
||||||
pd.ndt = wmi.info.x11.display;
|
pd.ndt = wmi.info.x11.display;
|
||||||
pd.nwh = (void*)(uintptr_t)wmi.info.x11.window;
|
pd.nwh = (void*)(uintptr_t)wmi.info.x11.window;
|
||||||
|
#endif
|
||||||
pd.context = nullptr;
|
pd.context = nullptr;
|
||||||
pd.backBuffer = nullptr;
|
pd.backBuffer = nullptr;
|
||||||
pd.backBufferDS = nullptr;
|
pd.backBufferDS = nullptr;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user