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:
yoyofr
2025-11-19 11:00:54 +01:00
committed by Kai Blaschke
parent d3734dc4c3
commit 15a083751d
6 changed files with 68 additions and 2 deletions

View File

@ -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);