Removed viewChanged callback
Preparation for reworking sync, such a callback would make it hard to find a proper sync point
This commit is contained in:
parent
5b8f09302e
commit
d26aed277c
2 changed files with 0 additions and 22 deletions
|
|
@ -249,7 +249,6 @@ void VulkanExampleBase::nextFrame()
|
||||||
if (viewUpdated)
|
if (viewUpdated)
|
||||||
{
|
{
|
||||||
viewUpdated = false;
|
viewUpdated = false;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render();
|
render();
|
||||||
|
|
@ -410,7 +409,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
}
|
}
|
||||||
if (touchTimer >= 1.0) {
|
if (touchTimer >= 1.0) {
|
||||||
camera.keys.up = true;
|
camera.keys.up = true;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check gamepad state
|
// Check gamepad state
|
||||||
|
|
@ -436,18 +434,10 @@ void VulkanExampleBase::renderLoop()
|
||||||
camera.translate(glm::vec3(0.0f, 0.0f, gamePadState.axisRight.y * 0.01f));
|
camera.translate(glm::vec3(0.0f, 0.0f, gamePadState.axisRight.y * 0.01f));
|
||||||
updateView = true;
|
updateView = true;
|
||||||
}
|
}
|
||||||
if (updateView)
|
|
||||||
{
|
|
||||||
viewChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
updateView = camera.updatePad(gamePadState.axisLeft, gamePadState.axisRight, frameTimer);
|
updateView = camera.updatePad(gamePadState.axisLeft, gamePadState.axisRight, frameTimer);
|
||||||
if (updateView)
|
|
||||||
{
|
|
||||||
viewChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -458,7 +448,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (viewUpdated)
|
if (viewUpdated)
|
||||||
{
|
{
|
||||||
viewUpdated = false;
|
viewUpdated = false;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
render();
|
render();
|
||||||
frameCounter++;
|
frameCounter++;
|
||||||
|
|
@ -495,7 +484,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (viewUpdated)
|
if (viewUpdated)
|
||||||
{
|
{
|
||||||
viewUpdated = false;
|
viewUpdated = false;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
DFBWindowEvent event;
|
DFBWindowEvent event;
|
||||||
while (!event_buffer->GetEvent(event_buffer, DFB_EVENT(&event)))
|
while (!event_buffer->GetEvent(event_buffer, DFB_EVENT(&event)))
|
||||||
|
|
@ -537,7 +525,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (viewUpdated)
|
if (viewUpdated)
|
||||||
{
|
{
|
||||||
viewUpdated = false;
|
viewUpdated = false;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!configured)
|
while (!configured)
|
||||||
|
|
@ -589,7 +576,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (viewUpdated)
|
if (viewUpdated)
|
||||||
{
|
{
|
||||||
viewUpdated = false;
|
viewUpdated = false;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
xcb_generic_event_t *event;
|
xcb_generic_event_t *event;
|
||||||
while ((event = xcb_poll_for_event(connection)))
|
while ((event = xcb_poll_for_event(connection)))
|
||||||
|
|
@ -639,7 +625,6 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (viewUpdated)
|
if (viewUpdated)
|
||||||
{
|
{
|
||||||
viewUpdated = false;
|
viewUpdated = false;
|
||||||
viewChanged();
|
|
||||||
}
|
}
|
||||||
render();
|
render();
|
||||||
frameCounter++;
|
frameCounter++;
|
||||||
|
|
@ -1472,8 +1457,6 @@ int32_t VulkanExampleBase::handleAppInput(struct android_app* app, AInputEvent*
|
||||||
vulkanExample->camera.rotate(glm::vec3(deltaX, 0.0f, 0.0f));
|
vulkanExample->camera.rotate(glm::vec3(deltaX, 0.0f, 0.0f));
|
||||||
vulkanExample->camera.rotate(glm::vec3(0.0f, -deltaY, 0.0f));
|
vulkanExample->camera.rotate(glm::vec3(0.0f, -deltaY, 0.0f));
|
||||||
|
|
||||||
vulkanExample->viewChanged();
|
|
||||||
|
|
||||||
vulkanExample->touchPos.x = eventX;
|
vulkanExample->touchPos.x = eventX;
|
||||||
vulkanExample->touchPos.y = eventY;
|
vulkanExample->touchPos.y = eventY;
|
||||||
}
|
}
|
||||||
|
|
@ -2970,8 +2953,6 @@ void VulkanExampleBase::setupWindow()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void VulkanExampleBase::viewChanged() {}
|
|
||||||
|
|
||||||
void VulkanExampleBase::keyPressed(uint32_t) {}
|
void VulkanExampleBase::keyPressed(uint32_t) {}
|
||||||
|
|
||||||
void VulkanExampleBase::mouseMoved(double x, double y, bool & handled) {}
|
void VulkanExampleBase::mouseMoved(double x, double y, bool & handled) {}
|
||||||
|
|
@ -3193,7 +3174,6 @@ void VulkanExampleBase::windowResize()
|
||||||
|
|
||||||
// Notify derived class
|
// Notify derived class
|
||||||
windowResized();
|
windowResized();
|
||||||
viewChanged();
|
|
||||||
|
|
||||||
prepared = true;
|
prepared = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -358,8 +358,6 @@ public:
|
||||||
virtual VkResult createInstance(bool enableValidation);
|
virtual VkResult createInstance(bool enableValidation);
|
||||||
/** @brief (Pure virtual) Render function to be implemented by the sample application */
|
/** @brief (Pure virtual) Render function to be implemented by the sample application */
|
||||||
virtual void render() = 0;
|
virtual void render() = 0;
|
||||||
/** @brief (Virtual) Called when the camera view has changed */
|
|
||||||
virtual void viewChanged();
|
|
||||||
/** @brief (Virtual) Called after a key was pressed, can be used to do custom key handling */
|
/** @brief (Virtual) Called after a key was pressed, can be used to do custom key handling */
|
||||||
virtual void keyPressed(uint32_t);
|
virtual void keyPressed(uint32_t);
|
||||||
/** @brief (Virtual) Called after the mouse cursor moved and before internal events (like camera rotation) is handled */
|
/** @brief (Virtual) Called after the mouse cursor moved and before internal events (like camera rotation) is handled */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue