Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to work with OF 0.10.0 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
.vs/

# User-specific files
*.suo
Expand All @@ -13,7 +14,10 @@
x64/
build/
bld/
[Bb]in/
[Bb]in/*.dll
[Bb]in/*.exe
[Bb]in/*.exp
[Bb]in/*.lib
[Oo]bj/

# MSTest test Results
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ ofDxSharedTextureExample
This example shows how to use the the WGL_NV_DX_interop extension (see [here](http://developer.download.nvidia.com/opengl/specs/WGL_NV_DX_interop.txt)) to share the content of a D3D texture with openFrameworks.
This is not an end in itself but should be seen as a stepping stone to achieve more advanced goals (accelerated rendering using windows technology, hardware video decoding using Media Foundation, ...). Indeed most of the time the proper way of accessing hardware accelerated capabilities (DXVA, Windows H264 decoder, ...) you need to go through a Direct3D surface which has hindered the development of hardware accelerated path for openGL applications in Windows.

#Prerequisites

This extension is supported by the latest release of GLEW but not the one shipped with openFrameworks.
Prior to compiling this example you need to replace the GLEW headers and libraries from your of\libs foler by the one present in the lib folder of this repository.

On top of that this addon is built against the Direct X SDK of June 2010. You'll need to install it to have the headers required for compiling the example. At the time of writing, you can download it on the [Microsoft website](http://www.microsoft.com/en-us/download/details.aspx?id=6812)


#Description of the example

This application first creates a D3D window in a spearate thread, and ensure synchronization between the two threads.
Expand All @@ -27,9 +19,13 @@ This extension can be used with D3D9, D3D10 and D3D11.

#Compatibility

OpenFrameworks 0.10.0, Visual Studio 2017, Windows 10

This is an NVIDIA extension but AMD/ATI cards claims they support it was well, even though sometimes it gets more finicky.
Feedbacks on working/not working cards and drivers are more than welcomed.






2 changes: 2 additions & 0 deletions addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ofxIO
ofxPoco
44 changes: 44 additions & 0 deletions bin/Tutorial04.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//--------------------------------------------------------------------------------------
// File: Tutorial04.fx
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
// Constant Buffer Variables
//--------------------------------------------------------------------------------------
cbuffer ConstantBuffer : register( b0 )
{
matrix World;
matrix View;
matrix Projection;
}

//--------------------------------------------------------------------------------------
struct VS_OUTPUT
{
float4 Pos : SV_POSITION;
float4 Color : COLOR0;
};

//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
VS_OUTPUT VS( float4 Pos : POSITION, float4 Color : COLOR )
{
VS_OUTPUT output = (VS_OUTPUT)0;
output.Pos = mul( Pos, World );
output.Pos = mul( output.Pos, View );
output.Pos = mul( output.Pos, Projection );
output.Color = Color;
return output;
}


//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------
float4 PS( VS_OUTPUT input ) : SV_Target
{
return input.Color;
}
116 changes: 0 additions & 116 deletions emptyExample.vcxproj

This file was deleted.

30 changes: 0 additions & 30 deletions emptyExample.vcxproj.filters

This file was deleted.

4 changes: 2 additions & 2 deletions icon.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define MAIN_ICON 102

#if defined(_DEBUG)
MAIN_ICON ICON "..\..\..\libs\openFrameworksCompiled\project\vs\icon_debug.ico"
MAIN_ICON ICON "icon_debug.ico"
#else
MAIN_ICON ICON "..\..\..\libs\openFrameworksCompiled\project\vs\icon.ico"
MAIN_ICON ICON "icon.ico"
#endif
Binary file removed libs/glew-1.10.0-win32.zip
Binary file not shown.
Loading