Circular-Studios / Dash

A free and open 3D game engine written in D.
https://circularstudios.com/Dash
MIT License
421 stars 63 forks source link

[Input] Input.mouseObject always returns null #203

Open PxlBuzzard opened 10 years ago

PxlBuzzard commented 10 years ago

Something about 0.9.0 broke Input.mouseObject. I have tested in Spectral Robot and Sample-Dash-Game.

ColdenCullen commented 10 years ago

Just did a little debugging ,and I found that the mouse cursor position is correct, however the id here is always 2147483648, hence the null return value.

@zeDoctor any idea what would cause this?

ColdenCullen commented 10 years ago

Can confirm that reversing d3d95169a75d5581974dd989d46c27ac2f2da8f9 resolves the issue.

ColdenCullen commented 10 years ago

Can now confirm that the issue comes from reading from the Alpha channel, which is notoriously impossible.

wozniakty commented 10 years ago

Really? That's bizarre. I couldn't find a reason for it before, but I've been pretty swamped this week and last weekend so I hadn't dug too far in. Why is reading from alpha any different than the others I wonder?

ColdenCullen commented 10 years ago

This is related to Android, but probably applies here too.

ColdenCullen commented 10 years ago

Also side note, the cursor position is definitely wrong on my laptop.

PxlBuzzard commented 10 years ago

Hey @zeDoctor, any chance of tackling this tonight before 0.10.0 ships?

wozniakty commented 10 years ago

Ended up with a super busy weekend, so no :/ It looks like it could be that the Alpha channel gets lost when any blending is done, but I didn't think we did any blending on that particular FBO, so I'm pretty stumped as to why it's not working correctly.

PxlBuzzard commented 10 years ago

To add some confusion to this, Input.mouseObject works on my machine in the labs. Perhaps its an issue at the graphics driver / card level?