Rename create_shader.
This commit is contained in:
parent
e80bbe2418
commit
beca8798bf
12
__init__.py
12
__init__.py
@ -306,23 +306,23 @@ render_initialize.argtypes = (
|
|||||||
render_terminate = _engine.rk_render_terminate
|
render_terminate = _engine.rk_render_terminate
|
||||||
render_terminate.restype = None
|
render_terminate.restype = None
|
||||||
|
|
||||||
_load_shader = _engine.rk_load_shader
|
_create_shader = _engine.rk_create_shader
|
||||||
_load_shader.restype = _handle
|
_create_shader.restype = _handle
|
||||||
_load_shader.errcheck = _check_handle
|
_create_shader.errcheck = _check_handle
|
||||||
_load_shader.argtypes = (
|
_create_shader.argtypes = (
|
||||||
ctypes.c_uint, # vert_nlines
|
ctypes.c_uint, # vert_nlines
|
||||||
ctypes.POINTER(ctypes.c_char_p), # vert_lines
|
ctypes.POINTER(ctypes.c_char_p), # vert_lines
|
||||||
ctypes.c_uint, # frag_nlines
|
ctypes.c_uint, # frag_nlines
|
||||||
ctypes.POINTER(ctypes.c_char_p)) # frag_lines
|
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_nlines = len(vert_lines)
|
||||||
vert_type = ctypes.c_char_p * vert_nlines
|
vert_type = ctypes.c_char_p * vert_nlines
|
||||||
vert_lines = vert_type(*map(ctypes.c_char_p, vert_lines))
|
vert_lines = vert_type(*map(ctypes.c_char_p, vert_lines))
|
||||||
frag_nlines = len(frag_lines)
|
frag_nlines = len(frag_lines)
|
||||||
frag_type = ctypes.c_char_p * frag_nlines
|
frag_type = ctypes.c_char_p * frag_nlines
|
||||||
frag_lines = frag_type(*map(ctypes.c_char_p, frag_lines))
|
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 = _engine.rk_resolve_input
|
||||||
resolve_input.restype = _handle
|
resolve_input.restype = _handle
|
||||||
|
@ -85,7 +85,7 @@ RK_EXPORT void rk_render_initialize(
|
|||||||
|
|
||||||
RK_EXPORT void rk_render_terminate();
|
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,
|
rk_uint const vert_nlines,
|
||||||
char const ** const vert_lines,
|
char const ** const vert_lines,
|
||||||
rk_uint const frag_nlines,
|
rk_uint const frag_nlines,
|
||||||
|
@ -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,
|
rk_uint const vert_nlines,
|
||||||
char const ** const vert_lines,
|
char const ** const vert_lines,
|
||||||
rk_uint const frag_nlines,
|
rk_uint const frag_nlines,
|
||||||
|
Loading…
Reference in New Issue
Block a user