Newbie: Automation error when calling "D3DDevice.DrawIndexedPrimitive" 
Author Message
 Newbie: Automation error when calling "D3DDevice.DrawIndexedPrimitive"

Hi,

I am developing with VB6 SP5 and DX8.1

I am running these lines of code

Set VBuffer = goD3DDevice.CreateVertexBuffer(Len(CubeVertices(0)) * 8, 0,
Lit_FVF, D3DPOOL_DEFAULT)
D3DVertexBuffer8SetData VBuffer, 0, Len(CubeVertices(0)) * 8, 0,
CubeVertices(0)
Set IBuffer = goD3DDevice.CreateIndexBuffer(Len(CubeIndices(0)) * 36, 0,
D3DFMT_INDEX16, D3DPOOL_DEFAULT)
D3DIndexBuffer8SetData IBuffer, 0, Len(CubeIndices(0)) * 36, 0,
CubeIndices(0)

D3DDevice.SetStreamSource 0, VBuffer, Len(CubeVertices(0))
D3DDevice.SetIndices IBuffer, 0
D3DDevice.DrawIndexedPrimitive D3DPT_TRIANGLELIST, 0, 36, 0, 12

and am getting an Automation error when calling
"D3DDevice.DrawIndexedPrimitive D3DPT_TRIANGLELIST, 0, 36, 0, 12"

I am new at this so I am hoping this is a simple error that everyone knows
how to fix =)

If you need me to email you my Project, post here and I will forward it to
you.

Thanks,
Denis



Sat, 10 Jul 2004 18:55:13 GMT  
 Newbie: Automation error when calling "D3DDevice.DrawIndexedPrimitive"
You perhaps forgot to use SetVertexShader (that should be your FVF format).

You can use D3DX8.GetErrorString to get the symbolic name for the
encountered automation error...



Quote:
> Hi,

> I am developing with VB6 SP5 and DX8.1

> I am running these lines of code

> Set VBuffer = goD3DDevice.CreateVertexBuffer(Len(CubeVertices(0)) * 8, 0,
> Lit_FVF, D3DPOOL_DEFAULT)
> D3DVertexBuffer8SetData VBuffer, 0, Len(CubeVertices(0)) * 8, 0,
> CubeVertices(0)
> Set IBuffer = goD3DDevice.CreateIndexBuffer(Len(CubeIndices(0)) * 36, 0,
> D3DFMT_INDEX16, D3DPOOL_DEFAULT)
> D3DIndexBuffer8SetData IBuffer, 0, Len(CubeIndices(0)) * 36, 0,
> CubeIndices(0)

> D3DDevice.SetStreamSource 0, VBuffer, Len(CubeVertices(0))
> D3DDevice.SetIndices IBuffer, 0
> D3DDevice.DrawIndexedPrimitive D3DPT_TRIANGLELIST, 0, 36, 0, 12

> and am getting an Automation error when calling
> "D3DDevice.DrawIndexedPrimitive D3DPT_TRIANGLELIST, 0, 36, 0, 12"

> I am new at this so I am hoping this is a simple error that everyone knows
> how to fix =)

> If you need me to email you my Project, post here and I will forward it to
> you.

> Thanks,
> Denis



Sat, 10 Jul 2004 19:15:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. D3DDevice.DrawIndexedPrimitive

2. "Automation Error-Interface not registered" Error

3. "Automation Error" after SR-1

4. "Automation error"

5. "Automation error"

6. VB5 CreateObject() gives an "Automation Error"

7. CopyObject gets "Illegal function call" error

8. Access200 - Error 49: "Bad DLL calling..."

9. VB Error: "Bad DLL Calling Convention"

10. Run-time error "5": Invalid procedure call

11. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

12. Run-time error "-2147467259 (80004005) Automation error

 

 
Powered by phpBB® Forum Software