DX8.1 Differences between VB and C++ libraries 
Author Message
 DX8.1 Differences between VB and C++ libraries

Hello :)

Why Microsoft didn't add the same new functions in the VB dll than in C++
libraries ?
For example, the new d3dx functions like D3DXComputeTangentNormal,
D3DXSaveTextureToFile (useful for Screenshot and DynTex) etc...
I think it wouldn't be too hard to add these functions to the VB DLL also :)

Also, small bugs report : D3DPOOL_SCRATCH is available in the VB doc but not
in the DLL constants CONST_D3DPOOL. Same for  D3DXGetImageIntoFrom that is
in the doc but not in the DLL.

Are the VB users forgotten or this is just a bug ? :)

Thanks !

Regards
Sylvain



Fri, 30 Apr 2004 02:26:30 GMT  
 DX8.1 Differences between VB and C++ libraries
I was looking for some of these functions also, bummer...


Quote:
> Hello :)

> Why Microsoft didn't add the same new functions in the VB dll than in C++
> libraries ?
> For example, the new d3dx functions like D3DXComputeTangentNormal,
> D3DXSaveTextureToFile (useful for Screenshot and DynTex) etc...
> I think it wouldn't be too hard to add these functions to the VB DLL also
:)

> Also, small bugs report : D3DPOOL_SCRATCH is available in the VB doc but
not
> in the DLL constants CONST_D3DPOOL. Same for  D3DXGetImageIntoFrom that is
> in the doc but not in the DLL.

> Are the VB users forgotten or this is just a bug ? :)

> Thanks !

> Regards
> Sylvain



Fri, 30 Apr 2004 07:14:35 GMT  
 DX8.1 Differences between VB and C++ libraries
Do VB users even need the new 8.1 SDK?
We don't even get:

-D3DXSplitMesh()
-D3DXIntersectTri()
-D3DXComputeNormalMap()
-D3DXConvertMeshSubsetToSingleStrip()
-D3DXConvertMeshSubsetToStrips()

Darn, this was some of the stuff I was wanting to play with.
Is there a way to declare these functions from d3dx8.dll?
Or, is VB flat out not supported by these functions?



Sat, 01 May 2004 00:52:17 GMT  
 DX8.1 Differences between VB and C++ libraries
I believe it could be called from VB using the Declare statement...



Quote:
> Do VB users even need the new 8.1 SDK?
> We don't even get:

> -D3DXSplitMesh()
> -D3DXIntersectTri()
> -D3DXComputeNormalMap()
> -D3DXConvertMeshSubsetToSingleStrip()
> -D3DXConvertMeshSubsetToStrips()

> Darn, this was some of the stuff I was wanting to play with.
> Is there a way to declare these functions from d3dx8.dll?
> Or, is VB flat out not supported by these functions?



Sat, 01 May 2004 01:28:37 GMT  
 DX8.1 Differences between VB and C++ libraries
Yes, I thought that it could work too, Patrice.
But when I tried the D3DXSaveSurfaceToFile it crashed :)

Public Declare Function D3DXSaveSurfaceToFileW Lib "d3dx8d" (ByRef pDestFile
As String, ByRef DestFormat As Long, Byval SurfObject As Long, ByRef Palette
As Any, ByRef RECT As Any)

HRESULT D3DXSaveSurfaceToFile(
  LPCTSTR              pDestFile,
  D3DXIMAGE_FILEFORMAT DestFormat,
  LPDIRECT3DSURFACE8   pSrcSurface,
  CONST PALET{*filter*}TRY*  pSrcPalette,
  CONST RECT*          pSrcRect
);

