Commit Graph

331 Commits

Author SHA1 Message Date
Brad Parker
3b8a81dd31 make existing hard-coded unicode calls switchable back to ansi 2016-12-02 14:34:29 -05:00
twinaphex
5e10dbf348 Move more runloop.h includes 2016-12-02 16:01:06 +01:00
twinaphex
a911c24ba3 Remove runloop.h header includes 2016-12-02 06:26:41 +01:00
twinaphex
2eeb8912e8 (xdk1_xfonts.c) Add header include 2016-12-02 01:03:14 +01:00
Brad Parker
ba54f20626 initial libcaca video driver 2016-12-01 12:13:45 -05:00
Brad Parker
cd9d09d1f3 use unicode versions of windows functions 2016-11-29 14:34:35 -05:00
twinaphex
856d6b37be Turn video_shader_driver_set_coords into macro 2016-11-20 16:48:54 +01:00
twinaphex
ef610312e7 Turn video_shader_driver_set_mvp into macro 2016-11-20 16:45:06 +01:00
twinaphex
2deb306967 Turn video_shader_driver_use into macro 2016-11-20 16:31:45 +01:00
Francisco José García García
14c9eb47c4 (VITA) Add uft8 support 2016-11-05 16:21:21 +01:00
Brad Parker
d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
Francisco José García García
e685876f15 (VITA) Fix line height 2016-10-25 17:18:09 +02:00
aliaspider
5d36ccc60e gl_raster_font: fix line height when drawing multiple lines. 2016-10-22 11:42:36 +01:00
Twinaphex
7050ecf287 Remove unneeded variables 2016-10-21 19:07:28 +02:00
aliaspider
6f81a19f60 (GL) update font driver to support a dynamic atlas. 2016-10-21 17:28:44 +01:00
twinaphex
310de4698c Prevent some potential NULL pointer dereferences 2016-10-19 18:06:21 +02:00
aliaspider
c78f697c16 (3DS) wrap texture coordinate swizzeling in a function. 2016-10-10 22:22:08 +01:00
twinaphex
940fbcd4fa (D3D W32 fonts) Fix fonts 2016-10-09 16:58:51 +02:00
aliaspider
4729c2be76 (3DS) font renderer: prevent calling DrawArray() with count==0. 2016-10-08 04:24:32 +01:00
aliaspider
056224bf50 (3DS) avoid using ctrGuCopyImage during font init for now. (fixes freeze
on cia builds)
2016-09-30 16:16:18 +01:00
twinaphex
d53d1faad5 Use string_is_empty 2016-09-30 09:00:04 +02:00
twinaphex
91170722e6 Try to silence Coverity warning 2016-09-30 08:58:57 +02:00
Twinaphex
03215a831f Merge pull request #3690 from aliaspider/master
(3DS) add experimental font and menu_display drivers.
2016-09-29 21:33:08 +02:00
aliaspider
afd5e85a31 (3DS) add experimental font and menu_display drivers. 2016-09-29 20:14:12 +01:00
Brad Parker
b83d2529e2 break early if we run past the message length 2016-09-29 12:25:20 -04:00
Francisco José García García
f6a7aa95e7 (VITA) Fix crash in gambatte 2016-09-29 00:20:14 +02:00
Francisco José García García
e654c39944 (VITA) Fix utf8 2016-09-23 21:27:06 +02:00
frangarcj
bc90dd2927 (VITA) Another UTF8 Fix 2016-09-19 14:17:19 +02:00
frangarcj
ab0dad99fc (VITA) Remove old font driver 2016-09-19 14:15:13 +02:00
frangarcj
d46a40e3c4 (VITA) USE STB FONT 2016-09-19 14:14:11 +02:00
twinaphex
606e37fcbd Cleanups 2016-09-11 15:07:07 +02:00
Brad Parker
81090720c8 context must be current, not released, to use GL 2016-09-06 21:47:08 -04:00
twinaphex
075aea2289 Header include cleanups 2016-09-06 00:56:00 +02:00
twinaphex
86d2a36407 (Win32) Buildfixes 2016-09-05 18:43:32 +02:00
Brad Parker
0eb1777a1f remove extra semicolons 2016-09-03 10:30:21 -04:00
twinaphex
467451fccc Cleanup more header includes 2016-09-01 18:18:55 +02:00
twinaphex
815c0eb3ee Remove header includes 2016-09-01 05:46:10 +02:00
Brad Parker
2afd72252c make GLX context current when creating font textures with threaded video 2016-08-31 01:33:35 -04:00
twinaphex
d5f14a6caa Fix C89_BUILD warnings 2016-08-30 05:03:46 +02:00
Brad Parker
c3b164de88 fix utf8 strings being cut off in xmb/glui when multibyte chars are present, rgui not affected 2016-08-29 12:33:28 -04:00
Brad Parker
96c96dca3b fix rendering of utf8 glyphs 2016-08-29 11:02:28 -04:00
Brad Parker
13ad3a4fce fix glyph rendering of long messagebox strings 2016-08-29 02:25:42 -04:00
Twinaphex
89d0798e68 Merge pull request #3423 from bparker06/utf8
Initial UTF-8 support for rgui/xmb/glui. Enables first 256 codepoints.
2016-08-26 17:27:20 +02:00
twinaphex
82fecdbc70 (Vita) silence some warnings 2016-08-24 14:04:22 +02:00
Brad Parker
30e99927d2 undo previous new files and use existing encoding_utf header 2016-08-23 19:16:18 -04:00
Brad Parker
d063cb9283 do not make UTF-8 the default, simplify/centralize the common string functions, make sure rgui/materialui use utf8 strlen when available 2016-08-23 19:00:53 -04:00
Brad Parker
35e67e69e5 Initial utf8 support for rgui/xmb. Only supports first 256 codepoints due to current freetype atlas limitation 2016-08-23 14:49:44 -04:00
Francisco José García García
4221374072 (VITA) Add XMB support 2016-08-23 02:49:53 +02:00
twinaphex
51eba5a3e7 (D3D) Header fix pt. 4 2016-08-01 22:22:23 +02:00
Hans-Kristian Arntzen
0eca956789 Vulkan: Create image views with right amount of mip levels. 2016-07-31 14:01:39 +02:00
twinaphex
d0818e6e62 Not sure if/when we will be needing this 'ancient' codepath 2016-07-12 21:10:49 +02:00
Nathan S
d79da7fc1f (gl_raster_font) Fixed the viewport issue 2016-06-29 14:22:30 +02:00
Twinaphex
08dbbe1a55 Revert "(gl_raster) Added fullscreen to restore_viewport" 2016-06-29 02:30:05 +02:00
Nathan S
b0584a950d (gl_raster) Added fullscreen to restore_viewport 2016-06-28 11:56:19 +02:00
Hans-Kristian Arntzen
54c1759f45 Vulkan: Make a more general purpose symbol loader.
Avoids painful manual loading and wrapping function pointers everywhere
...

