Jump to content

graytest

Members
  • Posts

    19
  • Joined

  • Last visited

Blog Comments posted by graytest

  1. I think "Instance" might be a bit confusing as well since this is usually the function called to get the instance from a Singleton.

     

    Otherwise it all looks great! Nice to not have to write the extra line to call LoadTexture. But maybe mat->setTexture should return NULL or the pointer to the loaded texture in case the user wants to save a copy of it?

  2. I agree with Roland! Looks much nicer that way, and will make it easier to read the code. Isn't as much fun to read code with a bunch of anonymous parameters that are just true, false, 0, 1 etc.

     

    Good question, I think it should say:

    Material* mat3 = new mat1->Copy(false);

    because else mat3 is indeed only pointer to something which mat1->Copy(false); gave it.

     

    That is not correct. Copy will create a new object and return it.

×
×
  • Create New...