mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-16 15:27:41 +00:00
Document shader_context.c
This commit is contained in:
parent
b243f64554
commit
f259b56d5f
@ -179,7 +179,7 @@ static const gfx_ctx_driver_t *gfx_ctx_init(void *data,
|
||||
* @hw_render_ctx : Request a graphics context driver capable of
|
||||
* hardware rendering?
|
||||
*
|
||||
* Finds first suitable graphics context driver and initializes.
|
||||
* Finds graphics context driver and initializes.
|
||||
*
|
||||
* Returns: graphics context driver if found, otherwise NULL.
|
||||
**/
|
||||
|
@ -35,19 +35,34 @@ static const shader_backend_t *shader_ctx_drivers[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
* shader_ctx_find_driver:
|
||||
* @ident : Identifier of shader context driver to find.
|
||||
*
|
||||
* Finds shader context driver and initializes.
|
||||
*
|
||||
* Returns: shader context driver if found, otherwise NULL.
|
||||
**/
|
||||
const shader_backend_t *shader_ctx_find_driver(const char *ident)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; shader_ctx_drivers[i]; i++)
|
||||
{
|
||||
if (strcmp(shader_ctx_drivers[i]->ident, ident) == 0)
|
||||
if (!strcmp(shader_ctx_drivers[i]->ident, ident))
|
||||
return shader_ctx_drivers[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* shader_ctx_init_first:
|
||||
*
|
||||
* Finds first suitable shader context driver and initializes.
|
||||
*
|
||||
* Returns: shader context driver if found, otherwise NULL.
|
||||
**/
|
||||
const shader_backend_t *shader_ctx_init_first(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -84,8 +84,23 @@ extern const shader_backend_t shader_null_backend;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* shader_ctx_find_driver:
|
||||
* @ident : Identifier of shader context driver to find.
|
||||
*
|
||||
* Finds shader context driver and initializes.
|
||||
*
|
||||
* Returns: shader context driver if found, otherwise NULL.
|
||||
**/
|
||||
const shader_backend_t *shader_ctx_find_driver(const char *ident);
|
||||
|
||||
/**
|
||||
* shader_ctx_init_first:
|
||||
*
|
||||
* Finds first suitable shader context driver and initializes.
|
||||
*
|
||||
* Returns: shader context driver if found, otherwise NULL.
|
||||
**/
|
||||
const shader_backend_t *shader_ctx_init_first(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user