Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Library customization: Configuration flags #200

Closed
raysan5 opened this issue Nov 27, 2016 · 3 comments
Closed

[build] Library customization: Configuration flags #200

raysan5 opened this issue Nov 27, 2016 · 3 comments
Assignees
Labels
enhancement This is an improvement of some feature
Milestone

Comments

@raysan5
Copy link
Owner

raysan5 commented Nov 27, 2016

This issue is a proposal for a new feature. By default raylib includes a bunch of functionality (shapes drawing, multiple file-formats supported, audio system...) but some advance users don't need many of that functionality and it would be great to allow custom library building using configuration flags.

Every raylib module should offer some customization flags.

@raysan5 raysan5 added the enhancement This is an improvement of some feature label Nov 27, 2016
@raysan5 raysan5 added this to the raylib v1.7 milestone Nov 27, 2016
@raysan5 raysan5 self-assigned this Nov 27, 2016
@raysan5
Copy link
Owner Author

raysan5 commented Jan 15, 2017

This is the current flags proposal, organized by modules, still working on naming:

> core
    PLATFORM_DESKTOP
    PLATFORM_ANDROID
    PLATFORM_RPI
    PLATFORM_WEB
    RL_LOAD_DEFAULT_FONT
    ENABLE_MOUSE_GESTURES / SUPPORT_MOUSE_GESTURES
    INCLUDE_RAYMATH
    INCLUDE_CAMERA_SYSTEM / SUPPORT_CAMERA_SYSTEM
    INCLUDE_GESTURES_SYSTEM / SUPPORT_GESTURES_SYSTEM
    
> rlgl
    GRAPHICS_API_OPENGL_11
    GRAPHICS_API_OPENGL_21
    GRAPHICS_API_OPENGL_33
    GRAPHICS_API_OPENGL_ES2
    RLGL_STANDALONE
    RLGL_NO_STANDARD_SHADER / INCLUDE_STANDARD_SHADER
    RLGL_NO_DISTORTION_SHADER
    RLGL_OCULUS_SUPPORT / SUPPORT_OCULUS_RIFT_CV1
    SUPPORT_SHADER_DEFAULT / ENABLE_SHADER_DEFAULT
    SUPPORT_SHADER_STANDARD
    SUPPORT_SHADER_DISTORTION
    SUPPORT_OCULUS_RIFT_CV1
    SUPPORT_STEREO_RENDERING
    RLGL_NO_DEFAULT_SHADER

> shapes
    SUPPORT_QUADS_ONLY
    SUPPORT_TRIANGLES_ONLY

> textures
    SUPPORT_STB_IMAGE / INCLUDE_STB_IMAGE
    SUPPORT_FILEFORMAT_BMP / SUPPORT_LOAD_BMP
    SUPPORT_FILEFORMAT_PNG / SUPPORT_LOAD_PNG
    SUPPORT_FILEFORMAT_TGA
    SUPPORT_FILEFORMAT_JPG / ENABLE_LOAD_JPG
    SUPPORT_FILEFORMAT_GIF
    SUPPORT_FILEFORMAT_HDR
    SUPPORT_FILEFORMAT_DDS / ENABLE_LOAD_DDS
    SUPPORT_FILEFORMAT_PKM
    SUPPORT_FILEFORMAT_KTX
    SUPPORT_FILEFORMAT_PVR
    SUPPORT_FILEFORMAT_ASTC
    SUPPORT_IMAGE_RESIZE_ALGORITHMS / INCLUDE_STB_IMAGE_RESIZE / SUPPORT_IMAGE_RESIZE
    SUPPORT_IMAGE_MANIPULATION / ENABLE_IMAGE_MANIPULATION
    
> text
    SUPPORT_FILEFORMAT_FNT
    SUPPORT_FILEFORMAT_TTF / INCLUDE_STB_TRUETYPE
    SUPPORT_FILEFORMAT_IMAGE_FONT
    INCLUDE_DEFAULT_FONT / SUPPORT_DEFAULT_FONT

