Remove begin_frame and end_frame, add clear_buffer.
This commit is contained in:
parent
ae3333e22e
commit
e80bbe2418
11
__init__.py
11
__init__.py
@ -385,8 +385,12 @@ create_batch.argtypes = (
|
|||||||
ctypes.c_uint, # max_meshes
|
ctypes.c_uint, # max_meshes
|
||||||
ctypes.c_char_p) # params_format
|
ctypes.c_char_p) # params_format
|
||||||
|
|
||||||
begin_frame = _engine.rk_begin_frame
|
clear_buffer = _engine.rk_clear_buffer
|
||||||
begin_frame.restype = None
|
clear_buffer.restype = None
|
||||||
|
clear_buffer.argtypes = (
|
||||||
|
ctypes.c_bool, # pixels
|
||||||
|
ctypes.c_bool, # depth
|
||||||
|
ctypes.c_bool) # stencil
|
||||||
|
|
||||||
select_shader = _engine.rk_select_shader
|
select_shader = _engine.rk_select_shader
|
||||||
select_shader.restype = None
|
select_shader.restype = None
|
||||||
@ -460,9 +464,6 @@ unselect_shader.restype = None
|
|||||||
unselect_shader.argtypes = (
|
unselect_shader.argtypes = (
|
||||||
ctypes.c_void_p,) # shader
|
ctypes.c_void_p,) # shader
|
||||||
|
|
||||||
end_frame = _engine.rk_end_frame
|
|
||||||
end_frame.restype = None
|
|
||||||
|
|
||||||
destroy_batch = _engine.rk_destroy_batch
|
destroy_batch = _engine.rk_destroy_batch
|
||||||
destroy_batch.restype = None
|
destroy_batch.restype = None
|
||||||
destroy_batch.argtypes = (
|
destroy_batch.argtypes = (
|
||||||
|
@ -124,7 +124,10 @@ RK_EXPORT rk_batch_t rk_create_batch(
|
|||||||
rk_uint max_meshes,
|
rk_uint max_meshes,
|
||||||
rk_param_format const * params_format);
|
rk_param_format const * params_format);
|
||||||
|
|
||||||
RK_EXPORT void rk_begin_frame();
|
RK_EXPORT void rk_clear_buffer(
|
||||||
|
rk_bool pixels,
|
||||||
|
rk_bool depth,
|
||||||
|
rk_bool stencil);
|
||||||
|
|
||||||
RK_EXPORT void rk_select_shader(
|
RK_EXPORT void rk_select_shader(
|
||||||
rk_shader_t _shader);
|
rk_shader_t _shader);
|
||||||
@ -174,8 +177,6 @@ RK_EXPORT void rk_unselect_texture(
|
|||||||
RK_EXPORT void rk_unselect_shader(
|
RK_EXPORT void rk_unselect_shader(
|
||||||
rk_shader_t shader);
|
rk_shader_t shader);
|
||||||
|
|
||||||
RK_EXPORT void rk_end_frame();
|
|
||||||
|
|
||||||
RK_EXPORT void rk_destroy_batch(
|
RK_EXPORT void rk_destroy_batch(
|
||||||
rk_batch_t batch);
|
rk_batch_t batch);
|
||||||
|
|
||||||
|
@ -676,8 +676,11 @@ rk_batch_t rk_create_batch(
|
|||||||
return reinterpret_cast<rk_batch_t>(batch);
|
return reinterpret_cast<rk_batch_t>(batch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rk_begin_frame() {
|
void rk_clear_buffer(
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
rk_bool pixels,
|
||||||
|
rk_bool depth,
|
||||||
|
rk_bool stencil) {
|
||||||
|
glClear((GL_COLOR_BUFFER_BIT * pixels) | (GL_DEPTH_BUFFER_BIT * depth) | (GL_STENCIL_BUFFER_BIT * stencil));
|
||||||
}
|
}
|
||||||
|
|
||||||
void rk_select_shader(
|
void rk_select_shader(
|
||||||
@ -908,9 +911,6 @@ void rk_unselect_shader(
|
|||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rk_end_frame() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void rk_destroy_batch(
|
void rk_destroy_batch(
|
||||||
rk_batch_t _batch) {
|
rk_batch_t _batch) {
|
||||||
rk_batch * const batch = reinterpret_cast<rk_batch *>(_batch);
|
rk_batch * const batch = reinterpret_cast<rk_batch *>(_batch);
|
||||||
|
Loading…
Reference in New Issue
Block a user