Rename create_shader.

This commit is contained in:
Roz K 2023-01-01 08:09:37 +01:00
parent e80bbe2418
commit beca8798bf
Signed by: roz
GPG Key ID: 51FBF4E483E1C822
3 changed files with 8 additions and 8 deletions

View File

@ -306,23 +306,23 @@ render_initialize.argtypes = (
render_terminate = _engine.rk_render_terminate
render_terminate.restype = None
_load_shader = _engine.rk_load_shader
_load_shader.restype = _handle
_load_shader.errcheck = _check_handle
_load_shader.argtypes = (
_create_shader = _engine.rk_create_shader
_create_shader.restype = _handle
_create_shader.errcheck = _check_handle
_create_shader.argtypes = (
ctypes.c_uint, # vert_nlines
ctypes.POINTER(ctypes.c_char_p), # vert_lines
ctypes.c_uint, # frag_nlines
ctypes.POINTER(ctypes.c_char_p)) # frag_lines
def load_shader(vert_lines, frag_lines):
def create_shader(vert_lines, frag_lines):
vert_nlines = len(vert_lines)
vert_type = ctypes.c_char_p * vert_nlines
vert_lines = vert_type(*map(ctypes.c_char_p, vert_lines))
frag_nlines = len(frag_lines)
frag_type = ctypes.c_char_p * frag_nlines
frag_lines = frag_type(*map(ctypes.c_char_p, frag_lines))
return _load_shader(vert_nlines, vert_lines, frag_nlines, frag_lines)
return _create_shader(vert_nlines, vert_lines, frag_nlines, frag_lines)
resolve_input = _engine.rk_resolve_input
resolve_input.restype = _handle

View File

@ -85,7 +85,7 @@ RK_EXPORT void rk_render_initialize(
RK_EXPORT void rk_render_terminate();
RK_EXPORT rk_shader_t rk_load_shader(
RK_EXPORT rk_shader_t rk_create_shader(
rk_uint const vert_nlines,
char const ** const vert_lines,
rk_uint const frag_nlines,

View File

@ -112,7 +112,7 @@ static void rk_print_program_infolog(GLuint program) {
}
}
rk_shader_t rk_load_shader(
rk_shader_t rk_create_shader(
rk_uint const vert_nlines,
char const ** const vert_lines,
rk_uint const frag_nlines,