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>
|
|
|
|
#include "../GlideExtensions.h"
|
|
|
|
|
2017-05-22 10:18:43 +00:00
|
|
|
void gfxClipWindow(FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy);
|
2017-05-22 10:35:28 +00:00
|
|
|
void gfxColorMask(FxBool rgb, FxBool a);
|
2017-05-22 10:52:09 +00:00
|
|
|
FxU32 gfxTexMinAddress(GrChipID_t tmu);
|
|
|
|
FxBool gfxSstWinClose(GrContext_t context);
|
2017-05-22 11:13:26 +00:00
|
|
|
void gfxTextureBufferExt(GrChipID_t tmu, FxU32 startAddress, GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt, FxU32 evenOdd);
|
2017-05-23 07:26:00 +00:00
|
|
|
FxU32 gfxTexMaxAddress(GrChipID_t tmu);
|
2017-05-23 07:32:25 +00:00
|
|
|
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info);
|
2017-05-23 22:04:28 +00:00
|
|
|
void gfxConstantColorValue(GrColor_t value);
|
2017-05-23 22:10:49 +00:00
|
|
|
void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
|
2017-05-23 22:16:13 +00:00
|
|
|
void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
|
2017-05-23 22:21:02 +00:00
|
|
|
void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert);
|
2017-05-23 22:24:57 +00:00
|
|
|
void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df);
|
2017-05-23 22:30:38 +00:00
|
|
|
void gfxAlphaTestReferenceValue(gfxAlpha_t value);
|
2017-05-23 22:37:24 +00:00
|
|
|
void gfxAlphaTestFunction(GrCmpFnc_t function);
|
2017-05-23 22:42:55 +00:00
|
|
|
void gfxFogMode(GrFogMode_t mode);
|
2017-05-24 07:30:02 +00:00
|
|
|
void gfxFogGenerateLinear(float nearZ, float farZ);
|
2017-05-24 07:33:55 +00:00
|
|
|
void gfxFogColorValue(GrColor_t fogcolor);
|
2017-05-24 07:59:25 +00:00
|
|
|
void gfxChromakeyMode(GrChromakeyMode_t mode);
|
2017-05-24 08:01:36 +00:00
|
|
|
void gfxChromakeyValue(GrColor_t value);
|
2017-05-24 08:14:54 +00:00
|
|
|
void gfxStippleMode(GrStippleMode_t mode);
|
2017-05-24 10:41:38 +00:00
|
|
|
void gfxColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode, GrCCUColor_t b, GrCombineMode_t b_mode, GrCCUColor_t c, FxBool c_invert, GrCCUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert);
|
2017-05-24 10:59:02 +00:00
|
|
|
void gfxAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, GrACUColor_t b, GrCombineMode_t b_mode, GrACUColor_t c, FxBool c_invert, GrACUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert);
|
2017-05-24 22:12:59 +00:00
|
|
|
void gfxTexColorCombineExt(GrChipID_t tmu, GrTCCUColor_t a, GrCombineMode_t a_mode, GrTCCUColor_t b, GrCombineMode_t b_mode, GrTCCUColor_t c, FxBool c_invert, GrTCCUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert);
|
2017-05-24 22:20:18 +00:00
|
|
|
void gfxTexAlphaCombineExt(GrChipID_t tmu, GrTACUColor_t a, GrCombineMode_t a_mode, GrTACUColor_t b, GrCombineMode_t b_mode, GrTACUColor_t c, FxBool c_invert, GrTACUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert);
|
2017-05-24 22:23:57 +00:00
|
|
|
void gfxConstantColorValueExt(GrChipID_t tmu, GrColor_t value);
|
2017-05-24 22:31:05 +00:00
|
|
|
void gfxVertexLayout(FxU32 param, FxI32 offset, FxU32 mode);
|
2017-05-24 22:36:49 +00:00
|
|
|
void gfxCullMode(GrCullMode_t mode);
|
2017-05-24 22:44:15 +00:00
|
|
|
void gfxDepthBufferMode(GrDepthBufferMode_t mode);
|
2017-05-24 22:49:39 +00:00
|
|
|
void gfxDepthBufferFunction(GrCmpFnc_t function);
|
2017-05-24 22:51:36 +00:00
|
|
|
void gfxDepthMask(FxBool mask);
|
2017-05-24 22:54:10 +00:00
|
|
|
void gfxDrawTriangle(const void *a, const void *b, const void *c);
|
2017-05-25 07:31:29 +00:00
|
|
|
void gfxDepthBiasLevel(FxI32 level);
|
2017-05-25 08:01:37 +00:00
|
|
|
void gfxDrawLine(const void *a, const void *b);
|
2017-05-25 08:05:53 +00:00
|
|
|
void gfxDrawVertexArray(FxU32 mode, FxU32 Count, void *pointers2);
|
2017-05-25 08:10:13 +00:00
|
|
|
void gfxDrawVertexArrayContiguous(FxU32 mode, FxU32 Count, void *pointers, FxU32 stride);
|
2017-05-17 08:01:54 +00:00
|
|
|
|
2017-05-25 08:19:28 +00:00
|
|
|
GrContext_t gfxSstWinOpen(GrColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers);
|
2017-05-25 10:00:21 +00:00
|
|
|
void gfxAuxBufferExt(GrBuffer_t buffer);
|
2017-05-25 21:39:33 +00:00
|
|
|
FxU32 gfxGet(FxU32 pname, FxU32 plength, FxI32 *params);
|
|
|
|
void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mode);
|
2017-05-25 21:48:24 +00:00
|
|
|
void gfxRenderBuffer(GrBuffer_t buffer);
|
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;
|