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 [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||
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 | |||||
Reporter | Manni | |||||||||
Assigned To | ||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||
Status | new | Resolution | open | |||||||
Platform | all | Operating System | all | Operating System Version | all | |||||
Product Version | 0.9.1.0 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0008867: osDrawImagefromInventory | |||||||||
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); } //OSSL_Api.cs public string osDrawImagefromInventory(string drawList, int width, int height, string texture) { CheckThreatLevel(); drawList += "Image " + width + "," + height + "," + texture + "; "; return drawList; } //IOSSL_Api.cs string osDrawImagefromInventory(string drawList, int width, int height, string texture); //OSSL // Example of osDrawImagefromInventory default { state_entry() { 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) | |||||||||
Physics Engine | BulletSim | |||||||||
Script Engine | YEngine | |||||||||
Environment | Mono / Linux64 | |||||||||
Mono Version | 6.x | |||||||||
Viewer | Singularity | |||||||||
Attached Files | ![]() | |||||||||
![]() |
||||||
|
![]() |
|
(0037567) tampa (reporter) 2021-02-14 03:27 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. |
(0037573) Manni (reporter) 2021-02-15 03:18 |
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. |
![]() |
|||
Date Modified | Username | Field | Change |
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 |