Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
8f665598
Commit
8f665598
authored
Feb 18, 2021
by
Nikolay Igotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of all D3D libs deps.
parent
cb46d6d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
build.gradle.kts
skiko/build.gradle.kts
+1
-2
directXRedrawer.cc
skiko/src/jvmMain/cpp/windows/directXRedrawer.cc
+38
-0
No files found.
skiko/build.gradle.kts
View file @
8f665598
...
...
@@ -381,8 +381,7 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
"Dwmapi.lib"
,
"opengl32.lib"
,
"shcore.lib"
,
"user32.lib"
,
"d3dcompiler.lib"
"user32.lib"
)
)
}
...
...
skiko/src/jvmMain/cpp/windows/directXRedrawer.cc
View file @
8f665598
...
...
@@ -139,6 +139,44 @@ HRESULT CreateDXGIFactory2(
return
impl
(
Flags
,
riid
,
ppFactory
);
}
HRESULT
D3DCompile
(
LPCVOID
pSrcData
,
SIZE_T
SrcDataSize
,
LPCSTR
pSourceName
,
const
D3D_SHADER_MACRO
*
pDefines
,
ID3DInclude
*
pInclude
,
LPCSTR
pEntrypoint
,
LPCSTR
pTarget
,
UINT
Flags1
,
UINT
Flags2
,
ID3DBlob
**
ppCode
,
ID3DBlob
**
ppErrorMsgs
)
{
typedef
HRESULT
(
*
D3DCompile_t
)(
LPCVOID
pSrcData
,
SIZE_T
SrcDataSize
,
LPCSTR
pSourceName
,
const
D3D_SHADER_MACRO
*
pDefines
,
ID3DInclude
*
pInclude
,
LPCSTR
pEntrypoint
,
LPCSTR
pTarget
,
UINT
Flags1
,
UINT
Flags2
,
ID3DBlob
**
ppCode
,
ID3DBlob
**
ppErrorMsgs
);
static
D3DCompile_t
impl
=
nullptr
;
if
(
!
impl
)
{
auto
d3dcompilerdll
=
LoadLibrary
(
TEXT
(
"d3dcompiler_47.dll"
));
if
(
!
d3dcompilerdll
)
return
E_NOTIMPL
;
impl
=
(
D3DCompile_t
)
GetProcAddress
(
d3dcompilerdll
,
"D3DCompile"
);
if
(
!
impl
)
return
E_NOTIMPL
;
}
return
impl
(
pSrcData
,
SrcDataSize
,
pSourceName
,
pDefines
,
pInclude
,
pEntrypoint
,
pTarget
,
Flags1
,
Flags2
,
ppCode
,
ppErrorMsgs
);
}
JNIEXPORT
jlong
JNICALL
Java_org_jetbrains_skiko_redrawer_Direct3DRedrawer_makeDirectXContext
(
JNIEnv
*
env
,
jobject
redrawer
,
jlong
devicePtr
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment