forked from raysan5/raylib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michele Tampellini
committed
Jul 21, 2020
1 parent
02387f1
commit 6ddc54c
Showing
4 changed files
with
778 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/******************************************************************************************* | ||
* | ||
* raylib [core] example - Basic window | ||
* | ||
* Welcome to raylib! | ||
* | ||
* To test examples in Notepad++, provided with default raylib installer package, | ||
* just press F6 and run [raylib_compile_execute] script, it will compile and execute. | ||
* Note that compiled executable is placed in the same folder as .c file | ||
* | ||
* You can find all basic examples on [C:\raylib\raylib\examples] directory and | ||
* raylib official webpage: [www.raylib.com] | ||
* | ||
* Enjoy using raylib. :) | ||
* | ||
* This example has been created using raylib 1.0 (www.raylib.com) | ||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) | ||
* | ||
* Copyright (c) 2013-2020 Ramon Santamaria (@raysan5) | ||
* | ||
********************************************************************************************/ | ||
|
||
#include "raylib.h" | ||
|
||
int main(void) | ||
{ | ||
// Initialization | ||
//-------------------------------------------------------------------------------------- | ||
const int screenWidth = 800; | ||
const int screenHeight = 450; | ||
|
||
InitWindow(screenWidth, screenHeight, "raylib [core] example - window 1"); | ||
InitWindow(screenWidth, screenHeight, "raylib [core] example - window 2"); | ||
|
||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second | ||
//-------------------------------------------------------------------------------------- | ||
|
||
// Main game loop | ||
while (!WindowShouldClose()) // Detect window close button or ESC key | ||
{ | ||
// Update | ||
//---------------------------------------------------------------------------------- | ||
// TODO: Update your variables here | ||
//---------------------------------------------------------------------------------- | ||
|
||
// Draw | ||
//---------------------------------------------------------------------------------- | ||
BeginDrawing(0); | ||
|
||
ClearBackground(RAYWHITE); | ||
|
||
DrawText("Congrats! You created your FIST window!", 190, 200, 20, LIGHTGRAY); | ||
|
||
EndDrawing(); | ||
|
||
BeginDrawing(1); | ||
|
||
ClearBackground(RAYWHITE); | ||
|
||
DrawText("Congrats! You created your SECOND window!", 190, 200, 20, LIGHTGRAY); | ||
|
||
EndDrawing(); | ||
//---------------------------------------------------------------------------------- | ||
} | ||
|
||
// De-Initialization | ||
//-------------------------------------------------------------------------------------- | ||
CloseWindow(); // Close window and OpenGL context | ||
//-------------------------------------------------------------------------------------- | ||
|
||
return 0; | ||
} |
Oops, something went wrong.
6ddc54c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I tried to multiple window, It's work but the second windows is grayscale, the colours doesn't appears.
do you know why?
6ddc54c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same problem as you. ceo it's something with rlSetContext(CORE.currentWindow)