FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
API-Examples/windows/APIExample/APIExample/d3d/D3DRender.h at master · conan1150/API-Examples · GitHub
conan1150
/
API-Examples
Public
forked from
AgoraIO/API-Examples
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
API-Examples
/
windows
/
APIExample
/
APIExample
/
d3d
/
D3DRender.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (31 loc) · 956 Bytes
Breadcrumbs
API-Examples
/
windows
/
APIExample
/
APIExample
/
d3d
/
D3DRender.h
Copy path
File metadata and controls
34 lines (31 loc) · 956 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
pragma
once
#
include
<
d3d9.h
>
/*
*
* D3DRender
* You'll need to call the Init function to pass in an HWND and window size
* that supports YUV data and RGB data.The incoming data can then be called to Render.
*
*/
class
D3DRender
{
public:
D3DRender
();
~D3DRender
();
public:
//
initialize window
//
hwnd is render to window.nWidth is buffer width not window width,nHeight is buffer height not window height,
//
isYuv to identify yuv
int
Init
(
HWND
hwnd,
unsigned
int
nWidth,
unsigned
int
nHeight,
bool
isYuv);
//
release d3d handle
void
Close
();
//
accept buffer data to render window.
bool
Render
(
char
*buffer);
private:
bool
m_bIsYuv;
int
m_nWidth;
int
m_nHeight;
RECT
m_rtViewport;
CRITICAL_SECTION
m_critial;
IDirect3D9 *m_pDirect3D9;
IDirect3DDevice9 *m_pDirect3DDevice;
IDirect3DSurface9 *m_pDirect3DSurfaceRender;
};
Back
|
FazBrowse Home
|
New Git URL