Monthly Archives: March 2016

Getting The XBox 360 Controller To Work Correctly With Steam And Windows 10

If you like to play your Steam games in Big Picture mode and have upgraded to Windows 10 recently, you may have noticed that the main XBox controller button no longer functions as it’s supposed to.  But don’t worry, there is a very simple fix for this and it doesn’t require the XBox app.  First bring up the Game DVR systems by pressing:

Win + G

This should bring up the Game DVR bar.

Game DVR

Next click on the Gear (Settings) icon on the far right.

Located the second to last checkbox which reads: “Open Game bar using (XBox button) on a controller” and uncheck it.

Game DVR SettingsNow you’re good to go.  Close out the Game DVR settings dialog and give it a try.  If all is well you should be able to launch Steam in Big Picture mode and your screenshot shortcuts, etc should all be working now.

Drawing on Textures in ThreeJS

If you’re an avid user of ThreeJS you have more than likely at some point run into the situation where you need to either create a texture from scratch for the point of coloring it, or have had the need to update/draw on a texture for one reason or another.  The following will walk you through what is needed to accomplish this.

First, start by creating an in memory canvas object that we will use to draw on.  This will eventually be transformed into a texture object.

//create in memory canvas
var canvas = document.createElement("canvas");
canvas.width = 100;
canvas.height = 100;
var context = canvas.getContext("2d");

 

For this example, I’m creating a simple 100×100 pixel image and retrieving the 2d context which we will next use for performing that actual modification of the image.

//paint the image red
context.fillStyle = "#ff0000";
context.fillRect(0, 0, 100, 100);

 

Here we’re setting the fill color to red and painting the entire image.  Next, let’s convert our in memory canvas object into an image.

//create image from canvas
var image = new Image();
image.src = canvas.toDataURL();

 

Finally, let’s take our new image and create a texture object which can be applied to a material.

//create new texture
var texture = new THREE.Texture(image);
texture.anisotropy = 4;
texture.needsUpdate = true;
 
//apply texture to a material, go forth and be merry

 

That’s really all there is to it, you can make the context draw lines, rects, etc. onto the in memory canvas until your heart’s content.  For convenience, the following is the entire code example wrapped up into one.

//create in memory canvas
var canvas = document.createElement("canvas");
canvas.width = 100;
canvas.height = 100;
var context = canvas.getContext("2d");
 
//paint the image red
context.fillStyle = "#ff0000";
context.fillRect(0, 0, 100, 100);
 
//create image from canvas
var image = new Image();
image.src = canvas.toDataURL();
 
//create new texture
var texture = new THREE.Texture(image);
texture.anisotropy = 4;
texture.needsUpdate = true;
 
//apply texture to a material, go forth and be merry

Getting Windows 10 Home Remote Desktop Working

Windows 10 Home edition by default will not allow you to have inbound remote desktop connections.  Regardless of any settings you may find to the contrary, turning off your firewall, etc. there will just not be anything you can do directly at the user level to enable it.  All is not lost however, there is a very simple fix that you can apply to enable this functionality.

First download RDPWrap at: https://github.com/stascorp/rdpwrap/releases

You want to download the release which takes a form like “RDPWrap-v1.6.zip” for example.

Next, unpack the zip file to a directory and find the file entitled “install.bat”, right click and choose “Run as Administrator”, grant the permission when prompted and let the batch file run its course.

After the installation completes, execute the file “RDPCheck” and ensure that the “Wrapper state”, “Service state” and “Listener state” status are all green.  If they are, then you’re good to go, change whatever configuration settings you would like and remote in.

RDPCheck

If you find that any of the status states are red, such as the “Listener state” for example, ensure that your firewall is not blocking by turning your firewall off just for a quick test and try the “RDPCheck” again.  If you still find that there is a status issue, file the file “update.bat”, right click and choose “Run as Administrator”, grant the permission when prompted and let the batch file run its course.  Once the update has completed, try running the “RDPCheck” check again, you should be good to go.