[Video] Rename GrOriginLocation_t to gfxOriginLocation_t
This commit is contained in:
parent
96306c0ee2
commit
955546db81
|
@ -473,7 +473,7 @@ int InitGfx()
|
||||||
#ifndef ANDROID
|
#ifndef ANDROID
|
||||||
SetWindowDisplaySize((HWND)gfx.hWnd);
|
SetWindowDisplaySize((HWND)gfx.hWnd);
|
||||||
#endif
|
#endif
|
||||||
if (!gfxSstWinOpen(GFX_COLORFORMAT_RGBA, GR_ORIGIN_UPPER_LEFT, 2, 1))
|
if (!gfxSstWinOpen(GFX_COLORFORMAT_RGBA, GFX_ORIGIN_UPPER_LEFT, 2, 1))
|
||||||
{
|
{
|
||||||
g_Notify->DisplayError("Error setting display mode");
|
g_Notify->DisplayError("Error setting display mode");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1273,7 +1273,7 @@ void newSwapBuffers()
|
||||||
|
|
||||||
GrLfbInfo_t info;
|
GrLfbInfo_t info;
|
||||||
info.size = sizeof(GrLfbInfo_t);
|
info.size = sizeof(GrLfbInfo_t);
|
||||||
if (gfxLfbLock(GFX_LFB_READ_ONLY, GFX_BUFFER_BACKBUFFER, GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info))
|
if (gfxLfbLock(GFX_LFB_READ_ONLY, GFX_BUFFER_BACKBUFFER, GR_LFBWRITEMODE_565, GFX_ORIGIN_UPPER_LEFT, FXFALSE, &info))
|
||||||
{
|
{
|
||||||
AUTO_PTR<uint8_t> ssimg_buffer(new uint8_t[image_width * image_height * 3]);
|
AUTO_PTR<uint8_t> ssimg_buffer(new uint8_t[image_width * image_height * 3]);
|
||||||
uint8_t * ssimg = ssimg_buffer.get();
|
uint8_t * ssimg = ssimg_buffer.get();
|
||||||
|
|
|
@ -319,7 +319,7 @@ int isWglExtensionSupported(const char *extension)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool gfxSstWinOpen(gfxColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers)
|
bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers)
|
||||||
{
|
{
|
||||||
static int show_warning = 1;
|
static int show_warning = 1;
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ bool gfxSstWinOpen(gfxColorFormat_t color_format, GrOriginLocation_t origin_loca
|
||||||
|
|
||||||
glViewport(0, g_viewport_offset, g_width, g_height);
|
glViewport(0, g_viewport_offset, g_width, g_height);
|
||||||
lfb_color_fmt = color_format;
|
lfb_color_fmt = color_format;
|
||||||
if (origin_location != GR_ORIGIN_UPPER_LEFT) WriteTrace(TraceGlitch, TraceWarning, "origin must be in upper left corner");
|
if (origin_location != GFX_ORIGIN_UPPER_LEFT) WriteTrace(TraceGlitch, TraceWarning, "origin must be in upper left corner");
|
||||||
if (nColBuffers != 2) WriteTrace(TraceGlitch, TraceWarning, "number of color buffer is not 2");
|
if (nColBuffers != 2) WriteTrace(TraceGlitch, TraceWarning, "number of color buffer is not 2");
|
||||||
if (nAuxBuffers != 1) WriteTrace(TraceGlitch, TraceWarning, "number of auxiliary buffer is not 1");
|
if (nAuxBuffers != 1) WriteTrace(TraceGlitch, TraceWarning, "number of auxiliary buffer is not 1");
|
||||||
|
|
||||||
|
@ -1324,7 +1324,7 @@ void gfxBufferSwap(uint32_t swap_interval)
|
||||||
}
|
}
|
||||||
|
|
||||||
// frame buffer
|
// frame buffer
|
||||||
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info)
|
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, GrLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
|
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
|
||||||
if (type == GFX_LFB_WRITE_ONLY)
|
if (type == GFX_LFB_WRITE_ONLY)
|
||||||
|
|
|
@ -451,7 +451,7 @@ int isWglExtensionSupported(const char *extension)
|
||||||
extern HWND g_hwnd_win;
|
extern HWND g_hwnd_win;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool gfxSstWinOpen(gfxColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers)
|
bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers)
|
||||||
{
|
{
|
||||||
static int show_warning = 1;
|
static int show_warning = 1;
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ bool gfxSstWinOpen(gfxColorFormat_t color_format, GrOriginLocation_t origin_loca
|
||||||
}
|
}
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
lfb_color_fmt = color_format;
|
lfb_color_fmt = color_format;
|
||||||
if (origin_location != GR_ORIGIN_UPPER_LEFT) WriteTrace(TraceGlitch, TraceWarning, "origin must be in upper left corner");
|
if (origin_location != GFX_ORIGIN_UPPER_LEFT) WriteTrace(TraceGlitch, TraceWarning, "origin must be in upper left corner");
|
||||||
if (nColBuffers != 2) WriteTrace(TraceGlitch, TraceWarning, "number of color buffer is not 2");
|
if (nColBuffers != 2) WriteTrace(TraceGlitch, TraceWarning, "number of color buffer is not 2");
|
||||||
if (nAuxBuffers != 1) WriteTrace(TraceGlitch, TraceWarning, "number of auxiliary buffer is not 1");
|
if (nAuxBuffers != 1) WriteTrace(TraceGlitch, TraceWarning, "number of auxiliary buffer is not 1");
|
||||||
|
|
||||||
|
@ -1193,7 +1193,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, FxI32 *params)
|
||||||
if (plength < 4 || params == NULL) return 0;
|
if (plength < 4 || params == NULL) return 0;
|
||||||
if (!nbTextureUnits)
|
if (!nbTextureUnits)
|
||||||
{
|
{
|
||||||
gfxSstWinOpen(GFX_COLORFORMAT_ARGB, GR_ORIGIN_UPPER_LEFT, 2, 1);
|
gfxSstWinOpen(GFX_COLORFORMAT_ARGB, GFX_ORIGIN_UPPER_LEFT, 2, 1);
|
||||||
gfxSstWinClose();
|
gfxSstWinClose();
|
||||||
}
|
}
|
||||||
#ifdef VOODOO1
|
#ifdef VOODOO1
|
||||||
|
@ -1604,7 +1604,7 @@ void gfxBufferSwap(uint32_t swap_interval)
|
||||||
}
|
}
|
||||||
|
|
||||||
// frame buffer
|
// frame buffer
|
||||||
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info)
|
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, GrLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
|
WriteTrace(TraceGlitch, TraceDebug, "type: %d buffer: %d writeMode: %d origin: %d pixelPipeline: %d", type, buffer, writeMode, origin, pixelPipeline);
|
||||||
if (type == GFX_LFB_WRITE_ONLY)
|
if (type == GFX_LFB_WRITE_ONLY)
|
||||||
|
|
|
@ -51,13 +51,13 @@ void gfxDrawLine(const void *a, const void *b);
|
||||||
void gfxDrawVertexArray(uint32_t mode, uint32_t Count, void *pointers2);
|
void gfxDrawVertexArray(uint32_t mode, uint32_t Count, void *pointers2);
|
||||||
void gfxDrawVertexArrayContiguous(uint32_t mode, uint32_t Count, void *pointers, uint32_t stride);
|
void gfxDrawVertexArrayContiguous(uint32_t mode, uint32_t Count, void *pointers, uint32_t stride);
|
||||||
|
|
||||||
bool gfxSstWinOpen(gfxColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers);
|
bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers);
|
||||||
void gfxAuxBufferExt(gfxBuffer_t buffer);
|
void gfxAuxBufferExt(gfxBuffer_t buffer);
|
||||||
uint32_t gfxGet(uint32_t pname, uint32_t plength, FxI32 *params);
|
uint32_t gfxGet(uint32_t pname, uint32_t plength, FxI32 *params);
|
||||||
void gfxRenderBuffer(gfxBuffer_t buffer);
|
void gfxRenderBuffer(gfxBuffer_t buffer);
|
||||||
void gfxBufferClear(gfxColor_t color, gfxAlpha_t alpha, uint32_t depth);
|
void gfxBufferClear(gfxColor_t color, gfxAlpha_t alpha, uint32_t depth);
|
||||||
void gfxBufferSwap(uint32_t swap_interval);
|
void gfxBufferSwap(uint32_t swap_interval);
|
||||||
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info);
|
bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, GrLfbWriteMode_t writeMode, gfxOriginLocation_t origin, bool pixelPipeline, GrLfbInfo_t *info);
|
||||||
bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer);
|
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);
|
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);
|
||||||
bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, GrLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, FxI32 src_stride, void *src_data);
|
bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, GrLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, FxI32 src_stride, void *src_data);
|
||||||
|
|
|
@ -271,6 +271,13 @@ enum gfxLock_t
|
||||||
GFX_LFB_NOIDLE = 0x10,
|
GFX_LFB_NOIDLE = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum gfxOriginLocation_t
|
||||||
|
{
|
||||||
|
GFX_ORIGIN_UPPER_LEFT = 0x0,
|
||||||
|
GFX_ORIGIN_LOWER_LEFT = 0x1,
|
||||||
|
GFX_ORIGIN_ANY = 0xFF,
|
||||||
|
};
|
||||||
|
|
||||||
enum gfxLfbSrcFmt_t
|
enum gfxLfbSrcFmt_t
|
||||||
{
|
{
|
||||||
GFX_LFB_SRC_FMT_565 = 0x00,
|
GFX_LFB_SRC_FMT_565 = 0x00,
|
||||||
|
|
|
@ -666,7 +666,7 @@ static void CopyFrameBuffer(gfxBuffer_t buffer = GFX_BUFFER_BACKBUFFER)
|
||||||
if (gfxLfbLock(GFX_LFB_READ_ONLY,
|
if (gfxLfbLock(GFX_LFB_READ_ONLY,
|
||||||
buffer,
|
buffer,
|
||||||
GR_LFBWRITEMODE_565,
|
GR_LFBWRITEMODE_565,
|
||||||
GR_ORIGIN_UPPER_LEFT,
|
GFX_ORIGIN_UPPER_LEFT,
|
||||||
FXFALSE,
|
FXFALSE,
|
||||||
&info))
|
&info))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue