Commit Graph
778 Commits
Author SHA1 Message Date
Branimir Karadžić 44de6fb789 Cleanup. 2016-09-08 22:03:42 -07:00
Branimir Karadžić 374fe6f845 Updated NanoVG. 2016-09-08 21:19:47 -07:00
Branimir Karadžić 813d145ac9 GLFW: Fixed exit. 2016-09-06 23:07:11 -07:00
Camilla Berglund 8b4f495225 GLFW: Lowered CPU use. 2016-09-05 21:41:03 +02:00
Camilla Berglund 3429fff1ba GLFW: Implemented full GLFW backend. 2016-09-05 21:41:02 +02:00
Branimir Karadžić f9486780c2 Updated NaCl toolchain to v49. 2016-09-02 21:25:01 -07:00
Branimir Karadžić 0ba8b1895b Cleanup. 2016-09-02 19:49:01 -07:00
Branimir Karadžić 687e4103fe Added gizmo hook. 2016-08-29 22:31:30 -07:00
Branimir Karadžić 79ef46e4cf Fixed issue #890. 2016-08-26 09:01:49 -07:00
Branimir Karadžić df88bc2106 Cleanup. 2016-08-22 19:42:38 -07:00
Branimir Karadžić 8809a190ef Fixed calcTextureSize. 2016-08-22 14:17:08 -07:00
Branimir Karadžić 7537b705e5 GL: Added support for texture array. 2016-08-21 14:03:16 -07:00
Branimir Karadžić c98be90bf5 WIP: Texture array support. 2016-08-19 21:05:37 -07:00
Branimir Karadžić 3ac8943e05 Removed PlatformData helpers. 2016-08-17 20:41:09 -07:00
Branimir Karadžić 939829f88c Moved SDL and GLFW window platform hooks to entry. 2016-08-16 22:22:39 -07:00
Branimir Karadžić a488207c81 Cleanup. 2016-08-10 21:51:29 -07:00
Branimir Karadžić 2c861766e8 Switch iffy translation code to lookup table translation. 2016-08-10 20:36:21 -07:00
Olli Wang 1804ba77c1 Updates nanovg to support global composite operation. (#877)
This commit updates bgfx's NanoVG codebase to adapt the latest NanoVG commit since I've implemented blending support for the original NanoVG and there is no need of `nvgState()` anymore.
2016-08-10 20:15:31 -07:00
Branimir Karadžić 9f7386e53a Rebuilt NanoVG embedded shader. 2016-08-10 10:59:07 -07:00
Branimir Karadžić d7026e8f0c Reverted embedded shader. 2016-08-09 22:54:18 -07:00
Olli Wang b9810aca70 Updates nanovg backend to adopt premultiplied alpha. (#873)
This commit updates nanovg's bgfx backend to adopt premultiplied alpha as the default blending mode just like the original nanovg. Both the fragment shader and the `glnvg__convertPaint()` function are updated to match the original nanovg counterpart.

However, the binary file of the fragment shader is built on Mac so DirectX support is missing.
2016-08-09 22:44:04 -07:00
Branimir Karadžić dd0d563417 Fixed build. 2016-08-08 16:33:17 -07:00
Branimir Karadžić b4cb6a352e Fixed clang4 error. 2016-08-08 13:17:07 -07:00
Branimir Karadžić c25a273e29 Cleanup. 2016-08-08 09:23:42 -07:00
Olli Wang f11d954bc1 Implements nanovg's framebuffer helper functions. (#869)
This commit ports nanovg's helper functions for rendering stuff in framebuffer defined in `nanovg_gl_utils.h`. Also, a new `nvgState()` function is created for bgfx backend so it is possible to blend between framebuffers, which feature is long requested but not yet supported in original nanovg. The `nvgState()` function can be called between `nvgBeginFrame()` and `nvgEndFrame()`.
2016-08-08 08:33:37 -07:00
Olli Wang fa73aa4b09 Adds iOS device's Retina screen support for nanovg. (#865)
This commit fixes the bug that the bgfx does not respect the `devicePixelRatio` parameter passed to nanovg's `nvgBeginFrame()` function. The problem is caused by the `bgfx::setViewRect()` call defined in the `nvgRenderViewport()` function, as it should take size in consideration of the `devicePixelRatio` value.

However, this commit does not fix nanovg's example app because currently there is no easy way to pass the scale value to the `ExampleNanoVG::update()` method as it calls `nvgBeginFrame()`.
2016-08-05 09:50:02 -07:00
Olli Wang c960c46564 Moves additional bgfx nanovg functions to a separate header file.
This commit moves the additional nanovg functions for bgfx to a separate header file, so it is possible to compile the original nanovg  source files with bgfx in a custom build environment.
2016-08-05 17:26:06 +08:00
Jean-François Verdon 3bdeea1f4b Android mouse event injection is overcomplicated, and furthemore, bugged: it sends a mouse up event before a mouse down, and have other issues like the fact that he work with one event latter. Simplifying it and correcting it. 2016-07-04 01:55:20 +02:00
Jean-François Verdon a9a7cbb86c Mouse clicks should update mouse position too 2016-07-04 01:42:44 +02:00
Lunkhound c066ca0d62 Fix out-of-bounds array access (was asserting in example-10-font, debug build) 2016-07-01 18:03:39 -07:00
Branimir Karadžić d2c6c79551 debugdraw: Added solid fill alpha blend. 2016-06-24 20:39:58 -07:00
Branimir Karadžić 2ca46b06f8 Cleanup. 2016-06-19 22:00:24 -07:00
Branimir Karadžić 4a6afd04b5 debugdraw: Added axis thickness. 2016-06-15 20:28:54 -07:00
Branimir Karadžić c8b27d93db Cleanup. 2016-06-15 17:34:59 -07:00
Branimir Karadžić 87c7206900 Cleanup. 2016-06-15 12:58:36 -07:00
Branimir Karadžić e50bda7818 Cleanup. 2016-06-15 09:33:11 -07:00
Branimir Karadžić 6e1d39b92a debugdraw: Cone & cylinder fill. 2016-06-14 22:33:37 -07:00
Branimir Karadžić eacd978cf1 Cleanup. 2016-06-05 21:36:58 -07:00
Branimir Karadžić e46135da8c Added ability to programmatically capture frame with RenderDoc. 2016-06-02 18:46:43 -07:00
Branimir Karadžić 21518f201f texturec: Preserve precision of input texture. 2016-06-02 16:38:26 -07:00
Branimir Karadžić 53e70f3424 Added 16-bit per channel PNG support. 2016-05-31 17:45:58 -07:00
Branimir Karadžić ddfb525931 Made old & new imgui cohabitate. 2016-05-28 20:52:18 -07:00
Branimir Karadžić 58156ea4e8 Cleanup. 2016-05-28 17:14:19 -07:00
Branimir Karadžić dda0de635e Switched to Roboto font. Added mono font. 2016-05-28 16:26:19 -07:00
Branimir Karadžić 3dd6bc237b Added icon fonts to ImGui. 2016-05-28 12:12:59 -07:00
Branimir Karadžić b37e9f53ad Cleanup. 2016-05-27 20:27:31 -07:00
Branimir Karadžić 71afc178c8 Cleanup. 2016-05-26 21:12:47 -07:00
Branimir Karadžić 10b9d079bf Cleanup. 2016-05-22 17:20:27 -07:00
Sami Kyöstilä 516e287f24 Make it possible to reset the native window (#796)
On Android when the application goes into the background, the EGL
window surface becomes invalid. It is possible to resume rendering when
coming to the foreground by resetting and reinitializing bgfx from
scratch, but this is costly in terms of performance.

This patch provides an alternative by letting the application provide a
new native window, causing bgfx to recreate just the EGL window surface
while keeping the EGL context intact. This allows the application to
resume rendering without needing to reload textures, shaders, etc.

To test, build and run the Hello World example on Android, switch to
another app and then back again. The screen should not remain blank
after switching back.
2016-05-22 17:16:25 -07:00
Branimir Karadžić 9cc3997795 Cleanup. 2016-05-12 09:42:44 -07:00