mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2025-04-24 18:22:02 +00:00
- added option to switch on/off the skydome in display options
- reduced the total triangles used for the skydome to improve performance on Android device - when the skydome is disabled the background color will match the color of the texture of the skydome to keep some immersion during gameplay
This commit is contained in:
parent
e8194dbb01
commit
61fac890a8
4 changed files with 15 additions and 6 deletions
|
@ -839,9 +839,6 @@ void GLSceneDrawer::SetFixedColormap (player_t *player)
|
|||
sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen)
|
||||
{
|
||||
sector_t * lviewsector;
|
||||
GLRenderer->mSceneClearColor[0] = 0.0f;
|
||||
GLRenderer->mSceneClearColor[1] = 0.0f;
|
||||
GLRenderer->mSceneClearColor[2] = 0.0f;
|
||||
R_SetupFrame (r_viewpoint, r_viewwindow, camera);
|
||||
SetViewArea();
|
||||
|
||||
|
|
|
@ -78,12 +78,13 @@
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Shamelessly lifted from Doomsday (written by Jaakko Keränen)
|
||||
// Shamelessly lifted from Doomsday (written by Jaakko Ker?en)
|
||||
// also shamelessly lifted from ZDoomGL! ;)
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
CVAR(Float, skyoffset, 0, 0) // for testing
|
||||
CVAR(Bool, gl_skydome, true, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -227,8 +228,8 @@ void FSkyVertexBuffer::CreateDome()
|
|||
mVertices[10].Set(-1.0f, 0.0f, -1.0f);
|
||||
mVertices[11].Set(0.0f, 0.0f, 1.0f);
|
||||
|
||||
mColumns = 128;
|
||||
mRows = 4;
|
||||
mColumns = 32;
|
||||
mRows = 2;
|
||||
CreateSkyHemisphere(SKYHEMI_UPPER);
|
||||
CreateSkyHemisphere(SKYHEMI_LOWER);
|
||||
mPrimStart.Push(mVertices.Size());
|
||||
|
@ -499,6 +500,15 @@ static void RenderBox(FTextureID texno, FMaterial * gltex, float x_offset, bool
|
|||
//-----------------------------------------------------------------------------
|
||||
void GLSkyPortal::DrawContents()
|
||||
{
|
||||
if (!gl_skydome && origin->texture[0])
|
||||
{
|
||||
PalEntry pe = origin->texture[0]->tex->GetSkyCapColor(false);
|
||||
GLRenderer->mSceneClearColor[0] = pe.r / 255.f;
|
||||
GLRenderer->mSceneClearColor[1] = pe.g / 255.f;
|
||||
GLRenderer->mSceneClearColor[2] = pe.b / 255.f;
|
||||
return;
|
||||
}
|
||||
|
||||
bool drawBoth = false;
|
||||
|
||||
// We have no use for Doom lighting special handling here, so disable it for this function.
|
||||
|
|
|
@ -1919,6 +1919,7 @@ DSPLYMNU_GPUSWITCH = "Notebook Switchable GPU";
|
|||
DSPLYMNU_CUSTOMINVERTMAP = "Custom Inverse Map";
|
||||
DSPLYMNU_CUSTOMINVERTC1 = "Custom Inverse Color Dark";
|
||||
DSPLYMNU_CUSTOMINVERTC2 = "Custom Inverse Color Light";
|
||||
DSPLYMNU_RENDERSKYDOME = "Render the skydome";
|
||||
|
||||
// HUD Options
|
||||
HUDMNU_TITLE = "HUD Options";
|
||||
|
|
|
@ -929,6 +929,7 @@ OptionMenu "VideoOptions" protected
|
|||
Option "$DSPLYMNU_TELEZOOM", "telezoom", "OnOff"
|
||||
Slider "$DSPLYMNU_QUAKEINTENSITY", "r_quakeintensity", 0.0, 1.0, 0.05, 2
|
||||
Option "$DSPLYMNU_NOMONSTERINTERPOLATION", "nomonsterinterpolation", "NoYes"
|
||||
Option "$DSPLYMNU_RENDERSKYDOME", "gl_skydome", "YesNo"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue