initial commit

master
Zaafar Ahmed 7 years ago
parent 963475c6f9
commit d8d7d3a8ec
  1. 25
      ClickableTransparentOverlay.sln
  2. 99
      ClickableTransparentOverlay/ClickableTransparentOverlay.csproj
  3. 36
      ClickableTransparentOverlay/Properties/AssemblyInfo.cs
  4. 13
      ClickableTransparentOverlay/Shaders/GLSL/imgui-frag.glsl
  5. 20
      ClickableTransparentOverlay/Shaders/GLSL/imgui-vertex.glsl
  6. 15
      ClickableTransparentOverlay/Shaders/HLSL/imgui-frag.hlsl
  7. BIN
      ClickableTransparentOverlay/Shaders/HLSL/imgui-frag.hlsl.bytes
  8. 27
      ClickableTransparentOverlay/Shaders/HLSL/imgui-vertex.hlsl
  9. BIN
      ClickableTransparentOverlay/Shaders/HLSL/imgui-vertex.hlsl.bytes
  10. 18
      ClickableTransparentOverlay/Shaders/Metal/imgui-frag.metal
  11. BIN
      ClickableTransparentOverlay/Shaders/Metal/imgui-frag.metallib
  12. 27
      ClickableTransparentOverlay/Shaders/Metal/imgui-vertex.metal
  13. BIN
      ClickableTransparentOverlay/Shaders/Metal/imgui-vertex.metallib
  14. 2
      ClickableTransparentOverlay/Shaders/SPIR-V/generate-spirv.bat
  15. 16
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-frag.glsl
  16. BIN
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-frag.spv
  17. 29
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-vertex.glsl
  18. BIN
      ClickableTransparentOverlay/Shaders/SPIR-V/imgui-vertex.spv
  19. 15
      ClickableTransparentOverlay/app.config
  20. BIN
      ClickableTransparentOverlay/deps/cimgui.dll
  21. 8
      ClickableTransparentOverlay/packages.config
  22. 8
      README.md

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.168
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClickableTransparentOverlay", "ClickableTransparentOverlay\ClickableTransparentOverlay.csproj", "{F5CF8972-D0DA-4FC0-8796-E7C60101C8EA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F5CF8972-D0DA-4FC0-8796-E7C60101C8EA}.Debug|x64.ActiveCfg = Debug|x64
{F5CF8972-D0DA-4FC0-8796-E7C60101C8EA}.Debug|x64.Build.0 = Debug|x64
{F5CF8972-D0DA-4FC0-8796-E7C60101C8EA}.Release|x64.ActiveCfg = Release|x64
{F5CF8972-D0DA-4FC0-8796-E7C60101C8EA}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CC9A7790-CFC1-4D4F-AE2C-177A80D122C8}
EndGlobalSection
EndGlobal

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F5CF8972-D0DA-4FC0-8796-E7C60101C8EA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClickableTransparentOverlay</RootNamespace>
<AssemblyName>ClickableTransparentOverlay</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Gma.System.MouseKeyHook, Version=5.6.130.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MouseKeyHook.5.6.0\lib\net40\Gma.System.MouseKeyHook.dll</HintPath>
</Reference>
<Reference Include="ImGui.NET, Version=1.66.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImGui.NET.1.66.0\lib\netstandard2.0\ImGui.NET.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<EmbeddedResource Include="Shaders\GLSL\imgui-vertex.glsl" LogicalName="imgui-vertex.glsl" />
<EmbeddedResource Include="Shaders\GLSL\imgui-frag.glsl" LogicalName="imgui-frag.glsl" />
<EmbeddedResource Include="Shaders\HLSL\imgui-vertex.hlsl.bytes" LogicalName="imgui-vertex.hlsl.bytes" />
<EmbeddedResource Include="Shaders\HLSL\imgui-frag.hlsl.bytes" LogicalName="imgui-frag.hlsl.bytes" />
<EmbeddedResource Include="Shaders\SPIR-V\imgui-vertex.spv" LogicalName="imgui-vertex.spv" />
<EmbeddedResource Include="Shaders\SPIR-V\imgui-frag.spv" LogicalName="imgui-frag.spv" />
<EmbeddedResource Include="Shaders\Metal\imgui-vertex.metallib" LogicalName="imgui-vertex.metallib" />
<EmbeddedResource Include="Shaders\Metal\imgui-frag.metallib" LogicalName="imgui-frag.metallib" />
</ItemGroup>
<ItemGroup>
<Content Include="deps\cimgui.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ClickableTransparentOverlay")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ClickableTransparentOverlay")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f5cf8972-d0da-4fc0-8796-e7c60101c8ea")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,13 @@
#version 330 core
uniform sampler2D FontTexture;
in vec4 color;
in vec2 texCoord;
out vec4 outputColor;
void main()
{
outputColor = color * texture(FontTexture, texCoord);
}

@ -0,0 +1,20 @@
#version 330 core
uniform ProjectionMatrixBuffer
{
mat4 projection_matrix;
};
in vec2 in_position;
in vec2 in_texCoord;
in vec4 in_color;
out vec4 color;
out vec2 texCoord;
void main()
{
gl_Position = projection_matrix * vec4(in_position, 0, 1);
color = in_color;
texCoord = in_texCoord;
}

@ -0,0 +1,15 @@
struct PS_INPUT
{
float4 pos : SV_POSITION;
float4 col : COLOR0;
float2 uv : TEXCOORD0;
};
Texture2D FontTexture : register(t0);
sampler FontSampler : register(s0);
float4 FS(PS_INPUT input) : SV_Target
{
float4 out_col = input.col * FontTexture.Sample(FontSampler, input.uv);
return out_col;
}

@ -0,0 +1,27 @@
cbuffer ProjectionMatrixBuffer : register(b0)
{
float4x4 ProjectionMatrix;
};
struct VS_INPUT
{
float2 pos : POSITION;
float2 uv : TEXCOORD0;
float4 col : COLOR0;
};
struct PS_INPUT
{
float4 pos : SV_POSITION;
float4 col : COLOR0;
float2 uv : TEXCOORD0;
};
PS_INPUT VS(VS_INPUT input)
{
PS_INPUT output;
output.pos = mul(ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));
output.col = input.col;
output.uv = input.uv;
return output;
}

@ -0,0 +1,18 @@
#include <metal_stdlib>
using namespace metal;
struct PS_INPUT
{
float4 pos [[ position ]];
float4 col;
float2 uv;
};
fragment float4 FS(
PS_INPUT input [[ stage_in ]],
texture2d<float> FontTexture [[ texture(0) ]],
sampler FontSampler [[ sampler(0) ]])
{
float4 out_col = input.col * FontTexture.sample(FontSampler, input.uv);
return out_col;
}

@ -0,0 +1,27 @@
#include <metal_stdlib>
using namespace metal;
struct VS_INPUT
{
float2 pos [[ attribute(0) ]];
float2 uv [[ attribute(1) ]];
float4 col [[ attribute(2) ]];
};
struct PS_INPUT
{
float4 pos [[ position ]];
float4 col;
float2 uv;
};
vertex PS_INPUT VS(
VS_INPUT input [[ stage_in ]],
constant float4x4 &ProjectionMatrix [[ buffer(1) ]])
{
PS_INPUT output;
output.pos = ProjectionMatrix * float4(input.pos.xy, 0.f, 1.f);
output.col = input.col;
output.uv = input.uv;
return output;
}

@ -0,0 +1,2 @@
glslangvalidator -V imgui-vertex.glsl -o imgui-vertex.spv -S vert
glslangvalidator -V imgui-frag.glsl -o imgui-frag.spv -S frag

@ -0,0 +1,16 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout(set = 1, binding = 0) uniform texture2D FontTexture;
layout(set = 0, binding = 1) uniform sampler FontSampler;
layout (location = 0) in vec4 color;
layout (location = 1) in vec2 texCoord;
layout (location = 0) out vec4 outputColor;
void main()
{
outputColor = color * texture(sampler2D(FontTexture, FontSampler), texCoord);
}

@ -0,0 +1,29 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout (location = 0) in vec2 vsin_position;
layout (location = 1) in vec2 vsin_texCoord;
layout (location = 2) in vec4 vsin_color;
layout (binding = 0) uniform Projection
{
mat4 projection;
};
layout (location = 0) out vec4 vsout_color;
layout (location = 1) out vec2 vsout_texCoord;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
gl_Position = projection * vec4(vsin_position, 0, 1);
vsout_color = vsin_color;
vsout_texCoord = vsin_texCoord;
gl_Position.y = -gl_Position.y;
}

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Binary file not shown.

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ImGui.NET" version="1.66.0" targetFramework="net472" />
<package id="MouseKeyHook" version="5.6.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.0" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
</packages>

@ -1,2 +1,8 @@
# ClickableTransparentOverlay
A library for creating clickable transparent overlay using windows API &amp; ImGui.NET
A library for creating clickable transparent overlay using Win32 API and ImGui.NET
# Dependencies
* cimgui lib ( VERSION 1.66 (Released 2018-11-22) x64 )
* ImGui.NET
* Veldrid
* MouseKeyHook

Loading…
Cancel
Save