« first day (1286 days earlier)      last day (1550 days later) » 

user6461957
7:03 AM
My produced image looks quite different than Peter Shirley's which is on page 4 of his book here:

https://www.realtimerendering.com/raytracing/Ray%20Tracing%20in%20a%20Weekend.pdf

The greens are not at the top in my image like his. They are at the bottom.

(I wrote a tiny PPM library in ANSI C for this: https://github.com/d03/two-file-libs-ansic)

Maybe I messed up the orderings, i.e., row-major/column major. I have my 1D array in row-major form.

https://pasteboard.co/IQv2JBi.png

Shouldn't PPM images be in row-major order?
 
11:07 AM
unordered_map<char, string> bmap;

if ( bmap.emplace(c,word).first->second != word)
i get that the emplace is just adding something to the unordered_map but how does the first->second bit work?
 
 
1 hour later…
user6461957
12:20 PM
@Permian As I understand it, emplace returns a std::pair with an iterator object and a boolean (indicating whether the emplacement was successful). So with bmap.emplace(c,word).first->second you get the mapped value "word" whereas with bmap.emplace(c,word).first->first you would get the c value. If you do bmap.emplace(c,word).second, you get a boolean value which is indicating success or failure of the emplacement.
 
user6461957
(Personally I find that unintuitive & confusing from a semantics standpoint, but I guess I'm the only one with that viewpoint.)
 
8:14 PM
@d03 thanks
 
8:38 PM
how is the "frontend" (ie the visual bit) built with c++ for games?
i am not sure how this is constructed in compariason to web apps
is it just a monolith c++ app?
 

« first day (1286 days earlier)      last day (1550 days later) »