Set and Get blend Failure

BlitzMax Forums/BlitzMax Beginners Area/Set and Get blend Failure

DampeS8N(Posted 2009) [#1]
Been gone a looooong time, so if you remember me, forget what I was.

SetBlend and GetBlend, and maybe other related functions, I have not tested, fail. They produce a

Unhandled Exception: Attempt to access field or method of Null object

error

I'm using Vista, which I guess could be the problem. But I want to rule everything else out first.

This failure happens anywhere, not just in my code. All the examples I've found, what have you, also fail.


Any ideas? A search returned nothing useful to me.

Thanks!


plash(Posted 2009) [#2]
.. Did you call Graphics before trying to use any graphical commands?


DampeS8N(Posted 2009) [#3]
Certainly.

But that is good, because I hadn't considered other possible such conflicts.

Remember, this failure happens not just with my code. It happens with samples and tutorial code also.

Such as the code here:
http://www.2dgamecreators.com/tutorials/gameprogramming/images/T3_Images.html

Although, Ironically, the setblend(ALPHABLEND) example wouldn't have worked because of what you mentioned Plash. :)

The MASKBLEND example also fails. As does simply trying to print getblend() in my main loop. (Which is after graphics has been called, of course)

Any other ideas?


[[edit]]

You know, this might also be due to a poor install, now that I think about it. I mean, Graphics has to set the blend mode, so why won't the functions work? Maybe something between them got corrupted?

I'm going to try a fresh install

[[edit]]

A reinstall seems to have fixed the problem.