Jump to content

3D dxDraw


dugasz1

Recommended Posts

And another question about rendertargets. How can i make a texture from my rendertarget ? Or is it possible ? because i want to delete my render target just keep the texture and draw it?

local renderT = dxCreateRenderTarget(400,400, true)
dxSetRenderTarget(renderT)
dxDrawText("Hello world", 0,0 200,200)
dxDrawRecentagle(0,0,200,200, tocolor(255,255,255,255))
--etc..
dxSetRenderTarget()
local createdTexture = --get somehow the texture
destroyElement(renderT)

dxDrawMaterialLine3D(0, 0, 5, 0, 0, 5-2, createdTexture, 2)   --Draw it

 

Edited by dugasz1
Link to comment
2 hours ago, CodyL said:

    local renderT = dxCreateRenderTarget(400,400, true)
    dxSetRenderTarget(renderT)
    dxDrawText("Hello world", 0,0 200,200)
    dxDrawRecentagle(0,0,200,200, tocolor(255,255,255,255))
    --etc..
    dxSetRenderTarget()

    dxDrawMaterialLine3D(0, 0, 5, 0, 0, 5-2,renderT, 2)   --Draw it
    destroyElement(renderT)

 

dx drawing functions need to render event, and when you destroyed render you will cause an bug

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...