Seems like all the cool kids these days have converted their websites to completely static ones. I’m looking at you Mr. Haacked. I thought this was a pretty cool idea and a chance to really refresh my website so I decided to take a stab at it. It’s currently a work in progress.
I ended up writing my own tool I call Gatsby to do it. I also set up the whole deploy process myself involving pushing to Github which then informs my website to pull from the Github repository. Hopefully that will be a blog post in the not too distance future.
Sorry for any inconvenience.
Component Glue is an IoC container and you use it of course to wire up your object graphs for you. Component Glue can also build your object graphs for you automatically if there are no interfaces involved. Take this example:
In After.cs, you can see that Component Glue is able to build the entire object graph for us. This will include all future dependencies as well so long as interfaces don’t come into play. Should an interface be needed, you can just bind that single component.
This is a very powerful thing. If one component needs to take on a dependency, just ask for it in the constructor and Component Glue will handle it for you.
I finally brought Component Glue up to a state where I felt like the product was finished. You can get it via NuGet:
or you can get the source from GitHub. The documentation is definitely sparse I know but I recommend taking a look at the unit tests to get a feel for what you can do with Component Glue.
Credit for the NuGet CSS here.
I just released GLDotNet Version 0.6.0.
- **GLDotNet.Toolkit**: Assembly containing simple app framework.
- **GLDotNet.Objects**: Assembly containing higher level objects such as Texture2D and VertexBuffer.
- More overloads added to GLContext class.
- byte and sbyte are now mapped correctly in generated code.
- Fixed the naming of some functions so as not to include type notation, i.e. Color4u.
- Decreased the number of enum values output.
Today I released a project I’ve been playing around with for a year or so on Codeplex. It’s called GLDotNet. From the project description:
C# wrapper for OpenGL. Partially generated from the OpenGL spec and partially written by hand, the aim is to have a flexible and native feeling C# binding.
I have generated functions from the OpenGL spec excluding 1 or 2 but unfortunately of the generated code is untested. There is a demo project included in the source code. The Github repository is located here: https://github.com/smack0007/GLDotNet
I had a funny idea to describe HTTP Status Codes as telephone conversations so I thought I’d write it in a blog post.
- She’s not here right now but she’ll be back later.
- She doesn’t live here anymore, she now lives somewhere else.
- He hesn’t changed a bit.
- I can’t allow you to speak to him.
- $1.99 for the first minute…
- No one by that name lives here.
- It’s not you, it’s me.
- I can’t deal with this anymore.
The version of Snowball currently on GitHub under the “develop” branch has been split into multiple projects. There is now an assembly for each major piece of Snowball, such as Graphics, Input, Sound. Although this means having to reference more assemblies, the amount of code your project depends on is now smaller. This also makes code maintenance a bit easier as it’s more clear now what parts of the library depend on other parts of the library.
The parts of the library which really make up a Game Framework has also been split out into their own library. This allows for using Snowball as a just a simple set of libraries or a full blown game framework, depending on what your situation calls for.
I just want to post some information that took me while to find. Check out the original article here with pictures and more information.
1) First, download the zip file http://www.alinconstantin.net/download/VS2012Themes.zip – it contains the 7 pkgdef files defining the colors of the default themes from Matt’s extension. 2) Now, create a folder under “%ProgramFiles%\Microsoft Visual Studio 11.0\Common7\IDE\WDExpressExtensions”, and lets name it “Themes”. Unpack the zip file in that folder. 3) Open a ‘Developer Command Prompt for VS2012” window. In the command line, type “wdexpress.exe /updateconfiguration”. This will make Visual Studio to read the pkgdef files on next restart, and import the color themes into registry. 4) Launch Visual Studio Express, and now you should be able to see the new themes and switch them in Tools/Options dialog, Environment/General tab
I fixed a bug yesterday in Snowball related to a lost graphics device. I noticed that when I would use CTRL + ALT + DELETE, my apps were crashing. Turned out it was due to not recovering properly from a lost device.
The root of the problem was that I needed to call the ID3DXEffect::OnLostDevice() method when the device was being lost. This allows the effect to recover from the lost device. I’ve made the Effect class in Snowball now do this automatically.
I’ve now merged the “Shaders” branch back into the “master” branch. All rendering is now based on shaders and no longer on the fixed function pipeline.
The function of the Renderer class was essentially been reduced to pushing data to the GPU and therefore I decided to rename the class to GraphicsBatch. The Begin() overload which would allow you to specify RendererSettings has been removed and been replaced with an overload which allows you to specify an Effect file to use. Also, the DrawLine() method has been removed, although vertical and horizontal lines can still be drawn using the DrawFilledRectangle() method. Better line drawing should be possible through shaders and I hope to eventually make a sample which provides an example.
I’ve added a sample (pictured above) which demonstrates using a custom shader. By default, GraphicsBatch uses a BasicEffect class which is basically the old way of rendering implemented in a shader.
In order for shaders to work properly when using GraphicsBatch, the GraphicsBatch class must pass a few parameters to the shader. At the moment, this only includes a transform matrix but may include more parameters in the future. The GraphicsBatchEffectWrapper can be used to wrap custom effects which you write in order to work with GraphicsBatch correctly. GraphicsBatchEffectWrapper will pass the parameters to your shader by following a standard naming convention. For example, the transform matrix is passed to your shader through a parameter named “TransformMatrix”. You can also write you own class which implements IGraphicsBatchEffect. See the sample for an example of using the wrapper class.