PSP Tutorial: Add r_dithering (like DQuake)
Moderator: InsideQC Admins
1 post
• Page 1 of 1
PSP Tutorial: Add r_dithering (like DQuake)
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};
Register it somewhere. DQuake does it in video_hardware_screen.cpp in SCR_Init
- Code: Select all
Cvar_RegisterVariable (&r_dithering);
In video_hardware.cpp, modify GL_BeginRendering ...
- 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);
}
The end.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
1 post
• Page 1 of 1
Return to Programming Tutorials
Who is online
Users browsing this forum: No registered users and 1 guest