Computer Science Canada semi shading? |
Author: | MihaiG [ Sat Feb 25, 2006 1:47 pm ] | ||
Post subject: | semi shading? | ||
well this is sortoff a shading program i am working on.....its ok so far.. but i need some tips on optimizing... and i cant get it to work so u draw in -y or - x direction from where mosue is clicked and dragged and how can i make it more efficient ![]()
|
Author: | Delos [ Mon Feb 27, 2006 10:35 am ] | ||
Post subject: | |||
For your shade proc, try this instead:
Neat, eh? Now, for your main loop, look into Mouse.ButtonWait() and Mouse.ButtonMoved(). Specifically, look at the example that comes with F10. You should be able to edit that to get something. The best I was able to come up with (without too much work) was one where you click at one point, drag, release, and a clean shading is drawn. The only set back was that there was no indicator as to where the box would start and end...but that's not too difficult to get around. No, not posting my code was not a mistake...I'll let you mull over it a little bit before I do that. Uh, if I do... |
Author: | MihaiG [ Mon Feb 27, 2006 6:41 pm ] |
Post subject: | |
well...you read my mind... i am working on that kind of program like drag and release...but i want to make it so when you draw and move the mouse the shading gradient thingy doesn change and it doesnt look like grey lines but grey dots.. ![]() |
Author: | batman [ Thu Mar 02, 2006 9:00 pm ] |
Post subject: | Shading program |
Your shading program didn"t work on my computer. Nothing was outputed on the output screen. |
Author: | [Gandalf] [ Thu Mar 02, 2006 9:43 pm ] |
Post subject: | |
If it doesn't work, that is your computer's fault. More likely, you didn't check to see what the program does. It doesn't output anything by default, try clicking around with the mouse, clicking and dragging. |
Author: | batman [ Thu Mar 02, 2006 9:50 pm ] |
Post subject: | shading program |
Oh! Ok after I clicked around and did it the right way this time, the program is pretty cool. Its easier for some reason to shade in the middle part of the screen then in the far end corners though. |
Author: | DaftPunk [ Thu Mar 02, 2006 11:45 pm ] |
Post subject: | Cool |
This little code is pretty cool. Although on my screen it only shows up the first time I drag and drop. What are you planning on doing with it? Just shading pics? |
Author: | Booya [ Sun Mar 05, 2006 7:08 pm ] |
Post subject: | Shading Program |
Awesome shading program your really talented at turing. |
Author: | do_pete [ Tue Mar 07, 2006 1:47 pm ] | ||
Post subject: | |||
You could try something like this, but it is too slow to be practicle
|
Author: | MihaiG [ Tue Mar 07, 2006 8:18 pm ] |
Post subject: | |
ya...ur combining olours...thats really slow...and u rdoing it for eveyr pixel do it for eveyr other one and i twould run way faster.. ![]() |
Author: | MysticVegeta [ Wed Mar 08, 2006 10:47 pm ] |
Post subject: | |
yes but then it loses its effect too =\ |
Author: | do_pete [ Thu Mar 09, 2006 12:37 pm ] |
Post subject: | |
Is there a way to make it quicker without losing the effect? |
Author: | MihaiG [ Thu Mar 09, 2006 6:50 pm ] |
Post subject: | |
think about it if u drag a box 10x10 its 100 pixels so ur doing that calculation 100 times...ok. lets say ur box is 100,100 = 10,000 that starts to get really slow and finaly if our box is 400,700 its 280,000 pixels it has to calculate so its gonna be very inneficient ![]() |