textures UV

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
Hi
Just looking at Mojo2 and cant find a way if I can draw a textured Quad or Primitive. I can see Material being one of the params, but thts where I get los a bit.
Can i specify a quad with co-ords and texture uv's?
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
thank you!
Im no sure how i missed that. Convinced I read the docs for DrawPrimitives already. Ill give it a go now
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
thanks for the pointers @Holzchopf
sadly I'm confused how to convert an image to Material...

When creating new materials and loading in textures, the docs talk about paramnames
This is where my knowledge starts to fade slightly. Do i need to create a shader to draw an image?
Cerberus X:
        mat1 = New Material()
        mat1.SetTexture("temp",Texture.Load("image1.png"))

        canvas.DrawPrimitives(4,1,cords,p1uv,mat1)
This compiles but still displays solide white. Obv im using "temp" as the param name

Are there any tutorials on Materials please? I have created shaders in the past so its more the CX side
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
ive just found the Method Image.Material()
That fixes everything ;)
 
Top Bottom