mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Merge pull request #6048 from samcake/controllers
Controllers Branch: adding example mapping files
This commit is contained in:
commit
a801aeea50
4 changed files with 63 additions and 5 deletions
24
interface/resources/controllers/mapping-config.json
Normal file
24
interface/resources/controllers/mapping-config.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "Full Mapping config including the standard hydra and gamepad and one more thing",
|
||||
"mappings": [
|
||||
{ "src": "./mapping-hydra.json" },
|
||||
{ "src": "./mapping-xbox.json" },
|
||||
{
|
||||
"name": "example mapping for standard to js function",
|
||||
"channels": [ {
|
||||
"from": "Standard.B",
|
||||
"to": {
|
||||
"type":"js",
|
||||
"function": "function(value){ print(\"Standard.B = \" + value );}"
|
||||
}
|
||||
}, {
|
||||
"from": "Standard.B",
|
||||
"to": {
|
||||
"type":"js",
|
||||
"src": "http://www.theNextBigThing.com/hifiInputSignalHandler.js"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
36
interface/resources/controllers/mapping-test0.json
Normal file
36
interface/resources/controllers/mapping-test0.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "example mapping from Standard to actions",
|
||||
"channels": [ {
|
||||
"from": "Standard.LY",
|
||||
"filters": [ {
|
||||
"type": "clamp",
|
||||
"min": 0,
|
||||
"max": 1,
|
||||
}
|
||||
],
|
||||
"to": "Actions.Forward",
|
||||
}, {
|
||||
"from": "Standard.LY",
|
||||
"filters": [ {
|
||||
"type": "clamp",
|
||||
"min": -1,
|
||||
"max": 0,
|
||||
}, {
|
||||
"type": "invert"
|
||||
}
|
||||
],
|
||||
"to": "Actions.Backward",
|
||||
}, {
|
||||
"from": "Standard.LX",
|
||||
"filters": [ {
|
||||
"type": "scale",
|
||||
"scale": 2.0,
|
||||
}
|
||||
],
|
||||
"to": "Actions.Yaw",
|
||||
}, {
|
||||
"from": "Standard.A",
|
||||
"to": "Actions.Action0"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -339,8 +339,6 @@ GLBackend::GLTexture* GLBackend::syncGPUObject(const Texture& texture) {
|
|||
|
||||
GLTexelFormat texelFormat = GLTexelFormat::evalGLTexelFormat(texture.getTexelFormat(), srcFormat);
|
||||
|
||||
auto semantic = texture.getTexelFormat().getSemantic();
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0,
|
||||
texelFormat.internalFormat, texture.getWidth(), texture.getHeight(), 0,
|
||||
texelFormat.format, texelFormat.type, bytes);
|
||||
|
|
|
@ -68,10 +68,10 @@ const float DEFAULT_REACH_LENGTH = 1.5f;
|
|||
|
||||
SixenseManager::SixenseManager() :
|
||||
InputDevice("Hydra"),
|
||||
#ifdef __APPLE__
|
||||
_sixenseLibrary(NULL),
|
||||
#endif
|
||||
_reachLength(DEFAULT_REACH_LENGTH),
|
||||
#ifdef __APPLE__
|
||||
_sixenseLibrary(nullptr),
|
||||
#endif
|
||||
_hydrasConnected(false)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue