i have this code :
while (!glfwWindowShouldClose(window))
{
/* Render here */
m_rend->Render();
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll for and process events */
glfwPollEvents();
if (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_1) == GLFW_PRESS)
{
m_rend->mousePressed();
}
if (glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_1) == GLFW_RELEASE)
{
m_rend->mouseReleased();
}
}
I use glfw
but the release event starts immediatily after press the mouse button:
1)press the button
2)mousepressed is down
3)after 1 sec mouse button is released and i continue to push the button.
I tried with this poll mode and callback but the result is the same .
where i wrong?