-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
raylib enumerated types
Antonis Geralis edited this page Sep 25, 2022
·
8 revisions
raylib provides some enumerated types to be used in some functions. You probably noticed that despite being typedef, there is no function referring to those enum
types, all related parameters are just defined as int
. This is a design decision and the reason for that is because those enums just intend to be a way to organize similar values definition, I use enums instead of plain defines. You can notice that because there is no enum intended to create variables of that type, just to be used as defined values. Maybe I review this decision in a future.
Here it is the list with the provided enums and the functions intended to use them.
SetConfigFlags(unsigned int flags);
SetWindowState(unsigned int flags);
ClearWindowState(unsigned int flags);
IsWindowState(unsigned int flag);
TraceLog(int logLevel, const char *text, ...);
SetTraceLogLevel(int logLevel);
IsKeyPressed(int key);
IsKeyDown(int key);
IsKeyReleased(int key);
IsKeyUp(int key);
SetExitKey(int key);
//GetKeyPressed(void);
SetCameraAltControl(int keyAlt);
SetCameraSmoothZoomControl(int keySmoothZoom);
SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown);
IsMouseButtonPressed(int button);
IsMouseButtonDown(int button);
IsMouseButtonReleased(int button);
IsMouseButtonUp(int button);
SetCameraPanControl(int keyPan);
SetMouseCursor(int cursor);
IsGamepadButtonPressed(int gamepad, int button);
IsGamepadButtonDown(int gamepad, int button);
IsGamepadButtonReleased(int gamepad, int button);
IsGamepadButtonUp(int gamepad, int button);
//GetGamepadButtonPressed(void);
GetGamepadAxisMovement(int gamepad, int axis);
struct Shader.locs[index]
SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType);
SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count);
struct Material.maps[index]
struct Image.format
struct Texture.format
LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize);
ImageFormat(Image *image, int newFormat);
SetTextureFilter(Texture2D texture, int filter);
SetTextureWrap(Texture2D texture, int wrap);
LoadTextureCubemap(Image image, int layout);
LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount, int type);
BeginBlendMode(int mode);
SetGesturesEnabled(unsigned int flags);
IsGestureDetected(int gesture);
//GetGestureDetected(void);
SetCameraMode(Camera camera, int mode);
struct Camera3D.projection
struct nPatchInfo.layout
I hope this list could be helpful!
www.raylib.com | itch.io | GitHub | Discord | YouTube
- Architecture
- Syntax analysis
- Data structures
- Enumerated types
- External dependencies
- GLFW dependency
- libc dependency
- Platforms and graphics
- Input system
- Default shader
- Custom shaders
- Coding conventions
- Integration with other libs
- Working on Windows
- Working on macOS
- Working on GNU Linux
- Working on Chrome OS
- Working on FreeBSD
- Working on Raspberry Pi
- Working for Android
- Working for Web (HTML5)
- Creating Discord Activities
- Working anywhere with CMake
- CMake Build Options
- raylib templates: Get started easily
- How To: Quick C/C++ Setup in Visual Studio 2022, GCC or MinGW
- How To: C# Visual Studio Setup
- How To: VSCode
- How To: Eclipse
- How To: Sublime Text
- How To: Code::Blocks