2014-09-11 23:43:01 +02:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2017-01-22 13:40:32 +01:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2017-12-11 23:55:31 -08:00
|
|
|
*
|
2014-09-11 23:43:01 +02:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-11-18 13:00:13 +01:00
|
|
|
#ifndef _D3D_COMMON_H
|
|
|
|
#define _D3D_COMMON_H
|
2014-09-11 23:43:01 +02:00
|
|
|
|
2015-11-09 01:04:32 +01:00
|
|
|
#include <boolean.h>
|
2016-06-03 08:06:49 +02:00
|
|
|
#include <retro_common_api.h>
|
2015-11-09 01:04:32 +01:00
|
|
|
|
2018-01-23 04:25:37 +01:00
|
|
|
#include "../video_driver.h"
|
2014-09-11 23:43:01 +02:00
|
|
|
|
2016-06-03 08:06:49 +02:00
|
|
|
RETRO_BEGIN_DECLS
|
2015-11-09 01:19:09 +01:00
|
|
|
|
2018-01-15 23:13:02 +01:00
|
|
|
typedef struct d3d_texture
|
|
|
|
{
|
2018-01-25 04:28:50 +01:00
|
|
|
void *data;
|
2018-01-25 15:30:48 +01:00
|
|
|
INT32 pool;
|
2018-01-15 23:13:02 +01:00
|
|
|
} d3d_texture_t;
|
|
|
|
|
2018-03-03 15:28:58 +01:00
|
|
|
#ifndef BYTE_CLAMP
|
|
|
|
#define BYTE_CLAMP(i) (int) ((((i) > 255) ? 255 : (((i) < 0) ? 0 : (i))))
|
|
|
|
#endif
|
|
|
|
|
2018-01-26 03:53:37 +01:00
|
|
|
#define D3DTADDRESS_COMM_CLAMP 3
|
|
|
|
#define D3DTEXF_COMM_LINEAR 2
|
|
|
|
#define D3DPT_COMM_TRIANGLESTRIP 5
|
|
|
|
|
2018-04-22 13:09:03 +02:00
|
|
|
/* Clear target surface */
|
|
|
|
#define D3D_COMM_CLEAR_TARGET 0x00000001l
|
2017-10-02 00:45:33 +02:00
|
|
|
|
2017-10-02 18:50:54 +02:00
|
|
|
void *d3d_matrix_transpose(void *_pout, const void *_pm);
|
|
|
|
|
2018-04-22 13:09:03 +02:00
|
|
|
void *d3d_matrix_identity(void *_pout);
|
2017-10-02 18:50:54 +02:00
|
|
|
|
|
|
|
void *d3d_matrix_ortho_off_center_lh(void *_pout,
|
|
|
|
float l, float r, float b, float t, float zn, float zf);
|
|
|
|
|
2018-04-22 13:09:03 +02:00
|
|
|
void *d3d_matrix_multiply(void *_pout,
|
|
|
|
const void *_pm1, const void *_pm2);
|
2017-10-02 18:50:54 +02:00
|
|
|
|
|
|
|
void *d3d_matrix_rotation_z(void *_pout, float angle);
|
|
|
|
|
2018-04-22 15:45:11 +02:00
|
|
|
int32_t d3d_translate_filter(unsigned type);
|
|
|
|
|
2016-06-03 08:06:49 +02:00
|
|
|
RETRO_END_DECLS
|
2015-11-09 01:19:09 +01:00
|
|
|
|
2014-09-11 23:43:01 +02:00
|
|
|
#endif
|