This guide documents changes between different versions of NimraylibNow! and and if necessary simultaneously different versions of Raylib library.
There are not a lot of possibilities to use proper deprecation warnings
since it is not always possible to translate #define declarations from C.
Sadly upgrades of user code is a necessary part of migration. On the bright
side it should mainly consist of renaming, please try the wonderful tool
nimgrep, it is shipped with Nim and has a useful "replace" functionality.
Additionally you can consult Raylib's changelog.
NimraylibNow!-specific changes:
- Emscripten support is improved: added TOTAL_MEMORY option and it now allows using resources from your file system. See Emscripten example readme, "Compile options" section.
Raylib-specific changes - consult Raylib's changelog file.
NimraylibNow!-specific changes:
- rlgl module has a lot of intersecting identifiers with raylib module, you will have to fully specify some variables when both modules are imported.
- Mouse buttons and some keyboard keys will have to be fully specified,
MouseButton.Leftinstead ofLeftButtonsince now they intersect with keyboard buttons.
Raylib-specific changes - consult Raylib's changelog file.
Meshtype has most of its fields changed fromptr cfloattoptr UncheckedArray[cfloat]MouseCursorenum has noCURSOR_prefix, e.g.CURSOR_ARROWis nowARROWGamepadButtonenum has noBUTTON_prefix e.g.BUTTON_LEFT_FACE_UPis nowLEFT_FACE_UPGamepadAxisenum has noAXIS_prefix, e.g.AXIS_LEFT_Xis nowLEFT_Xraygui_Support_Iconsdefine was removed from Raygui, it is enabled by default
Recommended:
- Change all imports except for
rlglto justimport nimraylib_now
Renamed:
Camera.typewas renamed toCamera.projectionCameraTypewas renamed toCameraProjectionGestureTypewas renamed toGesturesMaterial.paramstype was changed fromptr cfloattoarray[4, cfloat]ConfigFlagwas renamed toConfigFlagsTraceLogTypewas renamed toTraceLogLevelTextureFilterModwas renamed toTextureFilterTextureWrapModewas renamed toTextureWrapCubemapLayoutTypewas renamed toCubemapLayoutNPatchInfo.typewas renamed toNPatchInfo.layoutNPatchTypewas renamed toNPatchLayoutNPatchLayoutenum values were renamed to use English words instead of numbersbeginVrDrawingwas renamed tobeginVrStereoModerunPhysicsStepwas renamed toupdatePhysicsgetShaderDefaultand freinds were moved fromraylibmodule torlgl
Misc changes:
- VR handling was changed significantly, see updated example
core/core_vr_simulator.nim - Importing just
nimraylib_nowis now possible and it imports all libraries butrlgl - "Tuple to object converters for geometry" feature requires importing
nimraylib_now/convertersor justnimraylib_now