cant write to pixamp???
BlitzMax Forums/BlitzMax Beginners Area/cant write to pixamp???
| ||
Hi all, bit of a newbie question, as I don't understand why I cant get my pixmaps to work! Graphics 640, 480 Global pmap:TPixmap = CreatePixmap(100, 100, PF_RGBA8888) For x = 1 To 99 For y = 1 To 99 WritePixel(pmap, x, y, $ff0080ff) Next Next DrawPixmap pmap, 0, 0 Flip WaitKey End returns to me a black screen.... What am I doing silly/wrong? |
| ||
That code works fine for me. |
| ||
No problem here, nice blue - cyan like rect at top left as it should be. perhaps you are running in 16bit mode, in that case you can not use RGBA8888 |
| ||
oh crap :-( What OS you using? I just get a black screen. can someone with Vista use this? [edit] OK, just had 2 spontaneous system restarts. Lovely. |
| ||
If you are on Vista, make sure that you are on the most current drivers and that the driver is for sure OpenGL unless you are on NVIDIA. I'm on XP here, vista is currently on an inactive partition waiting for SP1 to make it an OS, not a 10GB trashbin :) |
| ||
Im on a laptop, which means i'm stuck on whatever drivers toshiba bother to pump out. I can hack other drivers, but nothing else works. are pixmaps even anything to do with the GFX cards? I thought they only became involved with the gfx card when it came to images. ANyway, i hacked other Nvidia drivers (which do work, they just dont support the laptops ACPI "features") and i get the same problem. Games DO work, and Crysis works with the 169.xx drivers, but pixmaps seem a nono!? |
| ||
www.laptopvideo2go.com if you are on NVIDIA, that are mobiles. NEVER mod desktop NVIDIAs for mobiles, that hardly ever ends usefully. Yes it has something to do. You try to use it in window mode ... unless you disabled aero fully this means that you render it to a texture on the desktop. So potentially some WDDM stuff could interfer. Did you try what happens if you switch into fullscreen? (or potentially into opengl) |
| ||
try it repeat Flip until keyhit(key_escape) |
| ||
LOL, Dreamora, the laptopvideo2go drivers are what I do use. thats where I get the modded INFs :-) (I can do this manually but i prefer tested mods.) Strangely, if I don't use toshibas drivers then I do not get the fan working on the laptop, however, since I upgraded to vista this hasn't been an issue (there are so many people who don't believe me when I say that haha...) Also, I do hae Aero disabled. That thing sucks windowed performance like I suck orange juice. Strangely, i've got a workaround to the problem, and still don't know what the cause is. If I create the pixmap by GRABing it, and then modify it, it works. The following code actually works for me... Global pmap:TPixmap = GrabPixmap(0, 0, 100, 100) For x = 1 To 99 For y = 1 To 99 WritePixel(pmap, x, y, $ff0080ff) Next Next DrawPixmap pmap, 0, 0 Flip WaitKey End |
| ||
What if you create your pixmap in the format the "grabbed pixmap" has? bye MB |
| ||
done that. It's strange. I've tried about 12 driver versions and found one that worked, so I am able to continue. I guess it's just yet another implementation "error" with this particular mobile card. :-( Thanks for your help guys- looks like it was a driver problem after all. :-) |