From beca8798bf91edba954d31eb4e1a619ec2140c83 Mon Sep 17 00:00:00 2001 From: Roz K Date: Sun, 1 Jan 2023 08:09:37 +0100 Subject: [PATCH] Rename create_shader. --- __init__.py | 12 ++++++------ cpp/render.hpp | 2 +- cpp/render/render_opengles.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index fcb86c6..b7d8ea3 100644 --- a/__init__.py +++ b/__init__.py @@ -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 diff --git a/cpp/render.hpp b/cpp/render.hpp index 5bd2abd..34845ef 100644 --- a/cpp/render.hpp +++ b/cpp/render.hpp @@ -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, diff --git a/cpp/render/render_opengles.cpp b/cpp/render/render_opengles.cpp index acd1320..107d6da 100644 --- a/cpp/render/render_opengles.cpp +++ b/cpp/render/render_opengles.cpp @@ -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,