Commit Graph

962 Commits

Author SHA1 Message Date
Branimir Karadžić
f3cab4d2d8 Detect nVidia Nsight debugger presence. 2025-10-23 10:06:24 -07:00
Mike
c733598edb Fix #3464 (#3465) 2025-09-26 00:43:04 +00:00
Branimir Karadžić
f268ce5c96 Update assert API to latest bx. 2025-08-23 09:21:18 -07:00
Matt Tytel
2b1c73f348 Fix only one frame rendered in mobile opengles with intermediate frame buffer (#3405) 2025-01-30 10:13:02 -08:00
Martijn Courteaux
abe193a407 Fix UniformBuffer UB regarding UniformType::Enum with extra bits. (#3398) 2025-01-28 09:58:22 -08:00
Бранимир Караџић
860bafb23f Happy New Year! 2025-01-13 15:45:40 -08:00
Бранимир Караџић
896c610b72 Removing alloca compat include. 2024-12-21 19:25:00 -08:00
Бранимир Караџић
042ebe8814 Cleanup. 2024-12-07 22:49:45 -08:00
Бранимир Караџић
69acf28813 Cleanup. 2024-11-21 07:34:58 -08:00
Martijn Courteaux
e488a07f1b Support both X11 and Wayland in the same build. (#3360)
* Support both X11 and Wayland in the same build.

 - Works for both Vulkan and OpenGL.
 - Remove --with-wayland from genie options.
 - Vulkan loads all three extensions for surface creation instead of only one.
 - Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create
   a SwapChain with the given window size.
 - Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then
   recreating to make sure the window is released of its swapchain.
 - Fix dbgText glitch in example-22-windows.
 - Remove old X11-related dependencies for GLFW3.

* Formatting.
2024-10-05 14:33:22 -07:00
Faaux
93961afcfd Use correct GLSL shader version if onyl gl_VertexID is used (#3315) 2024-06-23 08:59:37 -07:00
Бранимир Караџић
8778d4d1cf Cleanup. 2024-03-10 07:43:26 -07:00
Krimo
4d8f0f6713 Fix vertex attributes having incorrect state when restarting BGFX. (#3267) 2024-03-10 07:41:21 -07:00
Branimir Karadžić
98d88d9fc6 Fixed draw indirect. 2024-02-09 20:55:44 -08:00
Бранимир Караџић
6286da0eb5 GL: Recreate VAO on swap chain switch. Fixed issue #209. 2024-02-02 14:19:28 -08:00
Бранимир Караџић
83dfadf673 Happy New Year! 2024-01-14 01:56:36 -08:00
Dmitry Shevchik
a0057adaaa Support compute shaders for OpenGLES 3.1 by injecting a proper version. (#3224) 2023-12-16 09:21:04 -08:00
Бранимир Караџић
e9e2e224ee Replaced macros with C++17 attributes. 2023-12-02 20:16:56 -08:00
Fabio Soldati
e8f51dea4c fixed wrong cast uint16t to uint32t (#3187)
The new Google Pixel 8 device supports maxTextureSize of 65535. The current implementation sets this value to 0 and lets crash my app. With the cast to uint32t the app works correctly again.
2023-10-23 08:01:22 -07:00
Jamil Halabi
f059531885 Added a new capability to check for PrimitiveID support (#3154) 2023-08-04 16:42:33 +02:00
Бранимир Караџић
928800feab macOS, iOS: Removed OpenGL/OpenGLES support. 2023-06-24 08:13:00 -07:00
Бранимир Караџић
fa1897bd1f Added headless validation for bgfx::init and bgfx::reset. 2023-06-23 19:16:32 -07:00
Branimir Karadžić
290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
issam3105
c3e3053935 Fix call to non-existant glDrawBuffers on mobile WebGL 1 (#3068)
Co-authored-by: Issam <issam.dahmen@fittingbox.com>
2023-04-04 07:52:40 -07:00
Christophe Dehais
cd3a1ea7f8 [GL] Fix sRGB framebuffer write (#3032) 2023-02-02 09:16:32 -08:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
Raziel Alphadios
c2bc5177b5 Add support for remaining unsupported ASTC formats (#2963)
* Add support for remaining unsupported ASTC formats
Add new ASTC formats into pixelformats example and ninja scripts
Rebuild ASTC textures

* Update idl and generate
Move comma in pixelformats

Co-authored-by: Raziel Alphadios <raziely@gmail.com>
2022-10-25 17:03:40 -07:00
Бранимир Караџић
8e4fc9deb4 Cleanup. 2022-10-14 07:12:32 -07:00
Christophe Dehais
f3ff07a7fc Simplify the sampler object code path selection in GL backend (#2955) 2022-10-14 07:08:26 -07:00
Бранимир Караџић
9e7aa2d2ef WebGL: Use sampler object if it's GLES3. 2022-10-13 18:29:03 -07:00
Cedric Guillemet
c3afd0e31d Remove alpha-premultiplied postprocess (#2948) 2022-10-06 07:06:45 -07:00
Branimir Karadžić
a06ee14802 Fixed issue #2944. 2022-10-03 20:19:19 -07:00
Бранимир Караџић
2d6c85ac7a Fixed emscripten build. 2022-09-23 10:01:47 -07:00
Бранимир Караџић
01f308dd58 GL: Fixed instace data offset when i_dataX is missing in shader. 2022-09-20 20:48:48 -07:00
jwdevel
f1f77a6cd3 Record frame num in view stats (#2908)
* Add 'frameNumber' to Frame struct

Previously, the frame number returned from bgfx::frame() was tracked separately in the Context. Now,
we store that information in the Frame. This will allow us to attach the frame number to ViewStats.

* Add frame number to ViewStats

When ViewStats are enabled, we tag each timer query with the current frame number, then include
that information in the final results. In this way, clients can correlate specific work that they
submitted to specific GPU timing information.

NOTE: Some backends not implemented, yet. They will always have 0 for frame number.
The ones which are implemented are:
 * OpenGL
 * Vulkan
 * D3D 9,11,12
 * Noop
2022-09-18 19:09:48 -07:00
pezcode
ba467be036 Add support for indirect draw with indirect count (#2925)
* Add indirect draw with indirect count (BGFX_CAPS_DRAW_INDIRECT_COUNT)

* Update bindings

* VK: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT

* D3D12: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT

* GL: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT

* 48-drawindirect: Use BGFX_CAPS_DRAW_INDIRECT_COUNT if available

* 48-drawindirect: Update shaders
2022-09-17 18:16:19 -07:00
Бранимир Караџић
72cbe83275 Removed bgfx::setPlatformData usage from entry example harness. 2022-08-25 20:07:03 -07:00
Sandy
85910e9778 Add BGR versions of 16 bit formats (#2897)
* pixelformats: Add BGRA4

* pixelformats: Add BGR5A1

* pixelformats: Add B5G6R5

* make idl
2022-08-25 16:08:06 -07:00
Sandy
561e91a62b opengl: Implement texture swizzle mapping (#2892)
* opengl: Implement texture swizzle mapping

* imageformats: Fix compilation on android

Android GLES does not have a definition for GL_BGR: Swizzle instead.
2022-08-25 06:54:57 -07:00
Sandy
536c4cdbf5 Texture format info: Invert R and B in R5G6B5 (#2886)
d3d9: Do software conversion to take advantage of B5G6R5.
d3d11: Do software conversion to take advantage of B5G6R5.
gl: Set internal representation to swap R and B.
metal: Swizzle R and B and remove software conversion.
2022-08-23 06:46:56 -07:00
Sandy
054a9ecd83 Texture format info: Invert R and B in RGBA4 (#2878)
* texture format info: Invert R and B in RGBA4

d3d9: Revert 06c08adc9e to force software
      conversion because the format doesn't exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert 3e3e655262 to swizzle R and B
mtl: Swizzle channels

* metal: Remove explicit conversion of RGBA4 and RGB5A1 in osx

* metal: Set alpha bit to correct end of short
2022-08-22 19:03:22 -07:00
Sandy
58aeeaf155 texture format info: Invert R and B in RGB5A1 (#2876)
d3d9: Revert 76db2ed38d to force software
      conversion and use the format that does exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert b36aa71403 to swizzle R and B
mtl: Swizzle R and B
2022-08-22 17:36:50 -07:00
Бранимир Караџић
ec00fa1bc2 GL: Added component mapping stub. 2022-08-19 19:11:13 -07:00
Cedric Guillemet
6aad365c9e Enable MSAA setting at context creation for Android (#2854) 2022-08-04 06:51:38 -07:00
Cedric Guillemet
a3d52fab32 premultiplied backbuffer for UWP/SwapchainPanel (#2837)
* premultiplied backbuffer for UWP/SwapchainPanel

* init flag

* caps and feedback/opengl premul

* reduced #ifdef form

* removed ifdef
2022-07-18 09:23:57 -07:00
Бранимир Караџић
d0a4672307 Cleanup. 2022-07-10 23:26:39 -07:00
Бранимир Караџић
c066251750 Cleanup. 2022-07-10 20:46:11 -07:00
Бранимир Караџић
32192450c4 WebGL2: Fixed missing glReadBuffer import. 2022-07-10 19:03:28 -07:00
Cedric Guillemet
607a775009 FS Quad/MSAA for GLES3 (#2820) 2022-06-15 07:44:25 -07:00
Cedric Guillemet
f0cf1794e7 Fix MSAA with ARM Mali OpenGL ES (#2818)
* Fix MSAA with ARM Mali OpenGL ES

* indenting
2022-06-15 03:35:19 -07:00