A
Alexis Gatt
Hi guys,
I was reading the source code of a lib, and I came across this odd way
of defining flags
#define PHONG_RV (0<<0)
#define PHONG_NH (1<<0)
Here is how they're used:
##### START CODE #####
BRDF *Phong_BRDF::Create_Phonglike(const char *params,
int Phong_Flags=PHONG_PHONG)
{
// some code
if (strcasecmp(flag1,"rv") == 0)
Phong_Flags |= PHONG_RV;
##### END CODE #####
Could someone please explain me how they work please?
Many thanks
Alexis
I was reading the source code of a lib, and I came across this odd way
of defining flags
#define PHONG_RV (0<<0)
#define PHONG_NH (1<<0)
Here is how they're used:
##### START CODE #####
BRDF *Phong_BRDF::Create_Phonglike(const char *params,
int Phong_Flags=PHONG_PHONG)
{
// some code
if (strcasecmp(flag1,"rv") == 0)
Phong_Flags |= PHONG_RV;
##### END CODE #####
Could someone please explain me how they work please?
Many thanks
Alexis