OsSetDynamicTextureDataBlendFace

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc|
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
threat_level = VeryLow
|- valign="top"
+
|
|'''Threat Level''' || VeryLow
+
function_syntax = <source lang="lsl">
 
+
|- valign="top"
+
|'''Function Syntax''' || <source lang="lsl">
+
 
LSL: string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType,  
 
LSL: string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType,  
 
       string data, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face)
 
       string data, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face)
Line 11: Line 8:
 
       string data, string extraParams, bool blend, int disp, int timer, int alpha, int face)
 
       string data, string extraParams, bool blend, int disp, int timer, int alpha, int face)
 
</source>
 
</source>
|- valign="top"
+
|
|'''Example(s)||<source lang="lsl">
+
ossl_example = <source lang="lsl">
 
// Example of osSetDynamicTextureDataBlendFace used to put a number on each face of a prim
 
// Example of osSetDynamicTextureDataBlendFace used to put a number on each face of a prim
 
string FontName = "Arial";
 
string FontName = "Arial";
Line 45: Line 42:
 
     }
 
     }
 
}</source>
 
}</source>
 +
|
 +
additional_info = Returns UUID of the generated texture. Intended to be used with subsequent calls to osSetDynamicTextureXXXX functions in order to modify the texture.
  
|}
+
'''NOT IMPLEMENTED YET;''' the current implementation always returns a string with NULL_KEY.
 +
|
 +
}}
  
Returns UUID of the generated texture. Intended to be used with subsequent calls to osSetDynamicTextureXXXX functions in order to modify the texture. NOT IMPLEMENTED YET; the current implementation always returns a string with NULL_KEY.
+
{|  width="100%" style="border: thin solid black"
 +
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
 +
|- valign="top"
 +
|'''Threat Level''' ||
  
 +
|- valign="top"
 +
|'''Function Syntax''' ||
 +
|- valign="top"
 +
|'''Example(s)||
 +
 +
|}
 
Renders a dynamically created texture on the face of a prim containing the script, possibly blending it with the texture that is already set for the face.
 
Renders a dynamically created texture on the face of a prim containing the script, possibly blending it with the texture that is already set for the face.
 
{|  width="100%" style="border: thin solid black"
 
{|  width="100%" style="border: thin solid black"
Line 110: Line 120:
  
 
The '''timer''' parameter is not implemented. The value passed will be ignored. Instead, you can use a timer event and recall the function to get the same effect.
 
The '''timer''' parameter is not implemented. The value passed will be ignored. Instead, you can use a timer event and recall the function to get the same effect.
[[Category:OSSL Functions]]
+
[[Category:OSSL_pages_in_need_of_parameters_template]]

Revision as of 16:23, 12 June 2011

LSL: string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, 
      string data, string extraParams, integer blend, integer disp, integer timer, integer alpha, integer face)
C#: string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType,
      string data, string extraParams, bool blend, int disp, int timer, int alpha, int face)
No descriptions provided
Threat Level VeryLow
Permissions No permissions specified
Delay No function delay specified
Example(s)
// Example of osSetDynamicTextureDataBlendFace used to put a number on each face of a prim
string FontName = "Arial";
integer FontSize = 128;
 
NumberEachFace() {
    integer face = llGetNumberOfSides();
    while (face--) {
        string text = (string)face;
        vector size = osGetDrawStringSize("vector", text, FontName, FontSize);
        integer xpos = (256 - (integer)size.x) >> 1;
        integer ypos = (256 - (integer)size.y) >> 1;
 
        string commandList = "";
        commandList = osMovePen(commandList, xpos, ypos);
        commandList = osSetFontName(commandList, FontName);
        commandList = osSetFontSize(commandList, FontSize);
        commandList = osDrawText(commandList, text);
 
        osSetDynamicTextureDataBlendFace("", "vector", commandList, "width:256,height:256",
                                         FALSE, 2, 0, 255, face);
    }
}
 
default {
    state_entry() {
        NumberEachFace();
    }
    changed(integer change) {
        if (change & CHANGED_SHAPE)
            NumberEachFace();
    }
}
Notes
Returns UUID of the generated texture. Intended to be used with subsequent calls to osSetDynamicTextureXXXX functions in order to modify the texture.

NOT IMPLEMENTED YET; the current implementation always returns a string with NULL_KEY.


OsSetDynamicTextureDataBlendFace
Threat Level
Function Syntax
Example(s)

Renders a dynamically created texture on the face of a prim containing the script, possibly blending it with the texture that is already set for the face.

Parameters
Name Description Remarks
dynamicID UUID of already existing dynamic texture. Intended to accept UUID from a previous call to osSetDynamicTextureXXXX functions in order to provide modification of an existing dynasmic texture NOT IMPLEMENTED YET
contentType specifies the type of the data parameter.

The following values are allowed:

  • vector - the data parameter contains a list of drawing instructions. See Drawing commands for details
data Contains a series of drawing instructions. See Drawing commands for details
extraParams additional optional parameters in the following format: [param]:[value],[param]:[value]

Multiple parameters are separated by commas. The following ones are supported:

  • width - width of the dynamic texture in pixels (example: width:256)
  • height - height of the dynamic texture in pixels (example: height:256)
  • alpha - alpha (transparency) component of the dynamic texture. Values are from 0-clear to 255-solid, and false to turn off the alpha layer completely (example: alpha:255)
  • bgcolour - specifies the background color of the texture (example: bgcolour:Red)
  • altdatadelim - specifies a delimiter between the draw commands contained in the data parameter.
  • setalpha
  • integer value - any integer value is treated like specifing aplha component
blend If true, the newly generated texture is blended with the appropriate existing ones on the prim.
disp Display flags. Value 1-expire deletes the old texture if it is replaced by a newer generated texture (may not currently be implemented). Value 2-temp flags the asset as temporary, which often means that it is not persisted to the database.
timer specify a time interval to update the texture NOT IMPLEMENTED YET
alpha The alpha value of the generated texture.
face The face of the prim on which to put the generated texture. If ALL_SIDES then all sides of the prim are set.

Notes

The dynamicID parameter is not implemented. The value passed will be ignored.

The timer parameter is not implemented. The value passed will be ignored. Instead, you can use a timer event and recall the function to get the same effect.

Personal tools
General
About This Wiki