Jump to content
  • Advertisement
Sign in to follow this  
DigiMan Shart

CAL3D Breaks New

This topic is 3471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Currently I'm using the CAL3D library to do animations in my game, but I've run into a problem as of late. In my cModel class that's a wrapper around the CAL3D stuff the code break when I call new in the ctor, and was wondering if someone could help me spot my error. Thanks.

typedef CalCoreModel Model;
typedef CalModel ModelInstance;

class cModel
{
	public:
		cModel(std::string name, int ID);
		~cModel();
		std::string GetFilename(void){return fileName;}
		
		int modelID;
		int textureCount;
		std::string fileName;
		Model* calModel;
		ModelInstance* calModelInstance;
};

cModel::cModel(std::string name, int ID)
{
	fileName = name; 
	modelID = ID; 
	calModel = new CalCoreModel(fileName);//Breaks here
	calModelInstance = NULL;
}

//Function that calls constructor code
bool LoadAllModels(void)
{
	//My temporary model
	cModel temp("assets\\Models\\cally\\", 0);
	std::string tempStr = temp.GetFilename();
	LoadModel(temp);

	return true;
}


Share this post


Link to post
Share on other sites
Advertisement
I can't step into the cal model struct because I'm using it's .lib and .dll files, but it says the heap seems to be exploding. Outside of that it's hard for me to tell what's really going on.

Share this post


Link to post
Share on other sites
Quote:
Original post by Antheus
Does this work?
		Model calModel;

...

cModel::cModel(std::string name, int ID)
{
calModel.create(fileName);


Unfortunately, I'm using the newest version of the CAL3D library and in that version they said they felt the create functions were redundant of the constructor, so they got rid of the create functions in favor of using the constructor only.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!