Then, whenever I receive the mouse movement events I do the following to ignore the movement event caused by calling SDL_WarpMouseInWindow:
int32_t deltaW = mouseInfo.xCur;
deltaW -= mouseInfo.xPrev;
deltaW -= mouseDeltaAccum;
int32_t deltaH = mouseInfo.yCur;
deltaH -= mouseInfo.yPrev;
deltaH -= mouseDeltaAccum;
HandleMouseMovement( deltaW, deltaH );
//warp back to the position where the mouse is "locked"
//and add that movement into the accumulator so it can be ignored later
SDL_WarpMouseInWindow( mainWindow, mouseLock, mouseLock );
mouseDeltaAccum = mouseLock - mouseInfo.xCur;
mouseDeltaAccum = mouseLock - mouseInfo.yCur;
It is expected that it's confined to the window, but SDL_SetWindowGrab is supposed to keep generating mouse movement deltas even when it is confined along the edge of the window. So the user wouldn't see the mouse moving to the right outside of the window but your code would still get a deltaX in a rightwards direction. Anyway, this is still bogging me down so if you or anyone else has additional ideas, let me know!
I'll post if/when I eventually do find a solution, but as I said it's weird that I'm having problems here. I must be missing something kind of obvious...
So, then to clarify your answer is what I was wanting to do just not possible specifically the way I was thinking of it?
i.e. Say I have a Vertex Array with two possible sets of vertices stored, respectively, in vboID and vboID_2. Is it not possible to swap between those vertex arrays as inputs to my vertex shader without re-calling glBufferData?
What I was envisioning is something like:
Hey, GPU, here is one set of vertices. Save them in Vertex Buffer 'vboID'
Hey, GPU, here is another set of vertices. Save them in Vertex Buffer 'vboID_2'
Then at runtime, depending on conditional logic just swap which buffer is feeding into my shader here:
ok. Actually after making hte GL_TEXTURE_BUFFER -> GL_TEXTURE_2D change shadow maps are totally working! Woo! The other thing that was going on, for the curious, is that I had the Z-Clip plane on my orthographic transform for the depth-writing pass set WAY to high so I was washing out the signal with much too far a clip plane. Basically losing important resolution on my floating point depth value since I was brute forcing a clip from [0 .. FLT_MAX]. Setting the far clip plane to just beyond my scene makes it all happy.