RetroArch/gfx/common/d3d_common.h

60 lines
1.7 KiB
C
Raw Normal View History

/* RetroArch - A frontend for libretro.
2017-01-22 13:40:32 +01:00
* Copyright (C) 2011-2017 - Daniel De Matteis
*
* 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
#include <boolean.h>
2016-06-03 08:06:49 +02:00
#include <retro_common_api.h>
2018-01-23 04:25:37 +01:00
#include "../video_driver.h"
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;
#ifndef BYTE_CLAMP
#define BYTE_CLAMP(i) (int) ((((i) > 255) ? 255 : (((i) < 0) ? 0 : (i))))
#endif
#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
void *d3d_matrix_transpose(void *_pout, const void *_pm);
2018-04-22 13:09:03 +02:00
void *d3d_matrix_identity(void *_pout);
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);
void *d3d_matrix_rotation_z(void *_pout, float angle);
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
#endif