Graphics

 View Only
  • 1.  API-texture help

    Posted 10-20-2019 11:58
    Hi all! I tried the example "Using the APITexture Shader" in the SDK helpfile.I just followed the same way ,but I got no idea where to script it (I tried script it in the script event,script in global,even in the scene object,but failed ),it can't show in the APItextue How can make it work? Thank you


  • 2.  RE: API-texture help

    Posted 10-21-2019 13:49

    The example in the SDK helpfile is meant to be used in an external Visual Basic (or C#) application that is controlling XPression using the .NET API.  It is not intended to be used via the internal scripting engine.

    Here is an example script that would work in the OnOnline event.  Assuming you have a material and apitexture shader created and already assigned to a quad in the scene.

    dim mat as xpMaterial
    dim apitexture as xpAPITextureShader
    dim pen as xpPen

    engine.GetMaterialByName("Material1", mat)
    mat.GetShaderByName("APITexture", apitexture)

    apitexture.Clear
    pen = engine.CreatePen
    pen.Size = 20
    pen.SetColor(0,128, 255, 255)
    apitexture.DrawEllipse(Pen, 30, 30, 400, 400)

    #XPression


  • 3.  RE: API-texture help

    Posted 10-22-2019 02:00

    it's really help

    Thank you , Brian


    #XPression