Test
Test
Test
Try this:
Remember To Use my .FX file.
function dxDrawText3D( text, left, top, right, bottom, color, scale, font, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ, alignX, alignY, clip, wordBreak, postGUI, colorCoded )
if not text or not left or not top then
return;
end
local right = right or 0;
local bottom = bottom or 0;
local color = color or tocolor( 255, 255, 255, 255 );
local scale = scale or 1;
local font = font or "default";
local rotX = rotX or 0;
local rotY = rotY or 0;
local rotZ = rotZ or 0;
local rotOfX = rotOfX or 0;
local rotOfY = rotOfY or 0;
local rotOfZ = rotOfZ or 0;
local alignX = alignX or "left";
local alignY = alignY or "top";
local clip = clip or false;
local wordBreak = wordBreak or false;
local postGUI = postGUI or false;
local colorCoded = colorCoded or true;
local textWidth = dxGetTextWidth( text, scale, font );
local fontHeight = dxGetFontHeight( scale, font );
local drawSurface = dxCreateRenderTarget( textWidth, fontHeight, true );
if not drawSurface then
return;
end
if not texShader then
return;
end
dxSetShaderValue( texShader, 'threeDimTex', drawSurface )
dxSetRenderTarget( drawSurface )
dxDrawText( text, 0, 0, textWidth, fontHeight, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, true )
dxSetRenderTarget( )
dxSetShaderTransform( texShader, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ );
dxDrawImage( left, top, textWidth, fontHeight, texShader, 0, 0, 0, tocolor( 255, 255, 255, 255 ), postGUI );
destroyElement( drawSurface );
end