Commit Graph

977 Commits

Author SHA1 Message Date
Branimir Karadžić
40e614c45d Added external texture parameter. (#3596)
* Added external texture parameter.

* Use uint64_t instead of uintptr_t for external texture because VkImage is always 64-bit.
2026-02-18 20:12:37 +00:00
Branimir Karadžić
4baed6e076 Happy New Year! (#3550) 2026-01-14 16:26:51 +00:00
Branimir Karadžić
241e9c3330 Added Init.fallback option. Cleanup. (#3522) 2025-12-24 04:29:32 +00:00
Branimir Karadžić
23410d248c Fixed build.a (#3513) 2025-12-13 20:46:12 +00:00
Branimir Karadžić
f510ab6db8 Cleanup. (#3501) 2025-11-20 03:13:42 +00:00
attilaz
c4e0a433f0 gl renderer: Fixed BGFX_RESET_MAXANISOTROPY change (#3494) 2025-11-13 14:38:57 +00:00
attilaz
1aee4faf0f gl renderer: Fixed etc2 srgb formats (#3493) 2025-11-13 14:38:28 +00:00
Branimir Karadžić
9e8ecf4af4 Added EAC texture formats. (#3487) 2025-11-11 08:39:24 -08:00
Branimir Karadžić
35911ac2d9 Added uniform frequency. (#3485)
* Added uniform frequency.

* Cleanup.

* Cleanup.
2025-11-10 23:41:33 +00:00
Branimir Karadžić
5d8eb6d67c Cleanup. 2025-10-31 08:44:02 -07:00
Бранимир Караџић
fb27483652 Cleanup. 2025-10-31 07:03:44 -07:00
ProPuke
df53a7ca84 Fixed: BGFX_TEXTURE_MSAA_SAMPLE and msaa sampling bugs with gl (#3351)
* fixed: multiple BGFX_TEXTURE_MSAA_SAMPLE attachments could not be present in a framebuffer at once (sample locations were not fixed)
I've just set the sample location as always fixed for now, although technically this can be false if only 1 msaa texture attachment is present

* fixed: framebuffer with a resolved msaa AND a sample msaa at the same time would result in an invalid framebuffer
it would try to also resolve the sample-msaa texture at the same, leading to an invalid target type

* fixed: depth attachments could not be sample-msaa
this is valid, they don't resolving

* fixed: shader error sampking msaa textures in gl
parameter duplication on texelFetch(sampler2DMS,*) led to failed shaders
2025-10-30 00:29:36 +00:00
Бранимир Караџић
959cab248e Added ability to configure backbuffer depth/stencil. 2025-10-29 12:10:41 -07:00
Бранимир Караџић
cd3749dac9 Cleanup. 2025-10-25 22:18:15 -07:00
Gary Hsu
e7c2c69edb Add optional layerIndex argument to overrideInternal (#3477)
* Add optional layerIndex argument to overrideInternal

* Run genie idl
2025-10-26 05:12:34 +00:00
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