Skip to content

CompressonatorSDK does not allow passing user params to CMP_Feedback_Proc #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
krolli opened this issue Dec 9, 2024 · 0 comments
Open

Comments

@krolli
Copy link

krolli commented Dec 9, 2024

CompressonatorSDK feedback procedure CMP_Feedback_Proc declares two user parameters, pUser1 and pUser2.

typedef bool(CMP_API* CMP_Feedback_Proc)(CMP_FLOAT fProgress, CMP_DWORD_PTR pUser1, CMP_DWORD_PTR pUser2);

However, there does not appear to be a way for user to pass values for those parameters along with feedback procedure pointer. Feedback procedure is passed to following functions:

CMP_ERROR CMP_API CMP_ConvertTexture(CMP_Texture* pSourceTexture,
CMP_Texture* pDestTexture,
const CMP_CompressOptions* pOptions,
CMP_Feedback_Proc pFeedbackProc);

CMP_ERROR CMP_API CMP_ConvertMipTexture(CMP_MipSet* p_MipSetIn, CMP_MipSet* p_MipSetOut, const CMP_CompressOptions* pOptions, CMP_Feedback_Proc pFeedbackProc);

CMP_ERROR CMP_API CMP_ProcessTexture(CMP_MipSet* srcMipSet, CMP_MipSet* dstMipSet, KernelOptions kernelOptions, CMP_Feedback_Proc pFeedbackProc);
CMP_ERROR CMP_API CMP_CompressTexture(KernelOptions* options, CMP_MipSet srcMipSet, CMP_MipSet dstMipSet, CMP_Feedback_Proc pFeedback);

None of them accept two user parameters that would be passed over to feedback procedure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant