Search found 1 match

by slavaxd
January 26th, 2023, 1:38 pm
Forum: Everything
Topic: About ZBuffer ( probably a stupid question)
Replies: 1
Views: 12306

About ZBuffer ( probably a stupid question)

In the series the ZBuffer class has an overload for the At method: float& At(int x, int y) { assert(x >= 0); assert(x < width); assert(y >= 0); assert(y < height); return pBuffer[y * width + x]; } const float& At(int x, int y) const { return const_cast<ZBuffer*>(this)->At(x, y); } My question is why...