Finding Picked Texture

BlitzMax Forums/MiniB3D Module/Finding Picked Texture

ima747(Posted 2008) [#1]
I'm trying to ultimately get the pixmap that's at a picked point. Using CameraPick I get the PickedEntity and PickedSurface.

Using GetSurfaceBrush on PickedSurface gets me a brush, but I has no texture associated with it. GetBrushTexture returns null and Brush.no_texs is 0.

The entity being picked is just a mesh made with CreateCube, and then a texture created through LoadTexture is applied.


Beaker(Posted 2008) [#2]
Does it work if you LoadBrush/PaintSurface instead of LoadTexture/EntityTexture?


ima747(Posted 2008) [#3]
Loading a brush and painting has the following results

PaintEntity = No change, no texture, no GetBrushTexture
PaintMesh & PaintSurface = the Brush.no_texs is 1, however GetBrushTexture still returns nothing

Everything is obviously displaying properly, I just can't get the texture off of things.

Using TSprites instead of meshes for my objects is the same as loadtexture, Brush.no_texs is 0 and GetBrushTexture is null

Possible bug in GetBrushTexture? Has anyone used it before with success? it's kind of an obscure function...

Update: Just tried Brush.tex[0] and it seems to be the right data, so it seems to be there, getbrushtexture just seems to be a dud...