wow, it works!
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1190 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -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; } }
|
||||
|
||||
Reference in New Issue
Block a user