Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jul 2011
Offline Last Active Jul 21 2016 10:22 PM

Posts I've Made

In Topic: how to use ambient light

29 June 2016 - 08:57 PM

You was on the good road, never search complicated :

finalColor = (textureColor * ambientColor) + (textureColor * diffuseLightColor);

In other words, ambient is just a colorized diffuse texture added on the lighting or set as a start if multiple lights are added in the final color.

In Topic: Read one text line without limit correctly

05 February 2016 - 05:16 AM

data is of a type CString. While I'm not familiar with the type it is reasonable to assume it will do its own copy.

Yes, all is handled by the custom class.


This is a nonstandard function, but you didn't say what platform you're on, so...

Cross-Platform is needed, but I didn't think a platform test was needed for this specific case.

In Topic: Read one text line without limit correctly

04 February 2016 - 09:35 PM

I missed to mention it's to read from a FILE pointer and output into a custom string class variable, here the actual code :

bool CFile::ReadLine( CString& Data, const UInt32 MaxLineLength )
  // Allocate the buffer used to read the line.
  char* Buffer = new char[ MaxLineLength ];

  // Read the line into the buffer.
  if( fgets( Buffer, MaxLineLength, m_File ) != nullptr )
    Data = Buffer;
    delete[] Buffer;
    return true;
    delete[] Buffer;
    return false;

In Topic: Loosing materials when adding IK transformations to the bone?

31 January 2016 - 07:36 AM

frame->TransformationMatrix += matFinal;

You have to multiply matrices to combine them (in the good order).

In Topic: (UE4) Use button in inventory to show/hide items.

22 January 2016 - 04:57 PM

One option is to have a list of item with one parent which is the category, each category like that.

Then it's only needed to make one parent visible to have all these children visible (or if visible is not inherited, set visible on each child).