Use lambda to workaround __stdcall issue
This commit is contained in:
parent
bcf996e291
commit
f30962b944
@ -624,11 +624,17 @@ void IrrDriver::initDevice()
|
|||||||
"RecorderConfig is invalid, use the default one.");
|
"RecorderConfig is invalid, use the default one.");
|
||||||
}
|
}
|
||||||
|
|
||||||
ogrRegReadPixelsFunction((ogrFucReadPixels)glReadPixels);
|
ogrRegReadPixelsFunction([]
|
||||||
ogrRegPBOFunctions((ogrFucGenBuffers)glGenBuffers,
|
(int x, int y, int w, int h, unsigned int f, unsigned int t, void* d)
|
||||||
(ogrFucBindBuffer)glBindBuffer, (ogrFucBufferData)glBufferData,
|
{ glReadPixels(x, y, w, h, f, t, d); });
|
||||||
(ogrFucDeleteBuffers)glDeleteBuffers, (ogrFucMapBuffer)glMapBuffer,
|
|
||||||
(ogrFucUnmapBuffer)glUnmapBuffer);
|
ogrRegPBOFunctions([](int n, unsigned int* b) { glGenBuffers(n, b); },
|
||||||
|
[](unsigned int t, unsigned int b) { glBindBuffer(t, b); },
|
||||||
|
[](unsigned int t, ptrdiff_t s, const void* d, unsigned int u)
|
||||||
|
{ glBufferData(t, s, d, u); },
|
||||||
|
[](int n, const unsigned int* b) { glDeleteBuffers(n, b); },
|
||||||
|
[](unsigned int t, unsigned int a) { return glMapBuffer(t, a); },
|
||||||
|
[](unsigned int t) { return glUnmapBuffer(t); });
|
||||||
|
|
||||||
ogrRegGeneralCallback(OGR_CBT_START_RECORDING,
|
ogrRegGeneralCallback(OGR_CBT_START_RECORDING,
|
||||||
[] (void* user_data) { MessageQueue::add
|
[] (void* user_data) { MessageQueue::add
|
||||||
|
@ -167,10 +167,11 @@ typedef void(*ogrFucReadPixels)(int, int, int, int, unsigned int, unsigned int,
|
|||||||
void*);
|
void*);
|
||||||
typedef void(*ogrFucGenBuffers)(int, unsigned int*);
|
typedef void(*ogrFucGenBuffers)(int, unsigned int*);
|
||||||
typedef void(*ogrFucBindBuffer)(unsigned int, unsigned int);
|
typedef void(*ogrFucBindBuffer)(unsigned int, unsigned int);
|
||||||
typedef void(*ogrFucBufferData)(unsigned int, ptrdiff_t, const void*, unsigned int);
|
typedef void(*ogrFucBufferData)(unsigned int, ptrdiff_t, const void*,
|
||||||
|
unsigned int);
|
||||||
typedef void(*ogrFucDeleteBuffers)(int, const unsigned int*);
|
typedef void(*ogrFucDeleteBuffers)(int, const unsigned int*);
|
||||||
typedef void*(*ogrFucMapBuffer)(unsigned int, unsigned int);
|
typedef void*(*ogrFucMapBuffer)(unsigned int, unsigned int);
|
||||||
typedef void(*ogrFucUnmapBuffer)(unsigned int);
|
typedef unsigned char(*ogrFucUnmapBuffer)(unsigned int);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user