Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple cross platform template for windows, linux, and MacOS

NotificationsYou must be signed in to change notification settings

raylib-extras/raylib-quickstart

Repository files navigation

A simple cross platform template for setting up a project with the bleeding edge raylib code.Works with C or C++.

Supported Platforms

Quickstart supports the main 3 desktop platforms:

  • Windows
  • Linux
  • MacOS

Naming projects

Do not name your game project 'raylib', it will conflict with the raylib library.

VSCode Users (all platforms)

Note You must have a compiler toolchain installed in addition to vscode.

  • Download the quickstart
  • Rename the folder to your game name
  • Open the folder in VSCode
  • Run the build task ( CTRL+SHIFT+B or F5 )
  • You are good to go

Windows Users

There are two compiler toolchains available for windows, MinGW-W64 (a free compiler using GCC), and Microsoft Visual Studio

Using MinGW-W64

  • Double click thebuild-MinGW-W64.bat file
  • CD into the folder in your terminal
    • if you are usiing the W64devkit and have not added it to your system path environment variable, you must use the W64devkit.exe terminal, not CMD.exe
    • If you want to use cmd.exe or any other terminal, please make sure that gcc/mingw-W64 is in your path environment variable.
  • runmake
  • You are good to go

Note on MinGW-64 versions

Make sure you have a modern version of MinGW-W64 (not mingw).The best place to get it is from the W64devkit fromhttps://github.com/skeeto/w64devkit/releasesor the version installed with the raylib installer

If you have installed raylib from the installer

Make sure you have added the path

C:\raylib\w64devkit\bin

To your path environment variable so that the compiler that came with raylib can be found.

DO NOT INSTALL ANOTHER MinGW-W64 from another source such as msys2, you don't need it.

Microsoft Visual Studio

  • Runbuild-VisualStudio2022.bat
  • double click the.sln file that is generated
  • develop your game
  • you are good to go

Linux Users

  • CD into the build folder
  • run./premake5 gmake
  • CD back to the root
  • runmake
  • you are good to go

MacOS Users

  • CD into the build folder
  • run./premake5.osx gmake
  • CD back to the root
  • runmake
  • you are good to go

Output files

The built code will be in the bin dir

Working directories and the resources folder

The example uses a utility function frompath_utils.h that will find the resources dir and set it as the current working directory. This is very useful when starting out. If you wish to manage your own working directory you can simply remove the call to the function and the header.

Changing to C++

Simply renamesrc/main.c tosrc/main.cpp and re-run the steps above and do a clean build.

Using your own code

Simply removesrc/main.c and replace it with your code, and re-run the steps above and do a clean build.

Building for other OpenGL targets

If you need to build for a different OpenGL version than the default (OpenGL 3.3) you can specify an OpenGL version in your premake command line. Just modify the bat file or add the following to your command line

For OpenGL 1.1

--graphics=opengl11

For OpenGL 2.1

--graphics=opengl21

For OpenGL 4.3

--graphics=opengl43

For OpenGLES 2.0

--graphics=opengles2

For OpenGLES 3.0

--graphics=opengles3

License

Copyright (c) 2020-2025 Jeffery Myers

This software is provided "as-is", without any express or implied warranty. In no eventwill the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercialapplications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that youwrote the original software. If you use this software in a product, an acknowledgmentin the product documentation would be appreciated but is not required.

  2. Altered source versions must be plainly marked as such, and must not be misrepresentedas being the original software.

  3. This notice may not be removed or altered from any source distribution.

About

A simple cross platform template for windows, linux, and MacOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors10


[8]ページ先頭

©2009-2025 Movatter.jp