CreateWindow  ( zstr x y w h fl -- win )

published: 26 October 2024 / updated 8 November 2024

Lire cette page en français

 

vocabulary: SDL2

Create a window with the specified position, dimensions, and flags.

Parameters:

Returns win that was created or 0 on failure.

Example:

\ define size and position for SDL window 
800 constant SCREEN_WIDTH 
400 constant SCREEN_HEIGHT 
200 constant X0_SCREEN_POSITION 
 50 constant Y0_SCREEN_POSITION 
 
z" My first window with SDL2"  
    X0_SCREEN_POSITION Y0_SCREEN_POSITION  
    SCREEN_WIDTH SCREEN_HEIGHT  
    SDL_WINDOW_SHOWN CreateWindow 
    value WIN0 

Legal: site web personnel sans commerce / personal site without seling