New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
Go Back  Xtreme Visual Basic Talk > > > New Tutorial for Direct3D in Visual Basic .Net


Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2005, 01:25 AM
slyprid's Avatar
slyprid slyprid is offline
Freshman
 
Join Date: May 2002
Location: Grafton, IL
Posts: 43
Default New Tutorial for Direct3D in Visual Basic .Net


I'm working on a series of tutorials to teach how to use Direct3D in Visual Basic.Net

This only the first in the series, and will be releasing more in the future. Hope it helps, also added in some definitions and links to other sites to help explain some of the terminology used with 3D programming.

Thanks for your time,

Slyprid
Attached Files
File Type: zip Tutorial1.zip (17.6 KB, 41 views)
Reply With Quote
  #2  
Old 05-25-2005, 11:44 AM
Thrawn Thrawn is offline
Newcomer
 
Join Date: May 2005
Location: Los Angeles, CA
Posts: 1
Default

Quote:
Originally Posted by slyprid
I'm working on a series of tutorials to teach how to use Direct3D in Visual Basic.Net

This only the first in the series, and will be releasing more in the future. Hope it helps, also added in some definitions and links to other sites to help explain some of the terminology used with 3D programming.

Thanks for your time,

Slyprid
Excellent! Thanks very much. More would of course be appreciated.
Reply With Quote
  #3  
Old 05-25-2005, 02:42 PM
bear24rw's Avatar
bear24rw bear24rw is offline
Contributor
 
Join Date: May 2004
Location: NJ
Posts: 477
Thumbs up

That is a very nice tutorial, however i did find one thing that i needed to change in order for it to work...

Original...
Code:
device = New device(0, DeviceType.Hardware, hWnd, CreateFlags.HardwareVertexProcessing, aP)

I got an error saying that Device is a type

New...
Code:
Imports Microsoft.DirectX Imports Microsoft.DirectX.Direct3D Module DX9 Public Device As Device 'ADDED Sub SetScreen(ByVal width As Integer, ByVal height As Integer, ByVal bpp As Integer, ByVal hWnd As System.IntPtr, ByVal winMode As Boolean) Dim aP As New PresentParameters aP.BackBufferCount = 1 aP.AutoDepthStencilFormat = DepthFormat.D16 aP.EnableAutoDepthStencil = True aP.DeviceWindowHandle = hWnd aP.SwapEffect = SwapEffect.Flip If winMode Then aP.Windowed = True aP.DeviceWindow.Width = width aP.DeviceWindow.Height = height Else aP.Windowed = False aP.BackBufferWidth = width aP.BackBufferHeight = height If bpp = 16 Then aP.BackBufferFormat = Format.R5G6B5 Else aP.BackBufferFormat = Format.X8R8G8B8 End If End If Device = New Device(0, DeviceType.Hardware, hWnd, CreateFlags.HardwareVertexProcessing, aP) End Sub End Module
Just added a public variable declaring Device as Device
Great tutorial... i would like to see more (and possibly a set of tutorials on DirectDraw too )
__________________
Use[vb][/vb] tags when posting code.
Reply With Quote
  #4  
Old 05-30-2005, 06:00 PM
Moohasha's Avatar
Moohasha Moohasha is offline
Centurion
 
Join Date: Nov 2004
Location: Texas
Posts: 165
Default

That's a nice little introductory tutorial to DX9. I've worked with DX8 in VB6 previously, but I've been wanting to move to DX9. I have a question really fast. I don't know if it's a .Net thing or a DX9 thing, but I noticed there isn't any cleaning up of objects. For example, in DX8 when the program would terminate you would want something like this in the Unload event:
Code:
Set DX = Nothing ' Destroy the DirectX object Set D3D = Nothing ' Destroy the Direct3D object Set D3DDevice = Nothing ' Destroy the Direct3DDevice object End
You could get by without it, but it was better to clean up after yourself rather than relying on Windows to do it. Is this just handled by .Net garbage cleanup now?
__________________
"The whole trouble comes from the fact that there is so much tinkering with software. It is not made in a clean fabrication process, which it should be. What we need, is software engineering." — F.L. Bauer, 1968

Last edited by lebb; 05-30-2005 at 09:47 PM. Reason: Split to own thread
Reply With Quote
  #5  
Old 05-31-2005, 01:26 AM
slyprid's Avatar
slyprid slyprid is offline
Freshman
 
Join Date: May 2002
Location: Grafton, IL
Posts: 43
Default

Yeah, I need to revise some of the tutorial and plan on making more on it. It is best to clean up things, and will add them in on the next revision. Thanks for all the feedback its been great.

Slyprid
Reply With Quote
  #6  
Old 05-31-2005, 02:04 AM
slyprid's Avatar
slyprid slyprid is offline
Freshman
 
Join Date: May 2002
Location: Grafton, IL
Posts: 43
Smile Revised Tutorial 1

I revised Tutorial 1 to add in some suggestions from peoples feedback. I appreciate all the feedback, and would greatly appreciate more to help make this into a better tutorial. I would also like to say the next tutorial is in the works as we speak.

-Version 1.1-
Added in some changes that caused the tutorial to bug on occasion.
Added in disposal methods.
Added in source code.

Slyprid

Last edited by lebb; 05-31-2005 at 08:06 AM. Reason: Removed attachment containing exe's
Reply With Quote
  #7  
Old 05-31-2005, 08:06 AM
lebb's Avatar
lebbNew Tutorial for Direct3D in Visual Basic .Net lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

Could you please re-post your attachment with source only? Thanks.
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
  #8  
Old 05-31-2005, 12:07 PM
slyprid's Avatar
slyprid slyprid is offline
Freshman
 
Join Date: May 2002
Location: Grafton, IL
Posts: 43
Default

Here we go, appologize about that. Always forget to remove that exe in the bin folder before I upload.

Slyprid
Attached Files
File Type: zip Tutorial1.zip (41.2 KB, 16 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
 
New Tutorial for Direct3D in Visual Basic .Net
New Tutorial for Direct3D in Visual Basic .Net
 
-->