private void StoreCallbacks() { _errorCallback = OnGlfwError; _charCallback = OnGlfwChar; _cursorPosCallback = OnGlfwCursorPos; _keyCallback = OnGlfwKey; _mouseButtonCallback = OnGlfwMouseButton; _scrollCallback = OnGlfwScroll; _windowCloseCallback = OnGlfwWindowClose; _windowSizeCallback = OnGlfwWindowSize; _windowContentScaleCallback = OnGlfwWindownContentScale; }
protected override void OnLoad() { base.OnLoad(); VSync = _pendingInitializationParameters.VSync; if (_pendingInitializationParameters.FullscreenState == FullscreenState.Fullscreen) { WindowState = WindowState.Fullscreen; } unsafe { _glfwCharCallback = GLFW_CharCallback; GLFW.SetCharCallback(this.WindowPtr, _glfwCharCallback); } _game.OnBeforeRun(this); }
/// <inheritdoc /> public abstract unsafe GLFWCallbacks.CharCallback SetCharCallback(Window *window, GLFWCallbacks.CharCallback callback);
public static extern IntPtr glfwSetCharCallback(Window *window, GLFWCallbacks.CharCallback callback);