And for doing a screenshot for example I'm doing :

  Dim Surface As Direct3DSurface8, Surf2 As Direct3DSurface8

  Dim Data() As Byte
  Set Surface = Device.GetBackbuffer(0, D3DBACKBUFFER_TYPE_MONO)

  Dim w As Long, h As Long
  Dim Desc As D3DSURFACE_DESC
  Surface.GetDesc Desc

  Set Surf2 = Device.CreateImageSurface(Desc.width, Desc.height,
Desc.Format)

  Device.CopyRects Surface, ByVal 0, 0, Surf2, ByVal 0
  Surf2.GetDesc Desc

  D3DXSaveSurfaceToFileW "c:\debug.bmp", 0, ObjPtr(Surface), ByVal 0, ByVal
0

It crashs VB in a GPF, no debug info is displayed.

Can anybody help me ?

Regards
Sylvain


Quote:
> I believe it could be called from VB using the Declare statement...



> > Do VB users even need the new 8.1 SDK?
> > We don't even get:

> > -D3DXSplitMesh()
> > -D3DXIntersectTri()
> > -D3DXComputeNormalMap()
> > -D3DXConvertMeshSubsetToSingleStrip()
> > -D3DXConvertMeshSubsetToStrips()

> > Darn, this was some of the stuff I was wanting to play with.
> > Is there a way to declare these functions from d3dx8.dll?
> > Or, is VB flat out not supported by these functions?



Sun, 02 May 2004 02:55:46 GMT  
 DX8.1 Differences between VB and C++ libraries
Phil,

Are we out of luck with these functions in VB? Should I even
bother trying to make Declares for any of the D3DX stuff like
D3DXSaveTextureToFile? Will there be a problem with passing
the VB strings or objects?

Eric


Quote:
> I believe it could be called from VB using the Declare statement...



Sun, 02 May 2004 03:14:48 GMT  
 DX8.1 Differences between VB and C++ libraries

unfortunately, D3DX ( being just a lib in the SDK ) took a few late changes
that DXVB ( being a dll in the core runtime ) was locked out from accepting.
so these methods didnt make it.

I think there might be issues with this approach in trying to use them.

we are investigating architectural changes to avoid similar issues in DX 9.0
with ManagedDX.


Quote:
> Phil,

> Are we out of luck with these functions in VB? Should I even
> bother trying to make Declares for any of the D3DX stuff like
> D3DXSaveTextureToFile? Will there be a problem with passing
> the VB strings or objects?

> Eric



> > I believe it could be called from VB using the Declare statement...



Sun, 02 May 2004 11:50:02 GMT  
 DX8.1 Differences between VB and C++ libraries
This one is available as D3DX8.SaveSurfaceToFile (you'll find also here
SaveTextureToFile).

I made a test with this same function and it works. It should be fairly easy
to call any of those D3DX... functions. There are also some new methods on
some objects that couldn't be called without much more work...

Patrice



Quote:
> Yes, I thought that it could work too, Patrice.
> But when I tried the D3DXSaveSurfaceToFile it crashed :)

> Public Declare Function D3DXSaveSurfaceToFileW Lib "d3dx8d" (ByRef
pDestFile
> As String, ByRef DestFormat As Long, Byval SurfObject As Long, ByRef
Palette
> As Any, ByRef RECT As Any)

> HRESULT D3DXSaveSurfaceToFile(
>   LPCTSTR              pDestFile,
>   D3DXIMAGE_FILEFORMAT DestFormat,
>   LPDIRECT3DSURFACE8   pSrcSurface,
>   CONST PALET{*filter*}TRY*  pSrcPalette,
>   CONST RECT*          pSrcRect
> );

> And for doing a screenshot for example I'm doing :

>   Dim Surface As Direct3DSurface8, Surf2 As Direct3DSurface8

>   Dim Data() As Byte
>   Set Surface = Device.GetBackbuffer(0, D3DBACKBUFFER_TYPE_MONO)

>   Dim w As Long, h As Long
>   Dim Desc As D3DSURFACE_DESC
>   Surface.GetDesc Desc

>   Set Surf2 = Device.CreateImageSurface(Desc.width, Desc.height,
> Desc.Format)

