Difference Between C++ and Visual Basic w/ DirectX 
Author Message
 Difference Between C++ and Visual Basic w/ DirectX

Hello,

I've been playing around with Visual Basic and DirectX,
and I've managed to create some fairly playable little
games, nothing too fancy though.  My question is, is C++
a better way to develop programs with DirectX, or Visual
Basic when it comes to speed?  Although I'm trying to use
all the little tricks to speed things up, like pre-
generating cos and sin tables for movement and things
like that,  my understanding is that Visual Basic is
inherently slower, but I'm not completely sure about this
one.  Can any one maybe shed some light on the subject or
possibly point me to an article about it?

Thanks.



Wed, 14 Jul 2004 04:21:05 GMT  
 Difference Between C++ and Visual Basic w/ DirectX
In general DirectX is written with a C++ interface in mind and then
there is a separate VB layer dx8vb.dll that uses this interface and
exposes it in a VB-friendly way.  Whether VB is actually faster than
C++ in general is a somewhat religious discussion among many people
and many argue that VB now holds its own since it compiles to P-code
and uses the same compiler backend that C++ does.  Aside from that
though, for DirectX you are going through an extra layer when you use
VB.  It may be that going through that extra layer has advantages that
make the trade-off worthwhile such as the safer memory management and
increased ease that VB gives you.

James

--
This posting is provided "AS IS" with no warranties, and confers no
rights.

On Fri, 25 Jan 2002 12:21:05 -0800, "Ravi Singh"

Quote:

>Hello,

>I've been playing around with Visual Basic and DirectX,
>and I've managed to create some fairly playable little
>games, nothing too fancy though.  My question is, is C++
>a better way to develop programs with DirectX, or Visual
>Basic when it comes to speed?  Although I'm trying to use
>all the little tricks to speed things up, like pre-
>generating cos and sin tables for movement and things
>like that,  my understanding is that Visual Basic is
>inherently slower, but I'm not completely sure about this
>one.  Can any one maybe shed some light on the subject or
>possibly point me to an article about it?

>Thanks.



Thu, 15 Jul 2004 03:16:39 GMT  
 Difference Between C++ and Visual Basic w/ DirectX
Hello,

Thanks for your response, it's much appreciated.  So I
gather than the extra layer probably does add some
overhead when it comes to working with DirectX and VB.  
But when it comes to mathematical functions, say, are
both approximately the same speed?  For example, I employ
the use of a collision detection equation which is
executed many times per frame.  If that identical
equation is executed in C++ the same amount of times,
will they both operate at the same speed?  Or more
simply, if I tell VB and C++ to both compute 1 + 1 in an
endless loop, which one would be reiterating the loop
faster?

And one additional question:  will subsequent versions of
DirectX continue to offer VB support?

Again, thanks for any help you can offer.

--Ravi Singh

Quote:
>-----Original Message-----
>In general DirectX is written with a C++ interface in
mind and then
>there is a separate VB layer dx8vb.dll that uses this
interface and
>exposes it in a VB-friendly way.  Whether VB is actually
faster than
>C++ in general is a somewhat religious discussion among
many people
>and many argue that VB now holds its own since it
compiles to P-code
>and uses the same compiler backend that C++ does.  Aside
from that
>though, for DirectX you are going through an extra layer
when you use
>VB.  It may be that going through that extra layer has
advantages that
>make the trade-off worthwhile such as the safer memory
management and
>increased ease that VB gives you.

>James

>--
>This posting is provided "AS IS" with no warranties, and
confers no
>rights.

>On Fri, 25 Jan 2002 12:21:05 -0800, "Ravi Singh"

>>Hello,

>>I've been playing around with Visual Basic and DirectX,
>>and I've managed to create some fairly playable little
>>games, nothing too fancy though.  My question is, is
C++
>>a better way to develop programs with DirectX, or
Visual
>>Basic when it comes to speed?  Although I'm trying to
use
>>all the little tricks to speed things up, like pre-
>>generating cos and sin tables for movement and things
>>like that,  my understanding is that Visual Basic is
>>inherently slower, but I'm not completely sure about
this
>>one.  Can any one maybe shed some light on the subject
or
>>possibly point me to an article about it?

>>Thanks.

>.



Thu, 15 Jul 2004 07:15:21 GMT  
 Difference Between C++ and Visual Basic w/ DirectX
The only really way to know for certain is build test programs and VB and
C++ and try them. However, I would expect VB to be somewhat slower, since
C++ programs usually don't include as much error checking as VB programs.
However, however even if there is a significant speed difference, it may
not matter much depending on the rest of the application. The best advice I
can give is to try it and see.