Reusable for cores, so move to libretro-common.
Also update built-in Vulkan headers.
2016-06-26 13:10:58 +02:00
Nathan S
6889b58270 (gl_raster_font) Fixed scaling for newlines 2016-06-05 14:56:23 +02:00
twinaphex
e2cc3bc08d Create gl_query_core_context_in_use 2016-05-16 05:55:42 +02:00
twinaphex
b2f5e2ac08 Rename gfx_font_raster_block 2016-05-10 02:42:02 +02:00
twinaphex
0e08dbe931 Rename gfx_coord to video_coord 2016-05-10 02:32:59 +02:00
twinaphex
1b8e8ac22a Remove video_shader_driver_ctl 2016-05-08 21:11:27 +02:00
twinaphex
7e1a06d8dd Remove some warnings 2016-05-08 17:54:30 +02:00
Hans-Kristian Arntzen
d723411436 De ioctl video_driver. 2016-05-08 14:00:51 +02:00
Hans-Kristian Arntzen
464a4add66 XMB ribbon works in Vulkan. 2016-05-08 11:11:28 +02:00
Twinaphex
54427bd377 (gl_raster_font.c) Avoid another static code analysis warning 2016-05-02 17:10:21 +02:00
Twinaphex
4039bc89d6 (gl_raster_font.c) Cleanups 2016-05-02 17:08:40 +02:00
twinaphex
cc7f661f9c (D3D) Buildfixes 2016-04-23 19:02:40 +02:00
twinaphex
9386fb2fa0 Move D3D9 HLSL font shader to file 2016-04-17 04:13:23 +02:00
twinaphex
8a90e2777c Rename GL_SHADER_STOCK_BLEND to VIDEO_SHADER_STOCK_BLEND 2016-04-16 01:50:20 +02:00
twinaphex
9d85afd358 Refactor SHADER_CTL_USE 2016-04-15 07:37:06 +02:00
Jean-André Santoni
64e2f9e2f0 (XMB) Subtler drop shadows 2016-04-09 13:23:59 +07:00
twinaphex
072d6ff125 Rename gfx_coord_array_add to gfx_coord_array_append 2016-03-23 07:01:54 +01:00
twinaphex
64a77af881 Use RARCH_DISPLAY_CTL_HW_CONTEXT_GET directly instead of
going through video_driver_callback
2016-03-04 20:49:55 +01:00
twinaphex
6f80e09ce1 Change MIN/MAX to upper-case 2016-03-02 00:07:31 +01:00
twinaphex
81690601c0 (gl_raster_font.c) Fix some race issues 2016-03-01 17:24:33 +01:00
twinaphex
b79edb6095 Reimplement function pointers 2016-03-01 02:21:53 +01:00
twinaphex
3b9552bd36 (vulkan_raster_font.c) Style nits 2016-02-29 20:02:44 +01:00
twinaphex
0e91bb6852 Go through more function pointers 2016-02-29 19:03:18 +01:00
twinaphex
8fd280967b Go through funcptr 2016-02-29 17:08:25 +01:00
twinaphex
6c9e8041c6 Add function pointer for vkCreateCommandPool 2016-02-29 16:41:49 +01:00
twinaphex
a8185f0b81 Cleanups 2016-02-29 02:54:46 +01:00
twinaphex
b4e872476b Prevent some more crashes 2016-02-29 02:09:10 +01:00
twinaphex
4f1ab1f9c3 (gl_raster_font.c) Add early return in case gl pointer is NULL 2016-02-29 01:54:54 +01:00
Hans-Kristian Arntzen
cece4e5ae2 Vulkan: Add workaround for broken VkImageView swizzling.
Certain early drivers fail to apply swizzle mask.
2016-02-21 13:52:30 +01:00
Hans-Kristian Arntzen
adbf9fed16 Vulkan implementation. 2016-02-16 20:42:02 +01:00
twinaphex
bd74390cde Add SHADER_CTL_USE 2016-02-14 20:01:39 +01:00
twinaphex
37c2b47915 Add SHADER_CTL_SET_MVP 2016-02-14 19:43:47 +01:00
twinaphex
6c1b96f50d Add SHADER_CTL_SET_COORDS 2016-02-14 18:59:42 +01:00
twinaphex
a15f2519a5 Cleanup 2016-01-23 05:10:47 +01:00
twinaphex
63e2d13b8f Create string_is_equal_noncase - try not to use strcasecmp so much 2016-01-20 17:34:19 +01:00
twinaphex
54f46f4ee3 Update headers 2016-01-10 04:41:52 +01:00
twinaphex
aa488dda25 Create video driver poke load_texture / unload_texture 2015-12-20 20:52:23 +01:00
twinaphex
df60523f6c Move current_shader pointer to video_shader_driver.c 2015-12-08 09:27:25 +01:00
twinaphex
df1c6344be Merge font_renderer_driver.c and font_driver.c 2015-12-05 12:07:22 +01:00
twinaphex
e735f84baa Refactor shader subsystem 2015-12-05 07:33:32 +01:00
twinaphex
581c856676 Attempt to make gl_raster_font_flush_block more robust 2015-12-04 01:04:27 +01:00
twinaphex
406d37eb88 Convert xdk360_fonts.c to C++ 2015-11-17 22:48:11 +01:00
twinaphex
e6e7dd1c3b Include stockfont as part of vita2d_font.c 2015-11-17 08:37:55 +01:00
twinaphex
239ae7de53 Move gl_common to gfx/common 2015-11-17 08:01:33 +01:00
twinaphex
780bf74273 Try to not use glDeleteTextures directly outside 2015-11-09 01:50:05 +01:00
radius
7bddda2252 make the OSD coordinates relative to screen size instead of viewport size 2015-11-08 17:50:40 -05:00
Francisco José García García
8e652f613a (Vita) OSD messages 2015-10-02 00:11:54 +02:00
Francisco José García García
2564370664 (Vita) Vita2d font renderer 2015-10-01 01:10:26 +02:00
twinaphex
e986b9e42a Static code analysis cleanups 2015-09-29 17:35:28 +02:00
twinaphex
a79b571d7b Static code analysis fixes 2015-09-28 16:20:26 +02:00
twinaphex
7ad32fc8aa (XDK) Move files around 2015-09-20 15:39:59 +02:00
twinaphex
340585defb Header Cleanups 2015-09-16 05:53:34 +02:00
neville
c9de30dd98 (OSX PPC) Compile in HAVE_STB_FONT 2015-07-19 23:09:22 +02:00
neville
c43e33a816 (gl_raster_font.c) Certain code will only work for GL 3.0 and up 2015-07-19 22:59:33 +02:00
Higor Eurípedes
b1c9d48368 (gl_raster_font) Reorder ancient/modern checks 2015-07-19 13:01:28 -03:00
Higor Eurípedes
10345e0899 (gl_raster_font) Add back the old compat code 2015-07-19 12:55:30 -03:00
Higor Eurípedes
f9f98f9f2e (gl_raster_font) Enable GL_R8 atlas for GL >= 3 2015-07-19 12:55:30 -03:00
Higor Eurípedes
4f69b5e34b (gl_raster_font) Use a smaller pixel format to store the font atlas 2015-07-19 12:55:30 -03:00
twinaphex
c697923eb6 Create video_common.c 2015-07-12 05:30:04 +02:00
twinaphex
6bb0d87d87 Rename gl_font_raster_block to gfx_font_raster_block 2015-07-12 04:07:06 +02:00
twinaphex
527c0c29d4 Rename gl_coords to gfx_coords 2015-07-12 03:57:06 +02:00
Alcaro
febcbc5ce4 C89 cleanups part 2 2015-06-26 17:48:43 +02:00
Higor Eurípedes
593e835228 (gl_raster_font) Add early return in gl_raster_font_render_msg() 2015-06-23 14:51:29 -03:00
natinusala
838cf74f42 (gl_raster_font) Fixed the alignment support for line by line drawing
Each line was drawn using the full message's length so the alignment
was broken. I fixed it by adding the message length to get_message_width
so every line has its own length for get_message_width.
2015-06-21 17:24:35 +02:00
Higor Eurípedes
42caab87aa (gl_raster_font.c) Add early return and fix identation in gl_raster_font_render_message 2015-06-14 12:36:29 -03:00
Andre Leiradella
7be1b2b9cf removed memory allocation in gl_raster_font_render_message 2015-06-05 18:14:05 -03:00
natinusala
9b276d80d2 Added line_height for freetype and cleaned up comments 2015-05-30 15:41:47 +02:00
Nathan SALAUN
b756111aac Added the get_line_height to font_renderer_driver_t and a first implementation of it in gl_raster (\n) and bitmapfont 2015-05-27 12:20:31 +02:00
twinaphex
75004e7ece (PS3) Build fixes 2015-05-21 04:43:50 +02:00
Twinaphex
33fc77f221 remove unused variables 2015-05-20 02:41:33 +02:00
twinaphex
0bf3cf97e7 (Font) Refactor font code to no longer use global 2015-05-20 01:48:51 +02:00
Higor Eurípedes
59e0f7221d (gl_raster_font) Fix typo 2015-05-19 15:11:05 -03:00
Higor Eurípedes
dc5460effd (gl_raster_font) Fix invalid read when pushing vertices
Calling both glsl shader->set_coords() or gl_coord_array_add() resulted
in an invalid read when memcpy()ing coords->lut_tex_coord.
2015-05-19 13:45:22 -03:00
natinusala
197a505e4c Adding gl_get_message_width to gl_raster_font 2015-05-16 16:38:13 +02:00
natifion
efd3f7cc58 (Font) Added get_message_width to font_renderer_t 2015-05-16 16:32:16 +02:00
natinusala
d326fe87af Fixed scale with text alignment 2015-05-14 18:16:34 +02:00
twinaphex
a9dee4877e Create set_viewport wrapper function - threaded video mode's
set_viewport function does not work yet
2015-04-26 19:46:59 +02:00
twinaphex
747a58e253 (PS Libdbgfont) Refactor 2015-04-26 05:46:56 +02:00
twinaphex
b6fbf5a335 (Menu) Start getting rid of gl->win_width/gl->win_height and start
creating global->video_data.width and global->video_data.height
which should be used instead in menu drivers
2015-04-26 05:21:43 +02:00
twinaphex
6f84b5dbe5 gl_raster_font_bind_block - block can be NULL 2015-04-25 00:42:47 +02:00
Twinaphex
4c4cdd49c6 (iOS/others) gl_raster_font_get_glyph - prevent a crash when
font driver has not yet been initialized and ident is NULL
2015-04-22 23:38:42 +02:00
twinaphex
20b5fb056f Change signature returntype of get_glyph to const struct font_glyph * 2015-04-22 23:33:43 +02:00
twinaphex
1a390b8779 Cleanup font driver identifier names 2015-04-21 17:17:44 +02:00
twinaphex
ce27f9f887 (Fonts) Cleanups 2015-04-21 17:13:55 +02:00
twinaphex
dd10134e39 (XDK1 Fonts) Rename pFrontBuffer 2015-04-10 10:11:43 +02:00
twinaphex
e282951163 (360) Change #ifndef LSB_FIRST to #ifdef MSB_FIRST 2015-04-10 08:03:34 +02:00
twinaphex
16b7b454a9 Move gl_common.c to gfx/drivers 2015-04-09 04:57:17 +02:00
twinaphex
9e56bd2f23 Rename files back to .cpp 2015-04-04 02:36:55 +02:00
twinaphex
532d112ff8 (Font) Combine font_d3d_driver and font_gl_driver 2015-04-03 20:36:19 +02:00
twinaphex
be7036b489 (gl_raster_font.c) Namespace functions 2015-04-03 03:27:34 +02:00
twinaphex
d84b08ab08 (PS3) Buildfix 2015-04-03 03:23:02 +02:00
twinaphex
2b6986baff (360) Build fixes 2015-04-03 02:41:37 +02:00
twinaphex
96fca83753 (MSVC) Win32 buildfixes 2015-04-03 02:35:37 +02:00
twinaphex
0f6c64e420 Rename xdk360_fonts.cpp 2015-04-03 01:58:52 +02:00
twinaphex
4a8f354fdc Rename d3d_w32_font.cpp to d3d_w32_font.c 2015-04-03 01:53:42 +02:00
Higor Eurípedes
986367cf7d (gl_raster_font.c) Fix block (un)binding 2015-04-02 20:12:32 -03:00
twinaphex
e1f7097341 (d3d_w32_font.cpp) Style nit 2015-04-02 23:16:09 +02:00
twinaphex
ef88957eb1 (driver_font/xdk360_fonts.cpp) Cleanup 2015-04-02 22:23:07 +02:00
Lioncash
f59135359e font: Remove unnecessary null checks
These conditions are checked at the top of the function.
2015-04-02 11:18:14 -04:00
Jean-André Santoni
158c79ed9e (Menu) Improved text alignment for gl menu drivers 2015-03-31 14:00:30 +02:00
twinaphex
7c1d3471f6 (XDK1) Build fixes 2015-03-30 02:10:42 +02:00
twinaphex
2c555082ee D3D and GL now use the same font driver interface 2015-03-30 00:55:39 +02:00
twinaphex
66198fffb6 Update init signature 2015-03-30 00:48:43 +02:00
twinaphex
c849c6bcdf (D3D) Prepare d3d driver for font changes 2015-03-30 00:46:56 +02:00
twinaphex
fbb84ba4b6 (D3D) Start changing init functions of d3d font drivers 2015-03-30 00:41:42 +02:00
twinaphex
ff57f65841 (D3D Font) Build fixes 2015-03-30 00:32:14 +02:00
twinaphex
172ded89b9 (D3D Fonts) Start allocating and freeing structs 2015-03-30 00:29:02 +02:00
twinaphex
4bc4837d95 (D3D) Move font_color variable to d3d_w32_font.cpp 2015-03-29 23:12:05 +02:00
twinaphex
294a0b08e3 Make d3d_font_renderer_t more like gl_font_renderer_t 2015-03-29 22:37:52 +02:00
twinaphex
f3e5ed9854 Change signature of get_glyph 2015-03-29 22:36:30 +02:00
twinaphex
0443624ee2 Fix gl_raster_font.c 2015-03-29 22:28:17 +02:00
twinaphex
1dba948f64 Change font_d3d_driver.h 2015-03-29 22:01:52 +02:00
twinaphex
65e812da4c Change signatures of gl font driver callback functions 2015-03-29 21:59:01 +02:00
Higor Eurípedes
b9f40fc1c9 (XMB) Fix raster block usage 2015-03-27 16:15:54 -03:00
Higor Eurípedes
2115e806a7 (GLUI) Fix fullscreen rendering 2015-03-26 14:07:39 -03:00
Twinaphex
b671d96e20 Remove some unused variables 2015-03-25 18:26:11 +01:00
Higor Eurípedes
8fc5818130 (GLUI,XMB) Fix OSD 2015-03-25 13:42:34 -03:00
Higor Eurípedes
d3d976c92b (GLUI) Only update text vertices when needed 2015-03-25 13:04:54 -03:00
Higor Eurípedes
8b7bbc7975 (gl_font_renderer_t) Implement swappable blocks and remove end_block pointer 2015-03-25 13:04:53 -03:00
Higor Eurípedes
ed6f1cfdd3 (gl_raster_font) Make use of gl_coord_array_t 2015-03-25 13:04:53 -03:00
Higor Eurípedes
7d1bffc350 (gl_font_renderer_t) Implement block flushing 2015-03-25 13:04:53 -03:00
Higor Eurípedes
8f0302c519 (gl_font_renderer_t) Implement basic text block rendering 2015-03-25 13:04:53 -03:00
Higor Eurípedes
7dc3b7a9be (gl_raster) Extract some functions to improve clarity 2015-03-25 13:04:53 -03:00
twinaphex
f130b00596 Updates pt. 3 2015-03-20 22:08:36 +01:00
Jean-André Santoni
f130a59ab2 (XMB) Align datetime to the right 2015-01-23 01:54:31 +01:00
twinaphex
80d4de7c3f Add gfx/video_viewport.c/viewport.h 2015-01-18 23:59:57 +01:00
twinaphex
dbeb06aec6 Reupload font drivers at new location gfx/drivers_font 2015-01-12 23:38:39 +01:00