You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far just SDL and NanoVG renderers exist. I would like to also have an OpenGL renderer (granted NanoVG somewhat covers that already). After this is added, eventually I'll be able to add Signed Distance Field features to the font, but those features will be ignored / unused in the SDL and NanoVG renderers.
To create a new renderer for OpenGL, look at renderer_nanovg for clues on what to do. You derive from renderer_base and make sure these functions are overridden (the top three being the most important):
on_create_image
on_destroy_image
on_draw_image
on_draw_line
on_draw_rect
on_fill_rect
If you do not implement on_draw_line, on_draw_rect, and on_fill_rect, be sure to still override those functions, but not do anything within them. The disadvantage is if I implement a feature that needs them (glyph backgrounds, underlined, or strikeout) then that feature just will not render.
The text was updated successfully, but these errors were encountered:
This might also mean adding an example_opengl.cpp source file testing this renderer in the /examples folder. This file would likely be nearly identical to the example_nanovg.cpp file that already exists since NanoVG is already utilizing OpenGL.
So far just SDL and NanoVG renderers exist. I would like to also have an OpenGL renderer (granted NanoVG somewhat covers that already). After this is added, eventually I'll be able to add Signed Distance Field features to the font, but those features will be ignored / unused in the SDL and NanoVG renderers.
To create a new renderer for OpenGL, look at renderer_nanovg for clues on what to do. You derive from renderer_base and make sure these functions are overridden (the top three being the most important):
If you do not implement on_draw_line, on_draw_rect, and on_fill_rect, be sure to still override those functions, but not do anything within them. The disadvantage is if I implement a feature that needs them (glyph backgrounds, underlined, or strikeout) then that feature just will not render.
The text was updated successfully, but these errors were encountered: