Skip to content

Conversation

@rudrabeniwal
Copy link
Collaborator

Window Management Details

Core Components

  1. Window Interface:

    • Defines the basic operations for windows, such as resizing, showing, hiding, and checking properties like focus and size.
  2. WindowConfig:

    • Used to configure windows with options like width, height, title, fullscreen mode, and platform-specific hints.
  3. WindowSystem Interface:

    • Manages the overall system for windows, including creating, destroying, and polling events (e.g., key presses, resizing).
  4. WindowEvents:

    • Defines all the events related to windows, such as resizing, moving, key presses, and mouse clicks.

GLFW-Specific Components

  1. GLFWWindow:

    • Implements the Window interface using GLFW. Handles window-specific operations like resizing and input events.
  2. GLFWWindowSystem:

    • Implements the WindowSystem interface using GLFW. Manages the lifecycle of windows and integrates Vulkan support.

WindowManager

The WindowManager is a higher-level class that simplifies working with windows. It acts as a wrapper around the WindowSystem and provides methods to:

  • Initialize the window system.
  • Create and manage windows.
  • Handle events like resizing, key presses, and mouse interactions.

Example

The WindowSystemExample file shows how to use the WindowManager to create windows and respond to events like resizing or key presses.

@rudrabeniwal rudrabeniwal requested a review from szymon-rd June 18, 2025 07:23
var running = true
var frameCount = 0

while (running && !window.shouldClose) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have an abstraction over the "game loop", but probably not at this stage. In what part could we put it later on?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe new gameloop or engine-like module

Soleod and others added 2 commits June 20, 2025 10:21
* Added "-feature", "-deprecation", "-unchecked", "-language:implicitConversions" to scalacOptions

Whole code base should now use Scala3 new syntax and significant indents. If anyone sees unnecessary {} that I missed, please get rid of them.
@rudrabeniwal rudrabeniwal force-pushed the cyfra-rtrp branch 2 times, most recently from 2d374c6 to 47ed129 Compare June 30, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants