This project is read-only.

Mouse and Graphics

Mar 28, 2012 at 2:01 AM

Im trying to create a cursor for my or with SVGA, and i'm wondering why setpixel wont work for me (right now i'm just drawing a 1x1 rectangle instead) it seams weird that you can draw rectangles but not plot pixels... And also, how would i go about making a cursor move correctly, it seems to move like 300 pixels downward, then stops, i had it working before, then i changed some code (silly me). and 1 more thing, when i had it working, i was trying to get it to be able to move, but not leave a trail, how would i do this?

Thanks in advance :)

Mar 28, 2012 at 2:04 AM
farlepet wrote:

Im trying to create a cursor for my or with SVGA, and i'm wondering why setpixel wont work for me (right now i'm just drawing a 1x1 rectangle instead) it seams weird that you can draw rectangles but not plot pixels... And also, how would i go about making a cursor move correctly, it seems to move like 300 pixels downward, then stops, i had it working before, then i changed some code (silly me). and 1 more thing, when i had it working, i was trying to get it to be able to move, but not leave a trail, how would i do this?

Thanks in advance :)

Ah well, I know just the problem. After doing any SetPixel, or anything, when you are all done drawing. You need to a .Update() to make them visiable. And I know the clear function is messed up so I recommend

For(int y =0; y < screenheight;y++0) {

For (int x = 0; x < screenwidth;x++) {

}

Also if you want a really good example of working with the SVGA look at PearOs.codeplex.com I have full working stuff. And by tonight I will commit my code which has Transparent rectangles, images, gradients. Ect. Hope it helps - Matt

Mar 28, 2012 at 2:11 AM

Thanks! You have helped many times before, and thanks for helping me again. I may look at some of your code for the cursor to try to get that working, thanks!

Mar 28, 2012 at 2:14 AM
farlepet wrote:

Thanks! You have helped many times before, and thanks for helping me again. I may look at some of your code for the cursor to try to get that working, thanks!

No problem, I love helping whenever I can. Feel free to. Thats what it there for. Your welcome. - Matt