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.Left
instead ofLeftButton
since now they intersect with keyboard buttons.
Raylib-specific changes - consult Raylib's changelog file.
Mesh
type has most of its fields changed fromptr cfloat
toptr UncheckedArray[cfloat]
MouseCursor
enum has noCURSOR_
prefix, e.g.CURSOR_ARROW
is nowARROW
GamepadButton
enum has noBUTTON_
prefix e.g.BUTTON_LEFT_FACE_UP
is nowLEFT_FACE_UP
GamepadAxis
enum has noAXIS_
prefix, e.g.AXIS_LEFT_X
is nowLEFT_X
raygui_Support_Icons
define was removed from Raygui, it is enabled by default
Recommended:
- Change all imports except for
rlgl
to justimport nimraylib_now
Renamed:
Camera.type
was renamed toCamera.projection
CameraType
was renamed toCameraProjection
GestureType
was renamed toGestures
Material.params
type was changed fromptr cfloat
toarray[4, cfloat]
ConfigFlag
was renamed toConfigFlags
TraceLogType
was renamed toTraceLogLevel
TextureFilterMod
was renamed toTextureFilter
TextureWrapMode
was renamed toTextureWrap
CubemapLayoutType
was renamed toCubemapLayout
NPatchInfo.type
was renamed toNPatchInfo.layout
NPatchType
was renamed toNPatchLayout
NPatchLayout
enum values were renamed to use English words instead of numbersbeginVrDrawing
was renamed tobeginVrStereoMode
runPhysicsStep
was renamed toupdatePhysics
getShaderDefault
and freinds were moved fromraylib
module torlgl
Misc changes:
- VR handling was changed significantly, see updated example
core/core_vr_simulator.nim
- Importing just
nimraylib_now
is now possible and it imports all libraries butrlgl
- "Tuple to object converters for geometry" feature requires importing
nimraylib_now/converters
or justnimraylib_now