Pixmap Difficulties

BlitzMax Forums/BlitzMax Bug Reports/Pixmap Difficulties

I've been having difficulties with Pixmaps in my game engine, so I decided to try isolating different parts of the code to figure out what was causing it

the following does nothing (I get a black window):
Graphics(800,600,0,0)
TestPix:TPixmap=CreatePixmap(15,15,PF_RGBA8888)
White% = (255 Shl 24)|(255 Shl 16)|(255 Shl 8)|255
Black% = (0 Shl 24)|(0 Shl 16)|(0 Shl 8)|0
For X = 0 To 14
	For Y = 0 To 14
		WritePixel(TestPix,X,Y,Black)
	Next
Next
WritePixel(TestPix,0,0,White)
WritePixel(TestPix,0,14,White)
WritePixel(TestPix,14,0,White)
WritePixel(TestPix,14,14,White)
DrawPixmap(TestPix,200,200)
Flip
Delay(4000)


This makes no sense to me, there should be 4 white pixels there and there arent

The documentation is as always, utterly useless

What is the deal with pixmaps? how do I get them to actually show up? what is the mysterious command that I'm somehow missing here?

it works fine here:
windows xp sp2
AMD Athlon 64 x2 dual 4200+
Nvidia GeForce 7300GT
Bmax 1.28

what is your system specs?

I'm on:

Windows Vista Sp1 (No I don't like it and I'm saving up for an XP CD)
Intel Core2 Duo
NVIDIA GeForce 8600M
Bmax 1.28

to be honest, I think, even though I don't like it either, BRL needs to do something about this or we will be programming a dinosaur pretty soon. :-).
And I don't think the next operating system is going to make it any easier either.

Ok, so Pixmaps don't work on Vista?

Can I get around this by making them into images after construction?

.

you can allways try.
image:timage = loadimage(pixmap:tpixmap)

I suppose, thankyou for the help

I envy other countries where XP is still the norm, but its nearly impossible to get a new comp with it in this country anymore

Sadly since I'm mostly programming with other people in my country and will likely have an initial player base comming mostly from here, I must keep Vista in mind

Using PF_BGRA8888 gets it working here

Interesting. Azathoth, what OS are you using?
I'm using Vista sp1 and PF_RGBA8888 isn't working but PF_BGRA8888 is working.
But I am also using a GeForce 8800 GT. I've noticed that those who are not getting it to work are all using 8000 series GeForce cards.
Fact is, BMax is still using DirectX 7, possibly 8000+ cards are not fully compatible with it.
The only way to tell is to try it on Vista machines with other cards (ATI and < 8000 NVidias) and also try it on non-vista machines with 8000+ cards.

I have an 8800GT and using XP SP2, both pixel formats work for me.

I've just tried on my Vista x86 PC, which has a nVidia 7600GTS Go graphics card. Works perfectly when using OpenGL, but DirectX doesn't work - it seems as though the pixmap isn't drawn.

PF_RGBA8888 doesn't work here, but PF_BGRA8888 does. But using GLMax2DDriver with PF_RGBA8888 works.
It could be a DirectX/Driver issue.

Fact is, BMax is still using DirectX 7, possibly 8000+ cards are not fully compatible with it.

I had a game quite a few years ago that worked well with DX5/6 but screwed the sound up something terrible when used with DX7. MS have a habbit of breaking Directx once in a while.

OS Vista Ultimate 32bit
nVidia 8800 Ultra
Current Driver is 175.16
DirextX 10

I've stepped through the code and it's the...

surf.GetDC(srcdc)
...in d3d7max2d.bmx which seems to be causing the trouble as it is giving simply 0 as the DC for alpha pixmaps.

Although it seems that Microsoft have removed a lot of their DirectX 7 docs from MSDN, the following page refers to the DirectX 9 equivalent:

http://msdn.microsoft.com/en-us/library/bb205894(VS.85).aspx

This might be our problem:
Formats that contain Alpha are not supported because the GDI implementations don't have a well-defined behavior on the alpha channel.

Although, that doesn't really explain why it's working on Windows XP but not Vista.

Perhapse something to do with DX10 which XP (as far as I'm aware) doesn't support?

works for me..

NVIDIA 9600 GT Video card, windows XP OS, P4 3GHz processer