2017-05-17 08:01:54 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* Project64-video - A Nintendo 64 gfx plugin. *
|
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2017 Project64. All rights reserved. *
|
|
|
|
* Copyright (C) 2003-2009 Sergey 'Gonetz' Lipski *
|
|
|
|
* Copyright (C) 2002 Dave2001 *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* version 2 of the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include <Project64-video/Renderer/types.h>
|
2017-05-22 07:32:32 +00:00
|
|
|
#include <glide.h>
|
|
|
|
|
2017-07-22 22:42:02 +00:00
|
|
|
void gfxClipWindow(uint32_t minx, uint32_t miny, uint32_t maxx, uint32_t maxy);
|
2017-07-22 23:03:22 +00:00
|
|
|
void gfxColorMask(bool rgb, bool a);
|
2017-07-23 00:04:04 +00:00
|
|
|
uint32_t gfxTexMinAddress(gfxChipID_t tmu);
|
2017-07-23 02:53:37 +00:00
|
|
|
bool gfxSstWinClose();
|
2017-07-25 22:17:52 +00:00
|
|
|
void gfxTextureBufferExt(gfxChipID_t tmu, uint32_t startAddress, gfxLOD_t lodmin, gfxLOD_t lodmax, gfxAspectRatio_t aspect, gfxTextureFormat_t fmt, uint32_t evenOdd);
|
2017-07-23 00:04:04 +00:00
|
|
|
uint32_t gfxTexMaxAddress(gfxChipID_t tmu);
|
2017-07-25 08:29:37 +00:00
|
|
|
uint32_t gfxTexTextureMemRequired(uint32_t evenOdd, gfxTexInfo *info);
|
2017-07-25 22:25:29 +00:00
|
|
|
void gfxConstantColorValue(gfxColor_t value);
|
2017-07-28 11:33:52 +00:00
|
|
|
void gfxColorCombine(gfxCombineFunction_t function, gfxCombineFactor_t factor, gfxCombineLocal_t local, gfxCombineOther_t other, bool invert);
|
|
|
|
void gfxAlphaCombine(gfxCombineFunction_t function, gfxCombineFactor_t factor, gfxCombineLocal_t local, gfxCombineOther_t other, bool invert);
|
2017-07-26 11:46:02 +00:00
|
|
|
void gfxTexCombine(gfxChipID_t tmu, gfxCombineFunction_t rgb_function, gfxCombineFactor_t rgb_factor, gfxCombineFunction_t alpha_function, gfxCombineFactor_t alpha_factor, bool rgb_invert, bool alpha_invert);
|
2017-07-31 07:46:36 +00:00
|
|
|
void gfxAlphaBlendFunction(gfxAlphaBlendFnc_t rgb_sf, gfxAlphaBlendFnc_t rgb_df, gfxAlphaBlendFnc_t alpha_sf, gfxAlphaBlendFnc_t alpha_df);
|
2017-05-23 22:30:38 +00:00
|
|
|
void gfxAlphaTestReferenceValue(gfxAlpha_t value);
|
2017-07-31 11:05:29 +00:00
|
|
|
void gfxAlphaTestFunction(gfxCmpFnc_t function);
|
2017-07-31 11:15:09 +00:00
|
|
|
void gfxFogMode(gfxFogMode_t mode);
|
2017-05-24 07:30:02 +00:00
|
|
|
void gfxFogGenerateLinear(float nearZ, float farZ);
|
2017-07-25 22:25:29 +00:00
|
|
|
void gfxFogColorValue(gfxColor_t fogcolor);
|
2017-07-31 11:28:53 +00:00
|
|
|
void gfxChromakeyMode(gfxChromakeyMode_t mode);
|
2017-07-25 22:25:29 +00:00
|
|
|
void gfxChromakeyValue(gfxColor_t value);
|
2017-07-31 22:16:56 +00:00
|
|
|
void gfxStippleMode(gfxStippleMode_t mode);
|
2017-07-22 23:03:22 +00:00
|
|
|
void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t b, gfxCombineMode_t b_mode, gfxCCUColor_t c, bool c_invert, gfxCCUColor_t d, bool d_invert, uint32_t shift, bool invert);
|
|
|
|
void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t b, gfxCombineMode_t b_mode, gfxACUColor_t c, bool c_invert, gfxACUColor_t d, bool d_invert, uint32_t shift, bool invert);
|
2017-07-23 00:04:04 +00:00
|
|
|
void gfxTexColorCombineExt(gfxChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_mode, gfxTCCUColor_t b, gfxCombineMode_t b_mode, gfxTCCUColor_t c, bool c_invert, gfxTCCUColor_t d, bool d_invert, uint32_t shift, bool invert);
|
|
|
|
void gfxTexAlphaCombineExt(gfxChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_mode, gfxTACUColor_t b, gfxCombineMode_t b_mode, gfxTACUColor_t c, bool c_invert, gfxTACUColor_t d, bool d_invert, uint32_t shift, bool invert);
|
2017-07-25 22:25:29 +00:00
|
|
|
void gfxConstantColorValueExt(gfxChipID_t tmu, gfxColor_t value);
|
2017-08-08 21:32:10 +00:00
|
|
|
void gfxVertexLayout(uint32_t param, int32_t offset, uint32_t mode);
|
2017-08-02 21:48:55 +00:00
|
|
|
void gfxCullMode(gfxCullMode_t mode);
|
2017-08-02 22:02:52 +00:00
|
|
|
void gfxDepthBufferMode(gfxDepthBufferMode_t mode);
|
2017-07-31 11:05:29 +00:00
|
|
|
void gfxDepthBufferFunction(gfxCmpFnc_t function);
|
2017-07-22 23:03:22 +00:00
|
|
|
void gfxDepthMask(bool mask);
|
2017-05-24 22:54:10 +00:00
|
|
|
void gfxDrawTriangle(const void *a, const void *b, const void *c);
|
2017-08-08 21:32:10 +00:00
|
|
|
void gfxDepthBiasLevel(int32_t level);
|
2017-05-25 08:01:37 +00:00
|
|
|
void gfxDrawLine(const void *a, const void *b);
|
2017-08-10 07:37:41 +00:00
|
|
|
void gfxDrawVertexArray(gfxDrawMode_t mode, uint32_t Count, void *pointers2);
|
|
|
|
void gfxDrawVertexArrayContiguous(gfxDrawMode_t mode, uint32_t Count, void *pointers, uint32_t stride);
|
2017-05-17 08:01:54 +00:00
|
|
|
|
2017-08-08 10:45:53 +00:00
|
|
|
bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers);
|
2017-08-06 22:22:12 +00:00
|
|
|
void gfxAuxBufferExt(gfxBuffer_t buffer);
|
|
|
|
void gfxRenderBuffer(gfxBuffer_t buffer);
|
2017-07-25 22:25:29 +00:00
|
|
|
void gfxBufferClear(gfxColor_t color, gfxAlpha_t alpha, uint32_t depth);
|
2017-07-22 22:42:02 +00:00
|
|
|
void gfxBufferSwap(uint32_t swap_interval);
|
2017-08-08 12:21:56 +00:00
|
|
|
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, gfxLfbInfo_t *info);
|
2017-08-06 22:22:12 +00:00
|
|
|
bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer);
|
|
|
|
bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, uint32_t src_width, uint32_t src_height, uint32_t dst_stride, void *dst_data);
|
2017-08-08 21:32:10 +00:00
|
|
|
bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, gfxLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, int32_t src_stride, void *src_data);
|
2017-07-25 22:17:52 +00:00
|
|
|
uint32_t gfxTexCalcMemRequired(gfxLOD_t lodmin, gfxLOD_t lodmax, gfxAspectRatio_t aspect, gfxTextureFormat_t fmt);
|
2017-07-22 22:42:02 +00:00
|
|
|
void gfxLoadGammaTable(uint32_t nentries, uint32_t *red, uint32_t *green, uint32_t *blue);
|
|
|
|
void gfxGetGammaTableExt(uint32_t /*nentries*/, uint32_t *red, uint32_t *green, uint32_t *blue);
|
2017-08-08 22:33:31 +00:00
|
|
|
void gfxGammaCorrectionRGB(float gammaR, float gammaG, float gammaB);
|
2017-08-10 07:25:40 +00:00
|
|
|
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, gfxMipMapLevelMask_t evenOdd, gfxTexInfo *info);
|
2017-07-25 08:29:37 +00:00
|
|
|
void gfxTexSource(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
2017-08-08 22:38:00 +00:00
|
|
|
void gfxTexDetailControl(gfxChipID_t tmu, int lod_bias, uint8_t detail_scale, float detail_max);
|
2017-08-08 19:55:25 +00:00
|
|
|
void gfxTexClampMode(gfxChipID_t tmu, gfxTextureClampMode_t s_clampmode, gfxTextureClampMode_t t_clampmode);
|
2017-08-08 20:23:11 +00:00
|
|
|
void gfxTexFilterMode(gfxChipID_t tmu, gfxTextureFilterMode_t minfilter_mode, gfxTextureFilterMode_t magfilter_mode);
|
2017-05-25 08:19:28 +00:00
|
|
|
|
2017-05-17 08:13:04 +00:00
|
|
|
extern uint32_t nbTextureUnits;
|
|
|
|
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|