Add set_param_mat3.
This commit is contained in:
		@ -365,6 +365,11 @@ set_param_vec3.argtypes = (
 | 
				
			|||||||
    ctypes.c_uint, # layout
 | 
					    ctypes.c_uint, # layout
 | 
				
			||||||
    _vec3_p) # value
 | 
					    _vec3_p) # value
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set_param_mat3 = _engine.rk_set_param_mat3
 | 
				
			||||||
 | 
					set_param_mat3.argtypes = (
 | 
				
			||||||
 | 
					    ctypes.c_uint, # layout
 | 
				
			||||||
 | 
					    _mat3_p) # value
 | 
				
			||||||
 | 
					
 | 
				
			||||||
select_texture = _engine.rk_select_texture
 | 
					select_texture = _engine.rk_select_texture
 | 
				
			||||||
select_texture.argtypes = (
 | 
					select_texture.argtypes = (
 | 
				
			||||||
    ctypes.c_uint, # slot
 | 
					    ctypes.c_uint, # slot
 | 
				
			||||||
 | 
				
			|||||||
@ -147,6 +147,10 @@ RK_EXPORT void rk_set_param_vec3(
 | 
				
			|||||||
    rk_param_t param,
 | 
					    rk_param_t param,
 | 
				
			||||||
    rk_vec3 const & value);
 | 
					    rk_vec3 const & value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RK_EXPORT void rk_set_param_mat3(
 | 
				
			||||||
 | 
					    rk_param_t param,
 | 
				
			||||||
 | 
					    rk_mat3 const & value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RK_EXPORT void rk_select_texture(
 | 
					RK_EXPORT void rk_select_texture(
 | 
				
			||||||
    rk_uint slot,
 | 
					    rk_uint slot,
 | 
				
			||||||
    rk_texture_t texture,
 | 
					    rk_texture_t texture,
 | 
				
			||||||
 | 
				
			|||||||
@ -569,6 +569,17 @@ void rk_set_param_vec3(
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void rk_set_param_mat3(
 | 
				
			||||||
 | 
					    rk_param_t _param,
 | 
				
			||||||
 | 
					    rk_mat3 const & value) {
 | 
				
			||||||
 | 
					    GLint const param = reinterpret_cast<intptr_t>(_param) - 1;
 | 
				
			||||||
 | 
					    if (rk_current_shader && param > -1) {
 | 
				
			||||||
 | 
					        glVertexAttrib3fv(param + 0, glm::value_ptr(value[0]));
 | 
				
			||||||
 | 
					        glVertexAttrib3fv(param + 1, glm::value_ptr(value[1]));
 | 
				
			||||||
 | 
					        glVertexAttrib3fv(param + 2, glm::value_ptr(value[2]));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void rk_select_texture(
 | 
					void rk_select_texture(
 | 
				
			||||||
    rk_uint slot,
 | 
					    rk_uint slot,
 | 
				
			||||||
    rk_texture_t _texture,
 | 
					    rk_texture_t _texture,
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user