Jump to content

LE3 Loading Models


xtreampb
 Share

Recommended Posts

Hey all,

 

I like to do all my games in pure C++. With that said i seam to be having an issue with create my own object.

 

My object is basically 6 models. In my header file, if I create them with as a pointer then use the load, if i try to do anything else with them such as Hide() it throws a bad access error, as if it was never stored in memory, or the mem address was lost. If i create them as a normal var, no issues. No issues that is until i try to terminate the problem. then it frees my object then tries to free it a second time, of course crashing the program saying that it tried to free an unallocated memory address. Anyone got any suggestions

 

Thank you,

 

Xtreampb

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

Silly me. Went and double checked the document reference.

 

CPP file needs to be

this->ModelName=Model::Load("myPath");

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...