> models
    SUPPORT_FILEFORMAT_OBJ / SUPPORT_LOAD_OBJ
    SUPPORT_FILEFORMAT_MTL

> audio
    SUPPORT_FILEFORMAT_WAV  / SUPPORT_LOAD_WAV / ENABLE_LOAD_WAV
    SUPPORT_FILEFORMAT_OGG
    SUPPORT_FILEFORMAT_XM
    SUPPORT_FILEFORMAT_MOD
    SUPPORT_FILEFORMAT_FLAC
    AUDIO_STANDALONE
    SUPPORT_RAW_AUDIO_BUFFERS

> utils
    SUPPORT_DEFLATE_DECOMPRESSION (tinfl)
    SUPPORT_SAVE_PNG (stb_image_write)
    SUPPORT_SAVE_BMP
    DO_NOT_TRACE_DEBUG_MSGS

In raylib, naming is crucial, I'm still thinking about the most proper naming for those #define options; for example, not sure what would be better between SUPPORT_ or ENABLE_... or even INCLUDE_...

@raysan5
Copy link
Owner Author

raysan5 commented Mar 21, 2017

Currently supported and implemented (*) flags.

UPDATE: This list reflects the final flags configuration options. Note that some flags previously proposed have been removed.

> core
    *PLATFORM_DESKTOP
    *PLATFORM_ANDROID
    *PLATFORM_RPI
    *PLATFORM_WEB
    *SUPPORT_DEFAULT_FONT
    *SUPPORT_CAMERA_SYSTEM
    *SUPPORT_GESTURES_SYSTEM
    *SUPPORT_MOUSE_GESTURES
    
> rlgl
    *RLGL_STANDALONE
    *GRAPHICS_API_OPENGL_11
    *GRAPHICS_API_OPENGL_21
    *GRAPHICS_API_OPENGL_33
    *GRAPHICS_API_OPENGL_ES2
    *SUPPORT_VR_SIMULATOR
    *SUPPORT_DISTORTION_SHADER

> shapes
    SUPPORT_QUADS_ONLY
    SUPPORT_TRIANGLES_ONLY

> textures
    *SUPPORT_FILEFORMAT_BMP
    *SUPPORT_FILEFORMAT_PNG
    *SUPPORT_FILEFORMAT_TGA
    *SUPPORT_FILEFORMAT_JPG
    *SUPPORT_FILEFORMAT_GIF
    *SUPPORT_FILEFORMAT_HDR
    *SUPPORT_FILEFORMAT_DDS
    *SUPPORT_FILEFORMAT_PKM
    *SUPPORT_FILEFORMAT_KTX
    *SUPPORT_FILEFORMAT_PVR
    *SUPPORT_FILEFORMAT_ASTC
    *SUPPORT_IMAGE_MANIPULATION       // Includes image resizing
    
> text
    *SUPPORT_DEFAULT_FONT
    *SUPPORT_FILEFORMAT_FNT
    *SUPPORT_FILEFORMAT_TTF
    
> models
    *SUPPORT_FILEFORMAT_OBJ
    *SUPPORT_FILEFORMAT_MTL

> audio
    *AUDIO_STANDALONE
    *SUPPORT_FILEFORMAT_WAV
    *SUPPORT_FILEFORMAT_OGG
    *SUPPORT_FILEFORMAT_XM
    *SUPPORT_FILEFORMAT_MOD
    *SUPPORT_FILEFORMAT_FLAC

> utils
    *SUPPORT_SAVE_PNG
    *SUPPORT_SAVE_BMP
    *SUPPORT_TRACELOG
    *SUPPORT_TRACELOG_DEBUG

@raysan5
Copy link
Owner Author

raysan5 commented Apr 18, 2017

Shapes flags (SUPPORT_QUADS_ONLY and SUPPORT_TRIANGLES_ONLY) require some thinking and redesign and won't be implemented for the moment.

Just closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an improvement of some feature
Projects
None yet
Development

No branches or pull requests

1 participant