|Anonymous | Login | Signup for a new account||2021-03-02 13:00 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008867||opensim||[REGION] Script Functions||public||2021-02-14 00:57||2021-02-15 03:18|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Platform||all||Operating System||all||Operating System Version||all|
|Target Version||Fixed in Version|
|Description||I am not getting osDrawImagefromInventory to work. |
The osDrawImage function of URL is too slow and cumbersome.
See article: https://forums.osgrid.org/viewtopic.php?f=5&t=6676&hilit=osDrawImagefromInventory [^]
What am I doing wrong?
|Steps To Reproduce||//OSSL_Stub.cs|
public void osDrawImagefromInventory(string drawList, int width, int height, string texture)
m_OSSL_Functions.osDrawImagefromInventory(drawList, width, height, texture);
public string osDrawImagefromInventory(string drawList, int width, int height, string texture)
drawList += "Image " + width + "," + height + "," + texture + "; ";
string osDrawImagefromInventory(string drawList, int width, int height, string texture);
// Example of osDrawImagefromInventory
string CommandList = ""; // Storage for our drawing commands
CommandList = osMovePen( CommandList, 0, 0 ); // Upper left corner at <0,0>
// the first texture alphabetically inside the same prim's inventory
string texture = llGetInventoryName(INVENTORY_TEXTURE, 0);
CommandList = osDrawImagefromInventory( CommandList, 256, 100, texture ); // 256 pixels by 100 pixels
// Now draw the image
osSetDynamicTextureData( "", "vector", CommandList, "width:256,height:256", 1 );
|Tags||No tags attached.|
|Git Revision or version number|
|Run Mode||Grid (Multiple Regions per Sim)|
|Environment||Mono / Linux64|
|Attached Files||0001-osDrawInventoryImage-ossl-part.patch [^] (3,571 bytes) 2021-02-14 03:27 [Show Content]|
edited on: 2021-02-14 03:29
Because that's not how that works. The dynamic texture system retrieves the texture from the url, an item name is not a url. In order to do this properly one first needs to fetch the asset reference by item name, then still setting that up to parse into dynamic texture system would mean adding a way to parse straight asset data as Image directive for the parsing rules is handled as url still.
This is what the DynamicID parameter was supposed to do or at least something similar, but this has yet to be implemented. In order to do that some handling for asset image data would need to be added to the dynamic texture module, which might not be so easy(image handling is always complex subject).
You know there is llSetTexture, which can display a texture from inventory, if you still want to draw on that you can do so using the dynamic texture on a second prim using the Blend variant to make the texture of the prim underneath visible.
I added the ossl part as patch, it is a bit crude still and the texture manager part is still missing, but that part is rather complex so I don't feel like messing with it right now.
I did not know that it was so complicated because there is llSetTexture and I assumed that this could be easily adapted.
the blend variant was unknown to me until now.
|2021-02-14 00:57||Manni||New Issue|
|2021-02-14 03:27||tampa||Note Added: 0037567|
|2021-02-14 03:27||tampa||File Added: 0001-osDrawInventoryImage-ossl-part.patch|
|2021-02-14 03:29||tampa||Note Edited: 0037567||View Revisions|
|2021-02-14 03:36||tampa||Relationship added||related to 0008480|
|2021-02-15 03:18||Manni||Note Added: 0037573|
|Copyright © 2000 - 2012 MantisBT Group|