[vlc-devel] [PATCH] Direct3D shader support (HLSL)

Jean-Baptiste Kempf jb at videolan.org
Mon Aug 16 10:47:05 CEST 2010


On Sun, Aug 15, 2010 at 11:41:26PM -0700, Sasha Koruga wrote :
> >> +            char fileLocation[512];
> > MAX_PATH or something?
> 
> will fix (is MAX_PATH already declared?)
PATH_MAX it is, as src/win32/dirs will tell you.

> >> +        const char * shaderStrings[SHADEROPTIONSCOUNT] =
> >> {"convertbt", "widen", "detect", "gamma18", "gamma22", "gammabt",
> >> "invert", "grayscale"};
> > What happens if there are other shaders in the .fx file?
> 
> I was thinking of having something like "custom1" "custom2" "custom3",
> and then people could fill that in the shader file. If they think
> their particular shader code is useful to more people, then they can
> submit it.
> Sounds good?
> (so I'd change it to const char * shaderStrings[SHADEROPTIONSCOUNT] =
> {"convertbt", "widen", "detect", "gamma18", "gamma22", "gammabt",
> "invert", "grayscale", "custom1","custom2", "custom3"};
Something dynamic would be better.


> >> ((ID3DXEffect*)(sys->d3dxShader))->lpVtbl->SetBool(((ID3DXEffect*)(sys->d3dxShader)),
> >> shaderStrings[i], sys->shaderFXOption[i]);
> > Some Macros may make (ID3DXEffect*)(sys->d3dxShader) a bit more readable?
> 
> Is it ok to just declare something like [ID3DXEffect* effect =
> sys->d3dxShader;] at the beginning of the function? (seems that's what
> most ppl do throughout vlc)

I was thinking about a Macro...
Do as you think it is best.


-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/
+33 672 704 734



More information about the vlc-devel mailing list