GL CHOCO ENGINE
Loading...
Searching...
No Matches
context.h File Reference

renderer_backend内部情報管理構造体のリソース管理APIを提供する More...

Include dependency graph for context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct renderer_backend_context renderer_backend_context_t
 

Functions

renderer_result_t renderer_backend_initialize (linear_alloc_t *allocator_, target_graphics_api_t target_api_, renderer_backend_context_t **out_renderer_backend_context_)
 レンダラーバックエンドのメモリを確保し、初期化を行う
 
void renderer_backend_destroy (renderer_backend_context_t *renderer_backend_context_)
 レンダラーバックエンドの終了処理を行う
 

Detailed Description

renderer_backend内部情報管理構造体のリソース管理APIを提供する

Author
chocolate-pie24
Version
0.1
Date
2026-02-23
License
MIT License. See LICENSE file in the project root for full license text.

Typedef Documentation

◆ renderer_backend_context_t

renderer_backend_context内部情報管理構造体前方宣言

Function Documentation

◆ renderer_backend_destroy()

void renderer_backend_destroy ( renderer_backend_context_t renderer_backend_context_)

レンダラーバックエンドの終了処理を行う

Note
レンダラーバックエンドはサブシステムであり、リニアアロケータでメモリを確保する。 リニアアロケータは個別のメモリ開放は不可のため、このAPIではメモリの解放は行わない。
使用API別の具体的な処理内容
  • OpenGL3.3: 何もしない
Parameters
renderer_backend_context_終了処理対象レンダラーバックエンド構造体インスタンスへのポインタ

◆ renderer_backend_initialize()

renderer_result_t renderer_backend_initialize ( linear_alloc_t allocator_,
target_graphics_api_t  target_api_,
renderer_backend_context_t **  out_renderer_backend_context_ 
)

レンダラーバックエンドのメモリを確保し、初期化を行う

Parameters
allocator_メモリ確保用リニアアロケータ
target_api_使用するグラフィックスAPI
out_renderer_backend_context_レンダラーバックエンド内部情報管理構造体インスタンスへのダブルポインタ
Return values
RENDERER_INVALID_ARGUMENT以下のいずれか
  • allocator_ == NULL
  • out_renderer_backend_context_ == NULL
  • *out_renderer_backend_context_ != NULL
  • target_api_が既定値外
RENDERER_NO_MEMORYメモリ確保失敗
RENDERER_RUNTIME_ERROR以下のいずれか
  • シェーダー用vtable取得失敗
  • VAO用vtable取得失敗
  • VBO用vtable取得失敗
RENDERER_SUCCESS処理に成功し、正常終了