opengles3-book icon indicating copy to clipboard operation
opengles3-book copied to clipboard

Logic error in esUtil.h - Easy Fix

Open SirGouki opened this issue 2 years ago • 0 comments

I was typing up esUtil.h on my raspberry pi, and I noticed the following

https://github.com/danginsburg/opengles3-book/blob/423d936e31f5240fb893fcc8ae5549c70efaa2bf/Common/Include/esUtil.h#L184-L185

The function here incorrectly takes in void(ESCALLBACK *drawFunc)(ESContext *, unsigned char, int, int). This should be the following, instead:

void ESUTIL_API esRegisterKeyFunc ( ESContext *esContext, 
                                     void ( ESCALLBACK *keyFunc ) ( ESContext *, unsigned char, int, int ) );

Oddly enough, the documentation comment shows the correct keyFunc parameter: https://github.com/danginsburg/opengles3-book/blob/423d936e31f5240fb893fcc8ae5549c70efaa2bf/Common/Include/esUtil.h#L179-L183

SirGouki avatar Aug 09 '22 10:08 SirGouki