Commit Graph

586 Commits (master)

Author SHA1 Message Date
dumblob df60f5590d
Merge pull request #761 from sukhchainn/patch-2
Remove superfluous #include <math.h>
2019-09-20 18:04:41 +02:00
Jimmi Holst Christensen 7fafcb3ac7 add ctrl support for x11 demos 2019-09-18 18:27:25 +02:00
Jmmi f176f3d7e6 use memset macros instead of fn in x11 demos 2019-08-16 22:20:22 +02:00
Lory171 130f0a6303
x11_xft fixes
Fixes for the X11 backend with XFT fonts from demo/x11_xft:
- fixed some memory leaks by destroying XFT objects during cleanup 
- the function to get text width was returning the wrong value
- the clipping space of text boxes was not implemented for XFT
- misc
2019-07-23 01:34:43 +02:00
Infinity_X 15e4dae107
Add type conversion for calloc 2019-07-10 19:32:36 +08:00
Lory171 7decd7c600
x11_xft fix resize issue 2019-07-08 20:55:35 +02:00
dumblob 9854477f0b
Merge pull request #817 from ccawley2011/sfml-fix
Fix compilation of the SFML demos
2019-06-16 20:38:13 +02:00
Tropby 386386f7de added casts to HBITMAP (needed to compile with mingw 32bit)
added "A" to CreateFont (needed to compile with mingw 32bit)
2019-06-15 12:50:24 +02:00
0x0203 e8d1c38546 Fix nits (see PR #851) to clean up x11_rawfb 2019-06-10 18:03:22 -04:00
0x0203 4de6d284a3 - Determine pixel layout at runtime instead of relying on compile-time flags
- Fix some potential null dereference bugs
2019-06-06 14:54:30 -04:00
0x0203 1dfe4ebc19 Implement software rendering of RECT_MUTI_COLOR for x11_rawfb 2019-06-06 12:58:03 -04:00
0x0203 46031ccc5f Make x11_rawfb set_style() examples correct 2019-06-06 12:51:16 -04:00
0x0203 6d24023d98 - Implement text foreground color
- Be consistent about reading and writing pixel values to avoid casting/offset madness
- clean up function names for clarity/consistency
- Fix fence post errors preventing get/set pixels from operating on first row/column
- Enforce mutual exclusivity for pixel layout macros
2019-06-06 12:42:32 -04:00
0x0203 b9f9d0a176 Allow proper drawing to last column of screen. 2019-05-31 19:31:54 -04:00
dumblob b76f2f28c4
Merge pull request #777 from sa-kib/rawfb_xft_demo_fixes
x11_rawfb and x11_xft demos fixes
2019-05-28 10:32:58 +02:00
Cameron Cawley 930ac1e888 Fix compilation of the SFML demos 2019-02-28 00:10:42 +00:00
Cameron Cawley e032440225 Fix background colour in Direct3D 9 demo 2019-02-27 17:56:38 +00:00
Sergiy Kibrik 945c7f82ac demo/x11_xft: fix UTF-8 text rendering
If XftDrawString8() is given non-ASCII UTF-8 string it fails to properly render it.
Using XftDrawStringUtf8() instead seems to be doing the right thing.

Signed-off-by: Sergiy Kibrik <sakib@darkstar.site>
2018-12-11 17:20:10 +02:00
Sergiy Kibrik 0a46238a44 demo/x11_rawfb: fix build errors
Like these:

   main.c: In function ‘main’:
   main.c:234:20: error: ‘ctx’ undeclared (first use in this function)
              overview(ctx);
                       ^
Signed-off-by: Sergiy Kibrik <sakib@darkstar.site>
2018-12-11 17:06:16 +02:00
Micha Mettke 3e10d1204b
Merge pull request #759 from kphillisjr/gdi_fixes
Demos: some windows GDI fixes
2018-11-01 19:28:07 +01:00
Micha Mettke 99904e9f4b
Merge pull request #764 from DeXP/master
Add Raspberry Pi to OpenGL ES2
2018-11-01 19:23:37 +01:00
Robert Winkler 36a8d2a5ad Fix issue 548
The issue was introduced in the fix for 416 (commit 8559aeb).

The original problem was (backspace and arrows moving too fast) is not a
nuklear problem but a GLFW problem.  Because of the way nuklear handles
input (it must be between input_begin and end), the key callback method
GLFW offers is not an option.

So we have to use glfwGetKey() which returns the current state of a key
not whether it was just pressed or released, so nuklear acts like it
was pressed every single frame, hence the "too fast" problem.

The fix checks for state change and discards the event if there was
no change.  This kills key repeat behavior (for named keys) on
*all* platforms which makes deleting or arrowing inconvenient.

Since there's no way to fix the shortcomings of a callback vs event
based input API, my "fix" just makes the original fix conditional
on a macro NK_KEYSTATE_BASED_INPUT
2018-10-30 00:43:01 -07:00
Dmitry Hrabrov 272f1b9a05
Create Readme.md for OpenGL ES 2018-10-28 14:31:00 +03:00
Dmitry Hrabrov bb21a3c836
Add Raspberry Pi to OpenGL ES2 makefile 2018-10-28 14:08:15 +03:00
Brain Developer 721b3755f4
I removed an additional #include <math.h>
I found an additional "#include <math.h>" so I removed it.
Thinking that it was additional.
2018-10-22 21:10:01 +05:30
Kenney Phillis Jr 3121e6cb2a gdi demo: Implement nk_gdi_rect_multi_color.
This implements the GDI Rect Multicolor functions. This will work without
any problems when targetting Windows 2000 and up.

TODO: Fix Alpha blending. The Color Matrix does not render correctly.
2018-10-18 18:13:56 -05:00
Kenney Phillis Jr 9c2af0124d gdi demo: fix style issues.
A small fix of style where tabs are replaced with spaces.
2018-10-18 18:13:36 -05:00
Vincent Torri 1fdf7828af demos: fix typo (clipbard --> clipboard) 2018-09-15 06:52:10 +02:00
Micha Mettke 4ce3b6a0b3
Merge pull request #701 from buserror/fix-out-of-bound-access
overview.c: Fix an out of bound access
2018-06-29 21:43:12 +02:00
Michel Pollet 8ddb3e59f6 xlib: Add support for x11_xft for antialiases fonts
Looks a lot better.

Signed-off-by: Michel Pollet <buserror@gmail.com>
2018-06-21 13:41:04 +01:00
Michel Pollet e5dee6bf3d overview.c: Fix an out of bound access
Access 8 elements in a 4 elements array.

Signed-off-by: Michel Pollet <buserror@gmail.com>
2018-06-21 11:08:28 +01:00
vurtun 0981c1a321 Fixed #677 contextual right-click behavior
Closing a contextual menu by right click caused invalid behavior and
bocking. In addition having consecutive contextual menus and closing an
earlier menu will wrongfully open a following menu. Both are now fixed.
2018-04-23 10:55:35 +02:00
vurtun 3f99a80f11 Added selectable tree nodes #626 2018-04-14 13:57:25 +02:00
vurtun aa6752487f Merge branch 'lumonix-glfw_opengl4_demo' 2018-04-06 09:24:56 +02:00
vurtun 1098b22423 Changed GLFW context version to OpenGL 4 2018-04-06 09:20:53 +02:00
Micha Mettke 9a8899fb29
Merge pull request #644 from vtorri/master
d3d11 demo: release target view with ID3D11RenderTargetView_Release()…
2018-04-01 04:15:57 -07:00
Dickby 0dabcdd1f9
correct major/minor version of opengl in x11_opengl2 2018-03-23 16:14:32 +01:00
Vincent Torri 602ad7d6f9 d3d11 demo: release target view with ID3D11RenderTargetView_Release() and not with ID3D11ShaderResourceView_Release() 2018-03-14 10:14:17 +01:00
Micha Mettke d9ccea11fe
Merge pull request #640 from vtorri/master
d3d11 demo: GetBuffer requires a void ** as 4th argument.
2018-03-01 09:37:55 -08:00
Vincent Torri 30a5709e0a d3d11 demo: GetBuffer requires a void ** as 4th argument.
Fix warning with gcc.
2018-03-01 16:22:19 +01:00
vurtun 19ce2bf091 Removed cursor hidding while property dragging 2018-02-12 09:53:18 +01:00
Patrick Rudolph 66946dc3cf nuklear_rawfb: Use pitch in offset calculation
Use the framebuffer pitch to calculate the correct offset.
Fixes garbled rendering on framebuffer that have
pitch != x_resolution * bpp / 8.

The demo application is unaffected as the pitch always aligns with
the x resolution of the window.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2018-02-04 17:08:17 +01:00
um e409328ff2 fixed nk_gdi_stroke_rect() : used old version (Rectangle/RoundRect) but with transparent brush. 2018-02-02 10:32:45 +03:00
um f771450e93 Correct GDI window sizing handling 2018-02-01 17:26:27 +03:00
Martins Mozeiko 5acdfc9e34 correctly draw non-filled rectangle for GDI demo 2018-01-29 22:14:41 -08:00
vurtun 48a9d3176b Fixed ANSI C warnings 2018-01-28 11:59:06 +01:00
vurtun f8dfddd732 Applied patch from #603 for panel border drawing 2018-01-28 11:48:44 +01:00
Kees Rijnen 205089ff62 Add opengl 4 demo that uses bindless textures and pesistent mapped vertex buffer 2018-01-22 06:00:39 -08:00
vurtun 2891c6afbc Update demos to new color picker API 2018-01-05 13:09:27 +01:00
vurtun bd30c124a6 Fixed #544 color picker (breaking change) 2018-01-05 12:32:42 +01:00