Website may be up and down over next few months. I'm currently doing a complete overhaul of everything. Going back to simple individual .htm pages, new overall site theme, sanitizing and cleaning up html of all pages and blog posts, attempting to implement a new tooling and publishing system etc etc.

After installing the DirectX 9 SDK some people could not see any of the managed DirectX assemblies/DLL's under the the "Add References" dialog. Which meant that they had to try and reinstall the DX9 sdk again. Uuugghh! Or they had to do what I was doing, which was to put all of the managed DX9 assemblies into a folder like "c:\dx9\" and manually navigate to that folder to add a reference to the assenblies.

Well a better solution has just come to my attention!

1: First open Regedit(Start | run | "Regedit").
2: Then navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders\" and right click the "AssemblyFolders" Icon and select New | Key and name it "DirectXAssemblies" or whatever you like.
3:Now go to the "DirectXAssemblies" folder and double click the "(default)" key and and type in the path to your managed DirectX assemblies/DLL's: should be something like "C:\WINDOWS\Microsoft.NET\Managed DirectX\v9.00.0900"

Now fire up a new instance of VS.NET, start a new project and open up the "Add References" dialog and presto! You should see all of the Managed DirectX assemblies in the list.

Also note that you can do this multiple times and specify multiple folders!

I can't take credit for finding this out, all the credit goes to out to ThePentiumGuy.


Crazy Crazy :p

Published 5/24/2004 by createdbyx in News

whoot! whoot! 203 overloads! whoot! whoot!


I have continued to play around with loading embeded resource data files and have come up with a alternative way to create a D3DTexture from an embeded resource image. This new method seems more apropreate. (To me at least :p )

If you are wondering why I am loading embeded resource images rather than simply loading and creating a D3D texture from a file, it is because external files can be lost and can result in you app not being able to run. Not that I will be doing this for every app I write!

    Protected Friend Function LoadResource(ByVal ResourceName As String) As IO.MemoryStream
        Dim ResourceStream As IO.Stream

        ResourceStream = Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(ResourceName)

        If ResourceStream Is Nothing Then Return Nothing
        Dim byts(CInt(ResourceStream.Length - 1)) As Byte
        Dim Len As Integer = ResourceStream.Read(byts, 0, CInt(ResourceStream.Length))

        Dim MemStream As New IO.MemoryStream(byts, 0, Len)
        Return MemStream
    End Function

    Protected Friend Function LoadResourceImage(ByVal ResourceImageName As String) As Direct3D.Texture
        Dim Mem As IO.MemoryStream
        Mem = LoadResource(ResourceImageName)       

        ' attempt to load/create image we saved to memory stream
        Dim Tex As Direct3D.Texture
        Tex = Direct3D.TextureLoader.FromStream(mobjGraphics.Device, Mem)
 
        ' done with varibles
        Mem.Close()
        Mem = Nothing  

        ' return reference to texture
        Return Tex
    End Function

I have added a cool little code snip that demonstrates a way of loading a image that was added to a project and declared "Embeded Resource" at design time, and returns a newly created D3D texture.
The code is written in vb.net and DX9.

Private Function LoadResourceImage(ByVal ResourceImageName As String) As Direct3D.Texture
        Dim Mem As New IO.MemoryStream()
        Dim Img As Bitmap

        ' attempt to create bitmap from embeded resource
        Img = New Bitmap(Me.GetType, ResourceImageName)

        ' save image to memory stream
        Img.Save(Mem, Drawing.Imaging.ImageFormat.Png)

        ' seek to start of stream
        Mem.Seek(0, IO.SeekOrigin.Begin)

        ' attempt to load/create image we saved to memory stream
        Dim Tex As Direct3D.Texture
        Tex = Direct3D.TextureLoader.FromStream(mobjGraphics.Device, Mem)

        ' done with varibles
        Mem.Close()
        Mem = Nothing
        Img.Dispose()
        Img = Nothing

        ' return reference to texture
        Return Tex
End Function

DX9Tools overkill?

Published 5/14/2004 by createdbyx in News

I am just finishing off merging the GameToolsR2, DXEliminatorR2, and EasyRenderSystemR1 libraries into the DX9Tools library. And then I got to counting ...

The DX9Tools solution references about 40 different projects! That's alot of projects. =)

So in addition to merging the libraries I am also going to merge all of the DX9Tools Example projects into one. This should help to simplify things as well as help speed up both the compile process and vb.net's background compile feature.


DX9Tools update...

Published 5/14/2004 by createdbyx in News

I have uploaded the 5.53mb snapshot of the full DX9Tools R5 solution. Including ...

GameToolsR2 <- this is also a pre-release
MAXExport and the maxscript for exporting scene data compatible with 3DS MAX v3 and above
MSAni maxscript parser exporter <- possibly discontinued because MAXExport replaces it
DXEliminatorR2 <- this is also a pre-release
Easy Rendering System project. <- work in progress

NOTE: That this is not to be considered an actual release just a third pre-release snapshot.

I am thinking that I am going to merge the DX9Tools, GameTools, and DXEliminator libraries into the DX9Tools library. This would help to unify all three libraries as well as redudce the complexity of having to manage 3 seprate libraries, and should make it easier for all of you who are using the libraries.

I am also thinking I am not going to bother uploading "pre-release snapshots" for DX9Tools but instead, just make a release even if that release contains code that is not complete or simply does not work yet.

You can find link to download the DX9Tools R5 snapshot3 here ...
DX9Tools at gotdotnet


Pardon the interruption

Published 5/12/2004 by createdbyx in News

Excuse the discontinuity on my site I am in the process of adding comment features to my blog hopfully should get it working by tomorrow. But for now it's nap time...


You can post your comments!

Published 5/12/2004 by createdbyx in News

I have finished tweaking my blog with a slightly new look as well as the ability to add comments to my blog posts! I have been wanting a user comments feedback functionality for some time now.


I have took my May 12, 2004 block post titled "IDEA: Textured Index Buffers for D3D" and have posted under a number of fourms located at...

xtremevbtalk
vbgamer
intheoryforum


I have written a new article regarding an idea I have about "Textured Index Buffers for D3D"

Textured Index Buffers for D3D


Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume