Commit Graph

612 Commits

Author SHA1 Message Date
marcinzelent
d829ff1ef1 Fixed copy and paste in glfw_opengl3 demo 2021-04-08 17:36:07 +02:00
Hecklezz
ff7f929e38 Made D3D11 implementation work when using NK_UINT_DRAW_INDEX 2020-12-29 15:08:47 +10:00
Martijn Versteegh
7fea82f534 Properly cleanup all resources and remove some obsolete comments. 2020-10-07 11:43:40 +02:00
Martijn Versteegh
dc635effbc Don't show the grid demo, since it doesn't work that well without keyboard handling. 2020-10-07 11:42:45 +02:00
Martijn Versteegh
737bb49754 Remove overly spammy printf.\n 2020-10-07 11:37:45 +02:00
Martijn Versteegh
b5faf09c4f Add a rawfb backend which uses SDL_Surface's for output.
The other sdl  demo backends all use OpenGL, which defeats the
purpose of using SDL_Renderer for portabilty.
This is maybe not as good as a full SDL_Renderer backend, but it
is more flexible. For most applications software rendering of the
UI is more than fast enough.
2020-10-07 11:18:20 +02:00
Andrew Kravchuk
264abf4af1
Added processed event flag as a return value in allegro5 backend 2020-06-16 19:03:50 +03:00
Patrick McMorris
c1e7be31bd fix incorrect memset size in shutdown for glfw demo 2020-06-11 23:03:38 -07:00
wyattscarpenter
9812c131b4
use integer for integer bound
I got a warning about this from my compiler (cl.exe). I tested it both ways, and the behavior is the same, except for the compiler warning no longer occurs after my change.
2020-06-11 07:08:43 -05:00
Andrew Kravchuk
539f477781
Improved user font initialization in allegro5 backend 2020-06-06 09:50:00 +03:00
Andrew Kravchuk
74db09cdab
Added ability to use user fonts after initialization in allegro5 backend 2020-06-05 12:01:49 +03:00
Andrew Kravchuk
f7960ba73c
Fixed naming bug in allegro5 backend image support 2020-05-27 07:57:02 +03:00
Andrew Kravchuk
151916aee4
Added image support to allegro5 backend 2020-05-26 17:56:13 +03:00
Arnavion
e98ddde398 Migrate wayland demo to xdg_shell.
The wl_shell interface it previously used is deprecated and not implemented
by some compositors, like sway.

Fixes #134
2020-05-17 12:07:21 -07:00
Richard Gill
910df27fa0
nuklear_glfw_gl3.h without implementation (#124)
note: including nuklear implementation in glfw_gl3 implementation file is still needed because of the usage of some macros (i.e. NK_MEMSET)
2020-05-08 13:12:55 +02:00
crazyBaboon
244a98ea7b
Fix missing space in overview.c "Popup->Right click here:" 2020-05-03 11:06:50 +01:00
Richard Gill
fe01ff52eb demo/glfw_opengl3 Remove global state 2020-04-30 15:17:24 +02:00
Zane Ashby
9818f642da Fix memory leak in demo and example code.
Clear cmds nk_buffer after each frame to stop it growing over time.
2020-04-12 01:40:09 +12:00
crazyBaboon
4f6b838748 Remove duplicated #include <math.h> 2020-03-09 21:51:08 +00:00
Johan Söderlind Åström
81e408a805 Added arg params in main function to fix conflicting types for 'SDL_main' error 2020-02-28 15:24:03 +01:00
Zidi
135b585695 zidi add comment 2020-02-27 10:11:05 +08:00
Zidi
ad8dcbb385 add some comment 2020-02-26 22:50:16 +08:00
Zidi
9ee58df23e add some comment 2020-02-26 22:47:48 +08:00
Zidi
ce6b5b03c4 fix backspace question mark problem 2020-02-26 11:21:22 +08:00
Zidi
5b4cc7b5eb zidi fix backspace won't work problem in SFML UTF-8 2020-02-26 11:01:09 +08:00
skoperst
a88cd062b7 Add pure C wayland demo
This implementation uses software rendering in native wayland client.
2019-12-12 21:24:46 +02:00
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