Weird GrabPixmap Problem! Bug?!?

BlitzMax Forums/BlitzMax Programming/Weird GrabPixmap Problem! Bug?!?

maverick69(Posted 2007) [#1]
I have a weird problem with the GrabPixmap Command.

First of all: Everything with it works fine on my laptop - and I was sure it also worked on my main system a few weeks ago, but now the following problem occurs:

The following code

PixmapCheck = GrabPixmap(4,66,449,394)


does only return a black rectangle. It works in window mode, not in fullscreen mode. It also works on my laptop (also in fullscreen mode).

If I grab the image two times everything works fine.

PixmapCheck = GrabPixmap(4,66,449,394)
PixmapCheck = GrabPixmap(4,66,449,394)


It seems to be a similar problem a user had some time ago with Ubuntu (check this thread: http://blitzmax.com/Community/posts.php?topic=68141).


tonyg(Posted 2007) [#2]
What's the machine spec? What's the smallest code which fails? What driver are you using? What happens when you use the other driver?


Dreamora(Posted 2007) [#3]
sounds like the drawing operation is done to a different backbuffer than the grabbing ...

grabbing most likely is done on the first and drawing on the current which might be 3 - X (X for DirectX).
In windowed mode this can not happen but in fullscreen it can.

that grabpixmap helps just makes this feeling stronger that it is some kind of flip chain issue.


maverick69(Posted 2007) [#4]
i have a ati 9700 pro with the latest drivers. could it be possible that the problem occurs because of my 22" widescreen tft?? because the code worked a few weeks ago, and the only thing that changed at my hardware was the display.

i use the directx-renderer. hmmm... when i switch to opengl blitzmax isn't able to create the screen. i think something's wrong with my drivers because this also worked a few weeks ago.


Derron(Posted 2007) [#5]
Which resolution are you using? If you bought a cheap 22" the resulotion it can handle may only be 1400x900 or so.

Otherwise the display won't be a problem... or...ahm... it's a TFT...and your former was a TFT too? Check the Hertz-count, may be your TFT only accepts 60 and 50Hz instead of 70 like nearly all other TFTs...


To your "two times pixmap grabbing" - thats the way I had to solve some grabpixmap-problems too, if only used one grabbing, some border-blurrishness around the grabbed rect occoured. grabbed one frame later, the thing worked like it was supposed to. And yes: i tried to create an empty pixmap before, cleared the image, cleared the pixmap (bmax-command)... nothing changed until I said: grab more than one time after it has been drawn the first time.

On Integrated GraphicsCards and DX-Mode the problem of grabimage not working still exists (garbage grabbed).

Hope this thread will give some solutions.


bye
MB


maverick69(Posted 2007) [#6]
no it's no cheap tft. i've used a standard 19" monitor before the tft.

and no, i don't grab the second pixmap one frame later. i grab it in the same frame only a second time (the next line in my code) without a flip between or anything else. that's what i don't understand.


Derron(Posted 2007) [#7]
Hmm... may be you just have to try to clear the pixmap once you created it before you grab it. So for testing:
- create a temporary pixmap
- clearpixels
- grabpixmap into it
- have a look if it changed something


bye
MB