2012-04-21 21:13:50 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2012-01-21 22:59:27 +00:00
|
|
|
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2012 - Daniel De Matteis
|
|
|
|
*
|
2012-04-21 21:13:50 +00:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2012-01-21 22:59:27 +00:00
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
2012-04-21 21:13:50 +00:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2012-01-21 22:59:27 +00:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 21:31:57 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2012-01-21 22:59:27 +00:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2012-07-11 19:41:06 +00:00
|
|
|
#ifndef _XDK_VIDEO_H
|
|
|
|
#define _XDK_VIDEO_H
|
2012-01-21 22:59:27 +00:00
|
|
|
|
2012-03-08 23:09:39 +00:00
|
|
|
#include <stdint.h>
|
2012-07-07 12:06:21 +00:00
|
|
|
|
2012-02-12 00:34:48 +00:00
|
|
|
#define DFONT_MAX 4096
|
2012-04-09 14:04:24 +00:00
|
|
|
#define PRIM_FVF (D3DFVF_XYZRHW | D3DFVF_TEX1)
|
2012-07-07 21:27:48 +00:00
|
|
|
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ | D3DFVF_NORMAL)
|
2012-04-09 14:04:24 +00:00
|
|
|
|
2012-05-24 09:34:10 +00:00
|
|
|
#define MIN_SCALING_FACTOR (1.0f)
|
|
|
|
#define MAX_SCALING_FACTOR (2.0f)
|
|
|
|
|
2012-04-09 14:04:24 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
float rhw;
|
|
|
|
float u;
|
|
|
|
float v;
|
|
|
|
} primitive_t;
|
2012-02-12 00:34:48 +00:00
|
|
|
|
2012-03-08 12:44:20 +00:00
|
|
|
typedef struct DrawVerticeFormats
|
|
|
|
{
|
2012-07-08 22:27:37 +00:00
|
|
|
float x, y, z;
|
2012-03-08 12:44:20 +00:00
|
|
|
float u, v;
|
|
|
|
} DrawVerticeFormats;
|
|
|
|
|
2012-07-07 13:40:14 +00:00
|
|
|
/* Direct3D 8 */
|
|
|
|
#define LPDIRECT3D_PTR LPDIRECT3D8
|
|
|
|
#define LPDIRECT3DDEVICE_PTR LPDIRECT3DDEVICE8
|
|
|
|
#define LPDIRECT3DTEXTURE_PTR LPDIRECT3DTEXTURE8
|
|
|
|
#define LPDIRECT3DSURFACE_PTR LPDIRECT3DSURFACE8
|
2012-07-08 21:06:57 +00:00
|
|
|
#define LPDIRECT3DVERTEXBUFFER_PTR LPDIRECT3DVERTEXBUFFER8
|
2012-07-07 13:40:14 +00:00
|
|
|
|
|
|
|
#define D3DVIEWPORT D3DVIEWPORT8
|
|
|
|
#define D3DVERTEXELEMENT D3DVERTEXELEMENT8
|
|
|
|
|
|
|
|
#define direct3d_create_ctx Direct3DCreate8
|
|
|
|
#define IDirect3DVertexBuffer IDirect3DVertexBuffer8
|
|
|
|
|
|
|
|
#define SetSamplerState SetTextureStageState
|
2012-07-07 19:47:23 +00:00
|
|
|
#define D3DLOCK_NOSYSLOCK (0)
|
2012-07-07 13:40:14 +00:00
|
|
|
|
|
|
|
#define D3DSAMP_ADDRESSU D3DTSS_ADDRESSU
|
|
|
|
#define D3DSAMP_ADDRESSV D3DTSS_ADDRESSV
|
|
|
|
#define D3DSAMP_MAGFILTER D3DTSS_MAGFILTER
|
|
|
|
#define D3DSAMP_MINFILTER D3DTSS_MINFILTER
|
|
|
|
|
2012-07-07 17:15:06 +00:00
|
|
|
typedef struct xdk_d3d_video
|
2012-01-22 00:43:54 +00:00
|
|
|
{
|
2012-04-09 14:04:24 +00:00
|
|
|
bool block_swap;
|
2012-05-06 16:53:43 +00:00
|
|
|
bool fbo_enabled;
|
2012-05-28 00:29:51 +00:00
|
|
|
bool should_resize;
|
|
|
|
bool quitting;
|
|
|
|
bool vsync;
|
|
|
|
unsigned frame_count;
|
2012-04-09 14:04:24 +00:00
|
|
|
unsigned last_width;
|
|
|
|
unsigned last_height;
|
2012-07-07 13:40:14 +00:00
|
|
|
LPDIRECT3D_PTR d3d_device;
|
|
|
|
LPDIRECT3DDEVICE_PTR d3d_render_device;
|
2012-07-08 21:06:57 +00:00
|
|
|
LPDIRECT3DVERTEXBUFFER_PTR vertex_buf;
|
2012-07-07 13:40:14 +00:00
|
|
|
LPDIRECT3DTEXTURE_PTR lpTexture;
|
2012-07-12 20:23:25 +00:00
|
|
|
DWORD video_mode;
|
2012-01-22 00:43:54 +00:00
|
|
|
D3DPRESENT_PARAMETERS d3dpp;
|
2012-07-07 17:15:06 +00:00
|
|
|
} xdk_d3d_video_t;
|
2012-01-22 00:43:54 +00:00
|
|
|
|
2012-01-21 22:59:27 +00:00
|
|
|
#endif
|