EAGL.Examples.LearnOpenGL.GettingStarted.HelloWindow (eagl v0.3.0)

View Source

LearnOpenGL 1.1 - Hello Window

This example demonstrates basic window creation and OpenGL context setup. It corresponds to the first rendering example in the LearnOpenGL tutorial series.

Original C++ Source

This example is based on the original LearnOpenGL C++ tutorial: https://github.com/JoeyDeVries/LearnOpenGL/tree/master/src/1.getting_started/1.1.hello_window

Framework Adaptation Notes

In the original LearnOpenGL C++ tutorial, this example shows a completely black window because no clearing is performed in the render loop. However, EAGL's Window framework automatically handles basic OpenGL setup including an initial clear for clean state.

To maintain the pedagogical value while working within EAGL's design:

  • We set the clear color to black (0.0, 0.0, 0.0) to match the original example
  • The framework handles the actual clearing, but we demonstrate the concept
  • Comments explain what would happen without framework assistance

Original Tutorial Concepts Demonstrated

  1. Window Creation: EAGL.Window handles GLFW setup and OpenGL context creation
  2. Render Loop: The framework manages the main loop and buffer swapping
  3. Basic Rendering: Shows the foundation for all subsequent examples
  4. Input Handling: ENTER key to exit (handled by framework)

Key Learning Points

  • Understanding the render loop concept
  • OpenGL context and window management
  • The importance of clearing buffers
  • Foundation for more complex rendering

Usage

EAGL.Examples.LearnOpenGL.GettingStarted.HelloWindow.run_example()

Press ENTER to exit the example.

Summary

Functions

run_example()