vxKernel/include/vhex/display.h

49 lines
897 B
C
Raw Normal View History

#ifndef __VHEX_DISPLAY__
# define __VHEX_DISPLAY__
#include <vhex/defs/types.h>
#include <vhex/display/types.h>
#include <vhex/display/draw.h>
#include <vhex/display/color.h>
#include <vhex/display/text.h>
//#include <vhex/display/image.h>
#include <vhex/display/stack.h>
//TODO: doc
VxKernel 0.6.0-4 : Support the text API @add <> src/modules/display/text/dascii | proof-of-concept of "one-char" drawing API (used for kernel debug) <> src/modules/fs | empty File System module used to expose some primitives used by the libc: | write(), read(), lseek() and close() which there have been removed from the | `fxlibc` project which used an old / deprecated ABI/sycall interface that | doesn't exist in this version of Vhex @update <> include/display/draw/pixel | remove the display ID returned by dpixel(). All primitives that support | shaders must provide explicit API. This to allow fast-optimized API and | polyvalence API for shadering which impact the performance <> src/modules/display/dclear | isolate tree level for this primitive: | - kernel : direct fragment drawing primitive (by-pass dstack) | - dstack : dstack drawing primitive | - user : user drawing primitive (dstack-API) | invalidate automatically the dstack each time the primitive (user-level) is | involved <> src/modules/display/dstack | isolate the dstack invalidate part in a specific primitive @fix <> make/Makefile | proper support of the OpenLibm header path <> src/drivers/screen/r61524 | proper support of the last data fragment size. This caused an override on | the first X line of the screen <> src/modules/display/dstack | fix a crash when the number of action is full | fix a crash with the default index used for action cache | fix a crash with the default index used for shader cache | fix action initialization | fix action quit primitive <> src/modules/display/text/dfont | fix the character drawing algorithm | proper support of the character drawing color (foreground/background) | fix the kernel-level primitive used to display a Unicode string <> src/modules/display/text/dtext | fix a crash with the internal index counter | fix a crash in the internal cache | fix the quit function
2022-06-10 21:28:51 +02:00
//---
// User-level API
//---
/* dclear(): Fill the screen with a single color */
extern did_t dclear(int color);
/* dupdate(): Generate the display frame on the screen */
extern void dupdate(void);
/* dwidth(): get the screen width */
VINLINE size_t dwidth(void)
{
return dstack_display_width();
}
/* dheight(): get the heigth of the screen */
VINLINE size_t dheight(void)
{
return dstack_display_height();
}
//---
VxKernel 0.6.0-4 : Support the text API @add <> src/modules/display/text/dascii | proof-of-concept of "one-char" drawing API (used for kernel debug) <> src/modules/fs | empty File System module used to expose some primitives used by the libc: | write(), read(), lseek() and close() which there have been removed from the | `fxlibc` project which used an old / deprecated ABI/sycall interface that | doesn't exist in this version of Vhex @update <> include/display/draw/pixel | remove the display ID returned by dpixel(). All primitives that support | shaders must provide explicit API. This to allow fast-optimized API and | polyvalence API for shadering which impact the performance <> src/modules/display/dclear | isolate tree level for this primitive: | - kernel : direct fragment drawing primitive (by-pass dstack) | - dstack : dstack drawing primitive | - user : user drawing primitive (dstack-API) | invalidate automatically the dstack each time the primitive (user-level) is | involved <> src/modules/display/dstack | isolate the dstack invalidate part in a specific primitive @fix <> make/Makefile | proper support of the OpenLibm header path <> src/drivers/screen/r61524 | proper support of the last data fragment size. This caused an override on | the first X line of the screen <> src/modules/display/dstack | fix a crash when the number of action is full | fix a crash with the default index used for action cache | fix a crash with the default index used for shader cache | fix action initialization | fix action quit primitive <> src/modules/display/text/dfont | fix the character drawing algorithm | proper support of the character drawing color (foreground/background) | fix the kernel-level primitive used to display a Unicode string <> src/modules/display/text/dtext | fix a crash with the internal index counter | fix a crash in the internal cache | fix the quit function
2022-06-10 21:28:51 +02:00
// Kernel-level API (move me ?)
//---
VxKernel 0.6.0-4 : Support the text API @add <> src/modules/display/text/dascii | proof-of-concept of "one-char" drawing API (used for kernel debug) <> src/modules/fs | empty File System module used to expose some primitives used by the libc: | write(), read(), lseek() and close() which there have been removed from the | `fxlibc` project which used an old / deprecated ABI/sycall interface that | doesn't exist in this version of Vhex @update <> include/display/draw/pixel | remove the display ID returned by dpixel(). All primitives that support | shaders must provide explicit API. This to allow fast-optimized API and | polyvalence API for shadering which impact the performance <> src/modules/display/dclear | isolate tree level for this primitive: | - kernel : direct fragment drawing primitive (by-pass dstack) | - dstack : dstack drawing primitive | - user : user drawing primitive (dstack-API) | invalidate automatically the dstack each time the primitive (user-level) is | involved <> src/modules/display/dstack | isolate the dstack invalidate part in a specific primitive @fix <> make/Makefile | proper support of the OpenLibm header path <> src/drivers/screen/r61524 | proper support of the last data fragment size. This caused an override on | the first X line of the screen <> src/modules/display/dstack | fix a crash when the number of action is full | fix a crash with the default index used for action cache | fix a crash with the default index used for shader cache | fix action initialization | fix action quit primitive <> src/modules/display/text/dfont | fix the character drawing algorithm | proper support of the character drawing color (foreground/background) | fix the kernel-level primitive used to display a Unicode string <> src/modules/display/text/dtext | fix a crash with the internal index counter | fix a crash in the internal cache | fix the quit function
2022-06-10 21:28:51 +02:00
/* dclear_render() : internal pipeline drawing */
extern void dclear_render(dsurface_t *surface, uint32_t color);
#endif /*__VHEX_DISPLAY__*/