Jump to content

Help with coding texture references?


QPTECH
 Share

Recommended Posts

I've spent a week trying to sort this out, I just want to take a texture and apply it to something in code (OnTesselate)

 

I can't seem to find the right way to do this, just need to look up a specific texture and apply it to my model, I think this might be on the right track, but the texture is all white  (atlasBlock is a block that references all the textures I need,)

ITexPositionSource tps=  capi.Tesselator.GetTexSource(atlasBlock);
TextureAtlasPosition tap = tps["roundgauge-30"];
meshdata = meshdata.WithTexPos(tap);


(I can get it to work if my class implements ITexPositionSource with that "roundgauge-30" texture name, and using the same atlasblock)
 

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.