~ppsspp/ppsspp/ppsspp_1.3.0

« back to all changes in this revision

Viewing changes to GPU/Directx9/helper/global.h

  • Committer: Sérgio Benjamim
  • Date: 2017-01-02 00:12:05 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20170102001205-cxbta9za203nmjwm
1.3.0 source (from ppsspp_1.3.0-r160.p5.l1762.a165.t83~56~ubuntu16.04.1.tar.xz).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#pragma once
 
2
 
 
3
#include "Common/CommonWindows.h"
 
4
#ifdef _XBOX
 
5
// Used on XBox to create a linear format
 
6
// TODO: Might actually want to use nonlinear on xbox?
 
7
#define D3DFMT(x)       (D3DFORMAT)MAKELINFMT(x)
 
8
#else
 
9
#define D3DFMT(x) x
 
10
#endif
 
11
 
 
12
#include <string>
 
13
#include <d3d9.h>
 
14
 
 
15
struct ID3DXConstantTable;
 
16
 
 
17
namespace DX9 {
 
18
 
 
19
extern LPDIRECT3DDEVICE9 pD3Ddevice;
 
20
extern LPDIRECT3DDEVICE9EX pD3DdeviceEx;
 
21
extern LPDIRECT3D9 pD3D;
 
22
 
 
23
extern LPDIRECT3DVERTEXSHADER9      pFramebufferVertexShader; // Vertex Shader
 
24
extern LPDIRECT3DPIXELSHADER9       pFramebufferPixelShader;  // Pixel Shader
 
25
 
 
26
extern IDirect3DVertexDeclaration9* pFramebufferVertexDecl;
 
27
extern IDirect3DVertexDeclaration9* pSoftVertexDecl;
 
28
 
 
29
bool CompileShaders(std::string &errorMessage);
 
30
bool CompilePixelShader(const char *code, LPDIRECT3DPIXELSHADER9 *pShader, ID3DXConstantTable **pShaderTable, std::string &errorMessage);
 
31
bool CompileVertexShader(const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, ID3DXConstantTable **pShaderTable, std::string &errorMessage);
 
32
void DestroyShaders();
 
33
void DirectxInit(HWND window);
 
34
 
 
35
void DXSetViewport(float x, float y, float w, float h, float minZ = 0.0f, float maxZ = 1.0f);
 
36
 
 
37
#define D3DBLEND_UNK    D3DBLEND_FORCE_DWORD
 
38
 
 
39
};