Skip to content

Commit db9fd09

Browse files
authored
Merge pull request #12 from ArmainAP/master
Unreal Engine port.
2 parents 3ef74d1 + 011afd0 commit db9fd09

File tree

116 files changed

+38727
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+38727
-12
lines changed

UnityWebcam/UnityCamService/UnityCamService.vcxproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -23,28 +23,29 @@
2323
<RootNamespace>ycapture</RootNamespace>
2424
<Keyword>Win32Proj</Keyword>
2525
<ProjectName>UnityCamService</ProjectName>
26+
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
2627
</PropertyGroup>
2728
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2829
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
2930
<ConfigurationType>DynamicLibrary</ConfigurationType>
30-
<PlatformToolset>v120</PlatformToolset>
31+
<PlatformToolset>v141</PlatformToolset>
3132
<CharacterSet>Unicode</CharacterSet>
3233
<WholeProgramOptimization>true</WholeProgramOptimization>
3334
</PropertyGroup>
3435
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
3536
<ConfigurationType>DynamicLibrary</ConfigurationType>
36-
<PlatformToolset>v120</PlatformToolset>
37+
<PlatformToolset>v141</PlatformToolset>
3738
<CharacterSet>Unicode</CharacterSet>
3839
<WholeProgramOptimization>true</WholeProgramOptimization>
3940
</PropertyGroup>
4041
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4142
<ConfigurationType>DynamicLibrary</ConfigurationType>
42-
<PlatformToolset>v120</PlatformToolset>
43+
<PlatformToolset>v141</PlatformToolset>
4344
<CharacterSet>Unicode</CharacterSet>
4445
</PropertyGroup>
4546
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4647
<ConfigurationType>DynamicLibrary</ConfigurationType>
47-
<PlatformToolset>v120</PlatformToolset>
48+
<PlatformToolset>v141</PlatformToolset>
4849
<CharacterSet>Unicode</CharacterSet>
4950
</PropertyGroup>
5051
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

UnityWebcam/UnityWebcam/UnityAPI.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "stdafx.h"
44
#include "UnityAPI.h"
55
#include "UnityTextureWrapper.h"
6+
#include "SharedImageWrapper.h"
67

78
using namespace mray;
89

@@ -28,3 +29,10 @@ extern "C" UNITY_INTERFACE_EXPORT bool SendTexture(void* wrapper, void* TextureI
2829
return w->SendImage(TextureID);
2930

3031
}
32+
33+
extern "C" __declspec(dllexport) bool SendTexture(const unsigned char* data, int width, int height)
34+
{
35+
if (!wrapper)
36+
wrapper = new SharedImageWrapper();
37+
wrapper->SendImage(data, width, height);
38+
}

UnityWebcam/UnityWebcam/UnityAPI.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ extern "C" UNITY_INTERFACE_EXPORT void* CreateTextureWrapper();
88
extern "C" UNITY_INTERFACE_EXPORT void DeleteTextureWrapper(void* wrapper);
99
extern "C" UNITY_INTERFACE_EXPORT bool SendTexture(void* wrapper,void* TextureID);
1010

11+
extern "C" __declspec(dllexport) bool SendTexture(const unsigned char* data, int width, int height);
12+
SharedImageWrapper* wrapper;
13+
1114

1215
#endif

UnityWebcam/UnityWebcam/UnityWebcam.vcxproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -22,31 +22,32 @@
2222
<ProjectGuid>{727D3AC5-27B5-4288-A475-7A471ECD71B7}</ProjectGuid>
2323
<Keyword>Win32Proj</Keyword>
2424
<RootNamespace>UnityWebcam</RootNamespace>
25+
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
2526
</PropertyGroup>
2627
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2728
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2829
<ConfigurationType>DynamicLibrary</ConfigurationType>
2930
<UseDebugLibraries>true</UseDebugLibraries>
30-
<PlatformToolset>v120</PlatformToolset>
31+
<PlatformToolset>v141</PlatformToolset>
3132
<CharacterSet>Unicode</CharacterSet>
3233
</PropertyGroup>
3334
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
3435
<ConfigurationType>DynamicLibrary</ConfigurationType>
3536
<UseDebugLibraries>true</UseDebugLibraries>
36-
<PlatformToolset>v120</PlatformToolset>
37+
<PlatformToolset>v141</PlatformToolset>
3738
<CharacterSet>Unicode</CharacterSet>
3839
</PropertyGroup>
3940
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
4041
<ConfigurationType>DynamicLibrary</ConfigurationType>
4142
<UseDebugLibraries>false</UseDebugLibraries>
42-
<PlatformToolset>v120</PlatformToolset>
43+
<PlatformToolset>v141</PlatformToolset>
4344
<WholeProgramOptimization>true</WholeProgramOptimization>
4445
<CharacterSet>Unicode</CharacterSet>
4546
</PropertyGroup>
4647
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4748
<ConfigurationType>DynamicLibrary</ConfigurationType>
4849
<UseDebugLibraries>false</UseDebugLibraries>
49-
<PlatformToolset>v120</PlatformToolset>
50+
<PlatformToolset>v141</PlatformToolset>
5051
<WholeProgramOptimization>true</WholeProgramOptimization>
5152
<CharacterSet>Unicode</CharacterSet>
5253
</PropertyGroup>
-355 KB
Binary file not shown.
39 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
108 KB
Binary file not shown.
2.37 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
2-
Debug|Win32|D:\Development\GitRepos\UnityCam\UnityWebcam\|
1+
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.18362.0
2+
Debug|Win32|E:\UnityCam\UnityWebcam\|

0 commit comments

Comments
 (0)