Commit Graph

521 Commits

Author SHA1 Message Date
Krzysztof Starzyk
dde257903c Fix ident 2017-11-12 12:47:13 +01:00
Krzysztof Starzyk
bcd0234ff8 Add OSX build for SFML demo 2017-11-12 12:39:23 +01:00
Michael Bosse
0fca7e2045 Adds protection of the texture matrix stack which allows the user to use sf::Sprites with this code unmodified otherwise 2017-10-17 17:16:55 -04:00
Micha Mettke
056af25e27 Merge pull request #534 from DeXP/gles2
OpenGL ES2.0: Emscripten support
2017-10-17 12:23:56 +02:00
Patrick Rudolph
3705464605 demo/x11_rawfb: Change license to MIT
Relicense all x11_rawfb demo files under MIT license.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2017-10-09 17:41:06 +02:00
DeXP
e57e0149f3 Emscripten support 2017-10-08 21:26:33 +02:00
vurtun
e5850a01b9 Fixed style issues in software renderer 2017-10-07 14:30:22 +02:00
vurtun
5d72fe5f86 Merge branch 'nuklear_softrast' of https://github.com/siro20/nuklear into siro20-nuklear_softrast 2017-10-07 14:01:22 +02:00
Patrick Rudolph
2eb72b26e4 Add software rasterizer library and demo.
The software rasterizer is to be used with raw framebuffer
devices, where no GPU or X11 is available.
The demo emulates a raw framebuffer on X11 using XShmImage / XImage.

Features implemented:
* Drawing primitives
* Drawing polygons (using Darel Rex Finley algorithm)
* Drawing arcs and circles (using Bresenham's elipses algorithm)
* Drawing images using nearest filtering
* Bounds check on every operation
* Fastpath for lines
* Font rendering using nearest filtering
* Window resize
* Thread safe implementation by using a context
* Fixed lower and upper scissors on fast-path
* Adapted coding style to nuklear's style
* Implemented text scissors

Color formats:
Define one of them at compile time.
* RAWFB_RGBX_8888 (32bpp)
* RAWFB_XRGB_8888 (32bpp)

Tested:
The library has been tested on Lenovo Thinkpad T500 and is able to render
more than 30fps on a single core with no further optimizations and VSNYC enabled.

TODO:
* Improve font rendering by using filters.
* Account font foreground color.

Usage:
The raw framebuffer library needs a "texture" that holds the prerendered
font data. The texture is used at runtime to blit the letters onto screen.
You have to provide the framebuffer address, dimension and pitch.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2017-10-07 12:08:24 +02:00
Micha Mettke
ed57400644 Merge pull request #529 from DeXP/gdip-fonts
GDI+ multiple fonts support
2017-10-04 21:41:41 +02:00
Dmitry Hrabrov
49c3bcd0c6 nk_ prefix 2017-10-04 20:05:47 +03:00
vurtun
af216a1be4 Merge branch 'gles2' of https://github.com/DeXP/nuklear into DeXP--gles2 2017-10-04 15:10:05 +02:00
Micha Mettke
c582959eea Merge pull request #527 from DeXP/gdip
GDI+ nk_gdip_fill_rect background fix
2017-10-04 15:08:07 +02:00
Dmitry Hrabrov
02e6a81625 GDI+ multiple fonts support
Each custom loaded font requires own `GpFontCollection`. So there is array of font collections now.
2017-10-01 18:38:08 +03:00
Dmitry Hrabrov
a01977264c Revert X11 changes 2017-10-01 18:36:40 +03:00
DeXP
cc8556533f Open GL ES 2 demo
Can be used on: Linux, Mac OS X, Android, Emscripten
2017-10-01 14:10:57 +02:00
Dmitry Hrabrov
49f6b1134e Revert X11 changes 2017-10-01 14:08:06 +02:00
Dmitry Hrabrov
ecee5816d5 Revert X11 changes 2017-10-01 13:42:41 +03:00
Dmitry Hrabrov
d0ed8bc3cf GDI+ nk_gdip_fill_rect background fix
1. Main background area was filled by 2 big overlapping rectangles. It works good on solid but not on semi-transparent themes. Just replaced 2 big rectangles with 1 big and 2 small.
2. There is no need in [nk_gdip_fill_rect filled pies fix](7ab7327fa4) anymore. It disturbs semi-transparent themes too.
2017-10-01 13:33:52 +03:00
Micha Mettke
48f659abd8 Merge pull request #497 from jwdeitch/master
fix compiling error on OSX (-lglfw3 not found)
2017-09-18 17:41:54 +02:00
Dmitry Hrabrov
708a7ebbc3 Xlib: remove text BG rectangle
It's already window or BGcolor on background.
2017-09-11 15:15:38 +03:00
Dmitry Hrabrov
f72dd6239d Optional stb_image defines 2017-09-11 14:00:20 +03:00
Dmitry Hrabrov
5de84dc310 Fix stb_image path 2017-09-04 12:38:04 +03:00
Dmitry Hrabrov
5fc8a250aa stb_image with bit transparency
X11 do not support transparent images itself. So the clip mask is calculating in this code. X11 ClipMask support only bit transparency.
2017-09-04 12:35:32 +03:00
lieff
039afa80ae fix asan error (out-of-scope variable access) 2017-09-01 13:06:49 +03:00
jwdeitch
52f24d4e67 fix compiling error on OSX
error: ld: library not found for -lglfw3
2017-08-17 00:58:08 -04:00
cascade256
f7137ec0f1 Fix GLFW double clicking 2017-08-13 00:55:07 -07:00
Micha Mettke
27603d5b97 Merge pull request #449 from Fra-Ktus/master
allowing touch event to work on iOS and Android
2017-06-06 20:40:00 +02:00
Micha Mettke
3b8d66a57c Merge pull request #450 from Fra-Ktus/gdi_nk_image
Implemented nk_create_image and nk_delete_image for the win32 gdi
2017-06-06 20:39:16 +02:00
Martins Mozeiko
e14dd1cb1b Demo using Direct3D 9 for rendering 2017-06-05 21:09:16 -07:00
FraKtus
9c3ab8ed60 implemented nk_create_image and nk_delete_image 2017-06-04 15:29:42 +02:00
FraKtus
042cd078ec implemented nk_create_image and nk_delete_image 2017-06-04 11:34:42 +02:00
FraKtus
3debbd2104 allowing touch event to work on iOS and Android 2017-06-04 11:20:25 +02:00
Martins Mozeiko
edac63b81e double click support in demo code for Windows platforms 2017-05-16 22:29:43 -07:00
vurtun
9dc7323b74 Added platform double click support #412 2017-05-06 18:50:32 +02:00
vurtun
5cf6f204b7 Removed wrong nk_window_is_closed in demos 2017-04-06 09:51:50 +02:00
vurtun
1a87c13d84 Fixed multiline commment in commented out code 2017-03-25 23:29:42 +01:00
vurtun
23eea231d8 Added horizontal scrolling 2017-03-21 21:21:58 +01:00
vurtun
6bb00890fb Fixed PR styling issues 2017-03-18 18:09:54 +01:00
Silas Parker
0073110c9b Xlib: Add font stack push function and copy/paste support 2017-03-16 15:39:12 +00:00
vurtun
e77b723d98 Removed unused defines and parameters 2017-03-15 18:19:21 +01:00
vurtun
7c7e15e5c3 Fixed some styling issues in sfml demos 2017-03-12 13:30:14 +01:00
vurtun
220c314df4 Merge branch 'master' of https://github.com/ricanteja/nuklear into ricanteja-master 2017-03-12 13:02:55 +01:00
Ricardo Antonio Tejada
3d77394bd2 Forgot to edit link to point to SFML webpage and not Allegro.. 2017-03-01 22:25:42 -05:00
Ricardo Antonio Tejada
1574367121 Makefiles done. 2017-03-01 22:23:21 -05:00
Ricardo Antonio Tejada
c6bfe1c157 Finally! I fixed that bug that I had. sf::Mouse::setPosition was setting the position of the cursor to desktop coordinates not window coordinates. 2017-03-01 17:17:43 -05:00
Ricardo Antonio Tejada
63e98d90bd Almost ready for merge. Need to fix bug with mouse movement. Need to implement clipboard support. Lastly need to write ReadMe on instructions for building. 2017-02-28 19:32:55 -05:00
Ricardo Antonio Tejada
5007519ae7 Dumped the pure SFML folder. Got it working enough to realize that it just ran too slow to continue wasting time on it. SFML creates a OpenGL context anyway so users can drop in the nk_sfml_gl2.h and not need anything else. I'll have to add this in the readme. Tried to make my code as similar to other demos for sake of consistency. 2017-02-23 02:02:59 -05:00
Ricardo Antonio Tejada
73b0b945b4 Added OpenGL3 for SFML and also working on "pure" SFML renderer. 2017-02-17 17:54:24 -05:00
Ricardo Antonio Tejada
2babe51576 Fixed the clipping glitch (bug that caused the window borders and backgrounds to not be rendered).
Fixed text input bug that could cause the program to crash.
2017-02-13 01:59:32 -05:00