PSP Tutorial: Add r_dithering (like DQuake)
Posted: Fri Feb 24, 2012 4:45 am
Tutorial is based off the DQuake engine implementation by crowbar. DQuake's home page is: http://pdquake.svn.sourceforge.net/
The short version:
Create a cvar called r_dithering. DQuake does it in video_hardware_screen.cpp
Register it somewhere. DQuake does it in video_hardware_screen.cpp in SCR_Init
In video_hardware.cpp, modify GL_BeginRendering ...
The end.
The short version:
Create a cvar called r_dithering. DQuake does it in video_hardware_screen.cpp
Code: Select all
cvar_t r_dithering = {"r_dithering","1",true};Code: Select all
Cvar_RegisterVariable (&r_dithering);Code: Select all
extern cvar_t r_dithering; // <---------------------------------------------- add me
void GL_BeginRendering (int *x, int *y, int *width, int *height)
{
*x = 2048;
*y = 2048;
*width = screen_width;
*height = screen_height;
if (r_dithering.value) // <--------------------------------------------- add me
sceGuEnable(GU_DITHER); // <--------------------------------------------- add me
else // <--------------------------------------------- add me
sceGuDisable(GU_DITHER);
}