POV-Ray : Newsgroups : povray.advanced-users : Bitwise operators corrupting SDL parse-time execution of POV-Ray? : Bitwise operators corrupting SDL parse-time execution of POV-Ray? Server Time
22 Jun 2024 17:23:36 EDT (-0400)
  Bitwise operators corrupting SDL parse-time execution of POV-Ray?  
From: Bald Eagle
Date: 3 Feb 2023 17:35:00
Message: <web.63dd8ba6afaac3401f9dae3025979125@news.povray.org>
So, I wanted to play around with quickly accessing data in an array, and figured
I could use a hash function to calculate semi-unique array indices.

I made a stab at converting c++ code from here:


and just made some naive assumptions about some of the memory-location specific
operations, but I think I got the rest of it correct.

Then something interesting happened.

I tried to run a loop to process a series of input values, but my loop only
executed one iteration.

I then sent the value of my iterator to the #debug stream after the loop exited,
and it's greater than my maximum/exit value!

Perhaps someone could verify this behaviour on their machine/OS and look over my
conversion of c++ to SDL and see if something crazy is happening.
Am I writing to a memory location by using bitwise operators in SDL?

If so: WHOA.

Scene file is attached.

- Bald "POV-Ray breaker" Eagle

Post a reply to this message

Download 'superfasthash.pov.txt' (5 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.