Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26744

Random seed set to a fixed numer in Qt3D

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Some future release
    • Qt3D 1.0
    • Qt3D
    • None
    • Ic4e0dde4a3ec63f047b8ddbf9c06e922ac7787dd

    Description

      qglsection.cpp contains the following lines in the method QGLSectionPrivate::mapVertex:

      static bool seeded = false;
      if (!seeded)
      qsrand(31415);

      This makes the random number generator not very random!
      The tank example uses the usual qsrand(time(0)) which is superseded by qsrand(31415).
      Therefore the colors are always the same, when one starts the programs.

      I think these lines can and should be removed.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            debhal Julian de Bhal (closed Nokia identity) (Inactive)
            hmuelner Helmut Mülner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes