Jump to content

  • Log In with Google      Sign In   
  • Create Account

Need help


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 glPerfect   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 December 2001 - 07:54 AM

Hi everybody. I have an big problem with the Vertex-storage. I''m not able to load much vertex-arrys. I put the source on http://www.bozkurtwebspace.com.kg/noname/ can somebody help me? mail at: Markus_Reitmeier@Hotmail.com thx

Sponsor:

#2 Fruny   Moderators   -  Reputation: 1653

Like
Likes
Like

Posted 11 December 2001 - 08:29 AM

Your code is running fine here, except that using globals to store class data is bad : all your MESH objects seem to share the same OBJECT*. And GetObjectIndex() may not return a value.

What problems do you run into, exactly ?

#3 glPerfect   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 December 2001 - 04:40 AM

I get an error message:
Unhandled exception in Raven.exe 0xC0000005: Access Violation.

at the debug window:
First-chance exception in Raven.exe: 0xC0000005: Access Violation.

the error is at the AddVertex routine, but only when the 4. Vertex is adding to the other.

sObject[nCurObject].vVertex[nCurVertex].z = z;



#4 mkaltner   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 December 2001 - 07:18 AM

That''s a memory allocation issue.
That means either

sObject[nCurObject]

or

vVertex[nCurVertex]

does not exist and you''re trying to put something where something doesn''t exists. So you get that error.

Double check your array initialization and make sure that nCurObject and nCurVertex are not greater than the size of the array...

- Mike


#5 glPerfect   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 December 2001 - 06:02 AM

The sObject and vVertex is correctly initialized.

the nCurObject value is 0
the nCurVertex value is 3

that all is correct.

The first 3 runs are ok. After the 3rd one the following error appears.

CXX0030: Error: expression cannot be evaluated


#6 Fruny   Moderators   -  Reputation: 1653

Like
Likes
Like

Posted 13 December 2001 - 06:34 AM

Still works without a hitch here (VC++ Pro 6.0, Service Pack 5, Processor Pack) both in debug and release.

The step by step in AddVertex passes through nCurObject == 0, nCurVertex == 3 without problem.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS