History.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. It is not fun when things break backward compatibility, but it would be even less fun if the whole library became a bloated mess that nobody uses after a few decades.
  2. While every new feature may create naming conflicts from using the dsr namespace implicitly and every bugfix can make workarounds relying on incorrect behavior stop working, some things require extra attention to make porting to a new version easier.
  3. There are plans to create an automatic refactoring tool built into the Builder build system that could potentially do this automatically for you, but one must be very careful with overwriting people's code in case that someone does not use version control.
  4. Changes from version 0.1.0 to version 0.2.0 (Bug fixes)
  5. * simdExtra.h was removed, because such a low depth of abstraction would risk making the code slower from not fitting well with future SIMD extensions.
  6. The more features you add to the badly defined extra feature set, the less systems it will work on, until it is just a slower version of specific instruction sets.
  7. On missing header when including simdExtra.h:
  8. Replace 'simdExtra.h' with 'simd.h' to make it compile.
  9. Remove any duplicate includes of simd.h to clean up your code.
  10. Remove all code within '#ifdef USE_SIMD_EXTRA' or '#if defined USE_SIMD_EXTRA' to clean up your code.
  11. * Left and right sides of control, shift and alt keys were merged.
  12. Because MS-Windows allow using control, shift and alt of undefined side.
  13. This caused copying and pasting of text to fail when I tested on a different keyboard,
  14. because it was neither left nor right control, just control.
  15. Adding a third case would not solve the bug in applications using this library,
  16. because checks for left or right would still fail.
  17. Forcing unknown sides to one side would cause new bugs when someone connects different actions to left and right sides.
  18. The only resaonable bugfix was to merge left and right sides into the same keys.
  19. On missing DsrKey:
  20. Replace 'DsrKey_LeftControl' with 'DsrKey_Control'
  21. Replace 'DsrKey_RightControl' with 'DsrKey_Control'
  22. Replace 'DsrKey_LeftShift' with 'DsrKey_Shift'
  23. Replace 'DsrKey_RightShift' with 'DsrKey_Shift'
  24. Replace 'DsrKey_LeftAlt' with 'DsrKey_Alt'
  25. Replace 'DsrKey_RightAlt' with 'DsrKey_Alt'
  26. Merge any uplicated checks for left or right versions to clean up your code.
  27. Rethink the design if you relied on distinguishing between left and right control, shift or alt.
  28. * If you used a custom theme before the system was finished, you will now have to add the assignment "filter = 1" for components where rounded edges became black from adding the filter setting.
  29. Because one can not let default values depend on which component is used when theme classes are shared freely between components.
  30. Changes from version 0.2.0 to version 0.3.0 (Performance, safety and template improvements)
  31. * To make SafePointer fully typesafe so that one can't accidentally give write access to write protected data, the recursive constness had to be removed.
  32. Replace 'const SafePointer<' with 'SafePointer<const '
  33. Replace 'const dsr::SafePointer<' with 'dsr::SafePointer<const '
  34. * The function given to image_dangerous_replaceDestructor no longer frees the allocation itself, only external resources associated with the data.
  35. Because heap_free is called automatically after the destructor in the new memory allocator.
  36. * simd.h has moved into the dsr namespace because it was getting too big for the global namespace.
  37. * gather has been renamed into gather_U32, gather_I32 and gather_F32.
  38. This avoids potential ambiguity.
  39. * The 'a == b' and 'a != b' operators have been replaced with 'allLanesEqual(a, b)' and '!allLanesEqual(a, b)'.
  40. This reserves the comparison operators for future use with multiple boolean results.
  41. * Immediate bit shifting now use the bitShiftLeftImmediate and bitShiftRightImmediate functions with a template argument for the number of bits to shift.
  42. Because it was very easy to forget that the offset had to be constant with some SIMD instructions.
  43. Replace any << or >> operator that takes a constant offset with the new functions to prevent slowing down.
  44. Replace a << 3 with bitShiftLeftImmediate<3>(a).
  45. Replace a >> 5 with bitShiftRightImmediate<5>(a).
  46. * clamp, clampLower and clampUpper are global methods instead of member methods, to work the same for scalar operations in template functions.
  47. Replace myVector.clamp(min, max) with clamp(VectorType(min), myVector, VectorType(max)).
  48. Replace myVector.clampLower(min) with clampLower(VectorType(min), myVector).
  49. Replace myVector.clampUpper(max) with clampUpper(myVector, VectorType(max)).
  50. * reciprocal, reciprocalSquareRoot and squareRoot are now global functions, to work the same for scalar operations in template functions.
  51. Replace myVector.reciprocal() with reciprocal(myVector).
  52. Replace myVector.reciprocalSquareRoot() with reciprocalSquareRoot(myVector).
  53. Replace myVector.squareRoot() with squareRoot(myVector).
  54. * Textures have been separated from images to allow using them as separate value types.
  55. Because it was very difficult to re-use internal texture sampling methods for custom rendering pipelines.
  56. Now images and textures have immutable value allocated heads and all side-effects are in the pixel buffers.
  57. ImageRgbaU8 has been replaced by TextureRgbaU8 for the diffuse and lightmap textures in modelAPI.h.
  58. Then you must create a texture from an image ahead of time and then give the texture to the model or drawn polygon.
  59. Replace 'image_generatePyramid' with 'texture_generatePyramid'.
  60. Create a texture from the image using texture_create_RgbaU8 with the image and the number of resolutions.
  61. Then assign the texture instead of the image.
  62. * PackOrder.h has a new packOrder_ prefix for global functions to prevent naming conflicts.
  63. Replace 'getRed' with 'packOrder_getRed'.
  64. Replace 'getGreen' with 'packOrder_getGreen'.
  65. Replace 'getBlue' with 'packOrder_getBlue'.
  66. Replace 'getAlpha' with 'packOrder_getAlpha'.
  67. Replace 'packBytes' with 'packOrder_packBytes'.
  68. Replace 'floatToSaturatedByte' with 'packOrder_floatToSaturatedByte'.
  69. * Because the new string printing uses exact matching for basic types, bool is now printed as true or false instead of 1 or 0.
  70. Cast to uint32_t if you want bool interpreted as an integer as before.
  71. Does not affect PersistentBoolean.
  72. * Folders have been reorganized to be less confusing for beginners.
  73. Replace 'tools/build.sh' with 'tools/buildScripts/build.sh'.
  74. Replace 'tools/buildAndRun.sh' with 'tools/buildScripts/buildAndRun.sh'.
  75. Replace 'tools/buildLibrary.sh' with 'tools/buildScripts/buildLibrary.sh'.
  76. Replace 'tools/clean.sh' with 'tools/buildScripts/clean.sh'.
  77. * sound_streamToSpeakers uses int32_t instead of int.
  78. Replace 'int' with 'int32_t' in your sound engine's callback.