wow, it works!

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1190 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2007-07-13 09:15:06 +00:00
parent bbbb25909a
commit d37bab15d0
16 changed files with 136 additions and 57 deletions

View File

@@ -13,10 +13,15 @@ namespace OpenRa.Game
readonly GraphicsDevice device;
readonly Effect shader;
readonly IntPtr r1Handle, r2Handle, baseTextureHandle, scrollHandle;
readonly IntPtr r1Handle, r2Handle, baseTextureHandle, scrollHandle, paletteHandle;
const string shaderName = "diffuse.fx";
public void SetPalette(HardwarePalette hp)
{
shader.SetTexture(paletteHandle, hp.PaletteTexture);
}
public Renderer(Control host, Size resolution, bool windowed)
{
host.ClientSize = resolution;
@@ -30,6 +35,7 @@ namespace OpenRa.Game
scrollHandle = shader.GetHandle("Scroll");
r1Handle = shader.GetHandle("r1");
r2Handle = shader.GetHandle("r2");
paletteHandle = shader.GetHandle("Palette");
}
public GraphicsDevice Device { get { return device; } }