I believe that VB will continue to be supported in future versions of
DirectX. DirectX 9 is supported to continue to support the COM interface
that VB6 currently uses, and introduce a new managed interface so that
VB.NET and C# programmers can call DirectX directly.

      ..........Wayne

"Recycling electrons into words since 1996."
Visit www.JustPC.com for details about my Visual Basic books, including
my newest: Windows Game Programming With Visual Basic and DirectX,
and the ASP.NET Database Programming Bible. Subscribe to the JustPC
Developer's Journal - a free email newsletter for Visual Basic programmers


Quote:
> Hello,

> Thanks for your response, it's much appreciated.  So I
> gather than the extra layer probably does add some
> overhead when it comes to working with DirectX and VB.
> But when it comes to mathematical functions, say, are
> both approximately the same speed?  For example, I employ
> the use of a collision detection equation which is
> executed many times per frame.  If that identical
> equation is executed in C++ the same amount of times,
> will they both operate at the same speed?  Or more
> simply, if I tell VB and C++ to both compute 1 + 1 in an
> endless loop, which one would be reiterating the loop
> faster?

> And one additional question:  will subsequent versions of
> DirectX continue to offer VB support?

> Again, thanks for any help you can offer.

> --Ravi Singh

> >-----Original Message-----
> >In general DirectX is written with a C++ interface in
> mind and then
> >there is a separate VB layer dx8vb.dll that uses this
> interface and
> >exposes it in a VB-friendly way.  Whether VB is actually
> faster than
> >C++ in general is a somewhat religious discussion among
> many people
> >and many argue that VB now holds its own since it
> compiles to P-code
> >and uses the same compiler backend that C++ does.  Aside
> from that
> >though, for DirectX you are going through an extra layer
> when you use
> >VB.  It may be that going through that extra layer has
> advantages that
> >make the trade-off worthwhile such as the safer memory
> management and
> >increased ease that VB gives you.

> >James

> >--
> >This posting is provided "AS IS" with no warranties, and
> confers no
> >rights.

> >On Fri, 25 Jan 2002 12:21:05 -0800, "Ravi Singh"

> >>Hello,

> >>I've been playing around with Visual Basic and DirectX,
> >>and I've managed to create some fairly playable little
> >>games, nothing too fancy though.  My question is, is
> C++
> >>a better way to develop programs with DirectX, or
> Visual
> >>Basic when it comes to speed?  Although I'm trying to
> use
> >>all the little tricks to speed things up, like pre-
> >>generating cos and sin tables for movement and things
> >>like that,  my understanding is that Visual Basic is
> >>inherently slower, but I'm not completely sure about
> this
> >>one.  Can any one maybe shed some light on the subject
> or
> >>possibly point me to an article about it?

> >>Thanks.

> >.



Thu, 15 Jul 2004 12:44:57 GMT  
 Difference Between C++ and Visual Basic w/ DirectX
VB support isnt a complete wrapper ( especially in DirectShow ) and there is
a performance delta as compared to C++, although we have tried to minimize
that.

it really depends on your applications' needs. Some developers have fielded
DX VB applications, so it can be done.

--
Phil Taylor
PM : DirectX SDK, Managed DirectX, WindowsXP Inbox 3D Screensavers, and a
few more bits and bobs
http://msdn.microsoft.com/directx
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> Hello,

> I've been playing around with Visual Basic and DirectX,
> and I've managed to create some fairly playable little
> games, nothing too fancy though.  My question is, is C++
> a better way to develop programs with DirectX, or Visual
> Basic when it comes to speed?  Although I'm trying to use
> all the little tricks to speed things up, like pre-
> generating cos and sin tables for movement and things
> like that,  my understanding is that Visual Basic is
> inherently slower, but I'm not completely sure about this
> one.  Can any one maybe shed some light on the subject or
> possibly point me to an article about it?

> Thanks.



Wed, 14 Jul 2004 04:29:32 GMT  
 
 [ 5 post ] 

 Relevant Pages 

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

2. visual basic & c++ differences

3. Difference between Visual Basic 6 and Visual Basic.Net

4. Looking for differences between Visual Basic 5.0 enterprise and Visual Basic 5.0 Profesional

5. need some basic information on visual basic and visual c++

6. need some basic information on visual basic and visual c++

7. Visual C++ and Visual Basic and Visual J++

8. Visual C++ vs Visual Basic

9. Visual C++/Visual Basic/COM problem

10. visual basic vs. visual c++ which is better

11. Visual BASIC or Visual C++

12. Visual Basic Vs. Visual C++

 

 
Powered by phpBB® Forum Software