Asmageddon Prince Posted March 8, 2008 Share Posted March 8, 2008 I downloaded the Vandermotten framework, but i changed my mind, and then modified the source, so it don`t use it. I made the config dialog, token parameters, and made them update, everything is good except one thing: The render loop do not change the image! Can somebody tell me why, here is the source: Effect1.zip Quote The Asmageddon is coming. You better prepare... or you won`t survive Link to comment Share on other sites More sharing options...
jchunn Posted March 8, 2008 Share Posted March 8, 2008 I downloaded the Vandermotten framework, but i changed my mind, and then modified the source, so it don`t use it.I made the config dialog, token parameters, and made them update, everything is good except one thing: The render loop do not change the image! Can somebody tell me why It is working, but the code is apparently not changing the pixels that you are writing out. Try this... At the end of your render function, change this: T = srcArgs.Surface.GetBilinearSampleWrapped(vx, vy); dstArgs.Surface[x, y] = T; To this: T = srcArgs.Surface.GetBilinearSampleWrapped(vx, vy); T = ColorBgra.Black; dstArgs.Surface[x, y] = T; All that is doing is turning every pixel to black. As you can see, it works fine... every pixel is turning back... so, in your code, "T" is getting written to the canvas, but apparently it is not being changed at all (or not enough to notice) by your code. I briefly reviewed you code, and it appears to be fine in terms of a working effect... I think your effect code is just not doing what you expect. I'd like to know if this helped or if you are still having troubles. Quote Total hack. Link to comment Share on other sites More sharing options...
Asmageddon Prince Posted March 11, 2008 Author Share Posted March 11, 2008 I know, that it does not change the pixel values, but this effect has been written in CodeLab, and then I decided to make it in Microsoft Visual Studio, for better UI. Quote The Asmageddon is coming. You better prepare... or you won`t survive Link to comment Share on other sites More sharing options...
MadJik Posted March 11, 2008 Share Posted March 11, 2008 You need this in the EffectPluginConfigToken.cs protected EffectPluginConfigToken(EffectPluginConfigToken copyMe) : base(copyMe) { // this.variable = copyMe.variable; this.Distance = copyMe.Distance; this.Angle = copyMe.Angle; this.Smoothing = copyMe.Smoothing; this.EffectMap = copyMe.EffectMap; this.other = copyMe.other; this.stretch = copyMe.stretch; } Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
jchunn Posted March 11, 2008 Share Posted March 11, 2008 You need this in the EffectPluginConfigToken.cs protected EffectPluginConfigToken(EffectPluginConfigToken copyMe) : base(copyMe) { // this.variable = copyMe.variable; this.Distance = copyMe.Distance; this.Angle = copyMe.Angle; this.Smoothing = copyMe.Smoothing; this.EffectMap = copyMe.EffectMap; this.other = copyMe.other; this.stretch = copyMe.stretch; } Good catch. Quote Total hack. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.