- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmathrender_client.lua
More file actions
Latest commit
20 lines (17 loc) · 615 Bytes
/
Copy pathmathrender_client.lua
File metadata and controls
20 lines (17 loc) · 615 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
localserver_texture=false;
addEvent("onServerTransmitImage", true);
addEventHandler("onServerTransmitImage", root, function(imgPixels)
if ( server_texture ) then
destroyElement(server_texture);
end
server_texture=dxCreateTexture(imgPixels, "argb", false, "wrap");
end
);
addEventHandler( "onClientRender", root, function()
-- draw a server transmitted image.
if ( server_texture ) then
localwidth, height=dxGetMaterialSize( server_texture );
dxDrawImage( 0, 0, width, height, server_texture );
end
end
);