>   Device.CopyRects Surface, ByVal 0, 0, Surf2, ByVal 0
>   Surf2.GetDesc Desc

>   D3DXSaveSurfaceToFileW "c:\debug.bmp", 0, ObjPtr(Surface), ByVal 0,
ByVal
> 0

> It crashs VB in a GPF, no debug info is displayed.

> Can anybody help me ?

> Regards
> Sylvain



Sun, 02 May 2004 17:13:03 GMT  
 DX8.1 Differences between VB and C++ libraries
Actually it fails with D3DERR_INVALIDCALL as it was just a test bed for the
Declare but I'm quite confident it should work....

I'll try to implement a more usefull function...



Quote:
> This one is available as D3DX8.SaveSurfaceToFile (you'll find also here
> SaveTextureToFile).

> I made a test with this same function and it works. It should be fairly
easy
> to call any of those D3DX... functions. There are also some new methods on
> some objects that couldn't be called without much more work...

> Patrice



> > Yes, I thought that it could work too, Patrice.
> > But when I tried the D3DXSaveSurfaceToFile it crashed :)

> > Public Declare Function D3DXSaveSurfaceToFileW Lib "d3dx8d" (ByRef
> pDestFile
> > As String, ByRef DestFormat As Long, Byval SurfObject As Long, ByRef
> Palette
> > As Any, ByRef RECT As Any)

> > HRESULT D3DXSaveSurfaceToFile(
> >   LPCTSTR              pDestFile,
> >   D3DXIMAGE_FILEFORMAT DestFormat,
> >   LPDIRECT3DSURFACE8   pSrcSurface,
> >   CONST PALET{*filter*}TRY*  pSrcPalette,
> >   CONST RECT*          pSrcRect
> > );

> > And for doing a screenshot for example I'm doing :

> >   Dim Surface As Direct3DSurface8, Surf2 As Direct3DSurface8

> >   Dim Data() As Byte
> >   Set Surface = Device.GetBackbuffer(0, D3DBACKBUFFER_TYPE_MONO)

> >   Dim w As Long, h As Long
> >   Dim Desc As D3DSURFACE_DESC
> >   Surface.GetDesc Desc

> >   Set Surf2 = Device.CreateImageSurface(Desc.width, Desc.height,
> > Desc.Format)

> >   Device.CopyRects Surface, ByVal 0, 0, Surf2, ByVal 0
> >   Surf2.GetDesc Desc

> >   D3DXSaveSurfaceToFileW "c:\debug.bmp", 0, ObjPtr(Surface), ByVal 0,
> ByVal
> > 0

> > It crashs VB in a GPF, no debug info is displayed.

> > Can anybody help me ?

> > Regards
> > Sylvain



Sun, 02 May 2004 17:23:36 GMT  
 DX8.1 Differences between VB and C++ libraries
If Mr. Gates would not have been in so much of a hurry to
force XP onto our desktops, I suspect the DX team would
have had much more time to finalize the runtime. I do get
very frustrated with all these frequent Windows releases.
This is the architectural change that needs to take place.
I'm not blaming it on your team, you guys are awesome in
my opinion. Nothing beats the support you give in these
newsgroups.

Sorry to vent, I just got kinda worked over for a minute. I'll
take my medication now...



Sun, 02 May 2004 23:22:37 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Using a C++ Library in VB

2. Using a C++ Library in VB

3. C++ library in VB?

4. Using a C++ Library in VB

5. Using a C/C++ static library from VB

6. Some problems DX8.0-DX8.1

7. VISUAL BASIC AND VISUAL C++ WHAT THE BIG DIFFERENCE

8. visual basic & c++ differences

9. Difference Between C++ and Visual Basic w/ DirectX

10. Difference between CDO and Outlook 98 Type Libraries?

11. Outlook 2003 C++ Runtime library error

12. Visual C++ Runtime Library Error

 

 
Powered by phpBB® Forum Software