Problem wih resize after using CloneMesh 
Author Message
 Problem wih resize after using CloneMesh

Hi.

I have a problem when trying to make a resize if i have
use previously the CloseMesh function.

The Vb6 crash completely and gives a General Protection
Error. I've located where is the problem, and it's when
calling to the method g_dev.reset. According with the
documentation it's because i haven't freed all the memory
i've taken. I'm sure i free all the memory before and in
normal operation it works perfectely, but there is one
moment in my application when I have to use the CloneMesh
function to make a copy of a mesh. After using this
function, if i try to call to the g_dev.Reset it returns
me a D3DERR_DEVICENOTRESET error and after it, the
application crash.

If any of you have any idea why this is happening and how
to solve it, please, send it to me.

Thanks in advance

       Hugo Marquez



Tue, 17 Aug 2004 19:03:01 GMT  
 Problem wih resize after using CloneMesh

Quote:
> I have a problem when trying to make a resize if i have
> use previously the CloseMesh <spelling?> function.
> The Vb6 crash completely and gives a General Protection
> Error. I've located where is the problem, and it's when
> calling to the method g_dev.reset. According with the
> documentation it's because i haven't freed all the memory

That is what the problem sounds like. Could you show us
how you are calling the CloneMesh function, maybe we can
spot something. Other than that, I'm just not sure.

--
Eric DeBrosse
http://www.blown.com/dx/
Microsoft Visual Basic DirectX MVP

The opinions expressed in this message are my own personal views and
do not reflect the official views of Microsoft Corporation. The MVP program
does not constitute employment or contractual obligation with Microsoft.



Thu, 19 Aug 2004 02:31:39 GMT  
 Problem wih resize after using CloneMesh
Now I'm using the following code line to call the
CloneMeshFVF:

Set tempMesh = frame.GetChildMesh(0).Mesh.CloneMeshFVF(0,
frame.GetChildMesh(0).Mesh.GetFVF, g_dev)

Where tempMesh is a D3DXMesh, frame a CD3DFrame and g_dev
a Direct3DDevice8

I've also tried using this other line, but I also get the
problem with it.

Set tempMesh = frame.GetChildMesh(0).mesh.CloneMesh(0,
d3dxd, g_dev)

Where d3dxd is a D3DXDECLARATOR

Quote:
>-----Original Message-----
>> I have a problem when trying to make a resize if i have
>> use previously the CloseMesh <spelling?> function.
>> The Vb6 crash completely and gives a General Protection
>> Error. I've located where is the problem, and it's when
>> calling to the method g_dev.reset. According with the
>> documentation it's because i haven't freed all the
memory

>That is what the problem sounds like. Could you show us
>how you are calling the CloneMesh function, maybe we can
>spot something. Other than that, I'm just not sure.

>--
>Eric DeBrosse
>http://www.blown.com/dx/
>Microsoft Visual Basic DirectX MVP

>The opinions expressed in this message are my own
personal views and
>do not reflect the official views of Microsoft

Corporation. The MVP program

- Show quoted text -

Quote:
>does not constitute employment or contractual obligation
with Microsoft.

>.



Fri, 20 Aug 2004 17:20:03 GMT  
 Problem wih resize after using CloneMesh

Quote:
> Set tempMesh = frame.GetChildMesh(0).Mesh.CloneMeshFVF(0,
> frame.GetChildMesh(0).Mesh.GetFVF, g_dev)

I'm not really sure here, but don't you need to specify a memory class
for the returned mesh? Instead of passing 0 in for the flags? Perhaps
you could try D3DXMESH_MANAGED. This should survive a
reset.

--
Eric DeBrosse
http://www.blown.com/dx/
Microsoft Visual Basic DirectX MVP

The opinions expressed in this message are my own personal views and
do not reflect the official views of Microsoft Corporation. The MVP program
does not constitute employment or contractual obligation with Microsoft.



Sat, 21 Aug 2004 04:01:53 GMT  
 Problem wih resize after using CloneMesh
You are right. Efectively that was the problem. Now I can
make the reset without any problem.

Thanks a lot for your help.

Hugo Marquez

Quote:
>-----Original Message-----
>> Set tempMesh = frame.GetChildMesh(0).Mesh.CloneMeshFVF
(0,
>> frame.GetChildMesh(0).Mesh.GetFVF, g_dev)

>I'm not really sure here, but don't you need to specify a
memory class
>for the returned mesh? Instead of passing 0 in for the
flags? Perhaps
>you could try D3DXMESH_MANAGED. This should survive a
>reset.

>--
>Eric DeBrosse
>http://www.blown.com/dx/
>Microsoft Visual Basic DirectX MVP

>The opinions expressed in this message are my own
personal views and
>do not reflect the official views of Microsoft

Corporation. The MVP program

- Show quoted text -

Quote:
>does not constitute employment or contractual obligation
with Microsoft.

>.



Sat, 21 Aug 2004 16:50:08 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Using SEEK wih multiple-field indexes

2. Problem wih MMControl & saving WAV files

3. No DELETE key acknowledgement wih KeyPress event

4. Read/Write COBOL indexed file wih VB6

5. Wave I/O wih the winmm.dll

6. printing Labels wih borders

7. Resize, resize, resize, ...

8. Mysterious resize of access application using automation

9. Resizing Windows Desktop using shell command

10. Resizing Excel Image Using VBA

11. Resizing images using GetThumbnailImage or DrawImage

12. Move resize drag controls in runtime using mouse...

 

 
Powered by phpBB® Forum Software