mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-04-25 07:54:46 +00:00
Set warp texel offset to 0 by default, as 0.5 introduces a drift.
Since this might be vendor-specific behavior, a new API function to configure the X/Y texel offsets has been added. Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
This commit is contained in:
@ -273,6 +273,18 @@ void projectm_get_mesh_size(projectm_handle instance, size_t* width, size_t* hei
|
||||
*height = static_cast<size_t>(h);
|
||||
}
|
||||
|
||||
void projectm_set_texel_offset(projectm_handle instance, float offset_X, float offset_y)
|
||||
{
|
||||
auto projectMInstance = handle_to_instance(instance);
|
||||
projectMInstance->SetTexelOffsets(offset_X, offset_y);
|
||||
}
|
||||
|
||||
void projectm_get_texel_offset(projectm_handle instance, float* offset_X, float* offset_y)
|
||||
{
|
||||
auto projectMInstance = handle_to_instance(instance);
|
||||
projectMInstance->TexelOffsets(*offset_X, *offset_y);
|
||||
}
|
||||
|
||||
void projectm_set_mesh_size(projectm_handle instance, size_t width, size_t height)
|
||||
{
|
||||
auto projectMInstance = handle_to_instance(instance);
|
||||
|
||||
Reference in New Issue
Block a user