mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
- cleaned up includes for gl_decal.cpp
This commit is contained in:
parent
383ff0d8b8
commit
678ac40b72
3 changed files with 17 additions and 20 deletions
|
@ -1,7 +1,7 @@
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright(C) 2003-2016 Christoph Oelckers
|
// Copyright(C) 2003-2018 Christoph Oelckers
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -21,24 +21,20 @@
|
||||||
//
|
//
|
||||||
/*
|
/*
|
||||||
** gl_decal.cpp
|
** gl_decal.cpp
|
||||||
** OpenGL decal rendering code
|
** OpenGL decal processing code
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "doomdata.h"
|
#include "doomdata.h"
|
||||||
#include "gl/system/gl_system.h"
|
|
||||||
#include "a_sharedglobal.h"
|
#include "a_sharedglobal.h"
|
||||||
#include "r_utility.h"
|
#include "r_utility.h"
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
|
#include "hwrenderer/textures/hw_material.h"
|
||||||
#include "hwrenderer/utility/hw_cvars.h"
|
#include "hwrenderer/utility/hw_cvars.h"
|
||||||
#include "gl/data/gl_vertexbuffer.h"
|
#include "hwrenderer/scene/hw_drawstructs.h"
|
||||||
#include "gl/renderer/gl_renderer.h"
|
#include "hwrenderer/scene/hw_drawinfo.h"
|
||||||
#include "gl/renderer/gl_lightdata.h"
|
#include "hwrenderer/utility/hw_lighting.h"
|
||||||
#include "gl/renderer/gl_renderstate.h"
|
#include "hwrenderer/data/flatvertices.h"
|
||||||
#include "gl/scene/gl_drawinfo.h"
|
|
||||||
#include "gl/scene/gl_scenedrawer.h"
|
|
||||||
#include "gl/renderer/gl_quaddrawer.h"
|
|
||||||
|
|
||||||
void GLWall::ProcessDecal(HWDrawInfo *di, DBaseDecal *decal)
|
void GLWall::ProcessDecal(HWDrawInfo *di, DBaseDecal *decal)
|
||||||
{
|
{
|
||||||
|
@ -257,7 +253,7 @@ void GLWall::ProcessDecal(HWDrawInfo *di, DBaseDecal *decal)
|
||||||
|
|
||||||
gldecal.zcenter = zpos - decalheight * 0.5f;
|
gldecal.zcenter = zpos - decalheight * 0.5f;
|
||||||
|
|
||||||
auto verts = gl_drawinfo->AllocVertices(4);
|
auto verts = di->AllocVertices(4);
|
||||||
gldecal.vertindex = verts.second;
|
gldecal.vertindex = verts.second;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
|
|
@ -9,14 +9,6 @@
|
||||||
#include "r_utility.h"
|
#include "r_utility.h"
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Int, gl_weaponlight);
|
|
||||||
|
|
||||||
inline int getExtraLight()
|
|
||||||
{
|
|
||||||
return r_viewpoint.extralight * gl_weaponlight;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class GLSceneDrawer
|
class GLSceneDrawer
|
||||||
{
|
{
|
||||||
fixed_t viewx, viewy; // since the nodes are still fixed point, keeping the view position also fixed point for node traversal is faster.
|
fixed_t viewx, viewy; // since the nodes are still fixed point, keeping the view position also fixed point for node traversal is faster.
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "c_cvars.h"
|
||||||
#include "v_palette.h"
|
#include "v_palette.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
|
#include "r_utility.h"
|
||||||
|
|
||||||
struct Colormap;
|
struct Colormap;
|
||||||
|
|
||||||
|
@ -15,3 +17,10 @@ inline int hw_ClampLight(int lightlevel)
|
||||||
return clamp(lightlevel, 0, 255);
|
return clamp(lightlevel, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXTERN_CVAR(Int, gl_weaponlight);
|
||||||
|
|
||||||
|
inline int getExtraLight()
|
||||||
|
{
|
||||||
|
return r_viewpoint.extralight * gl_weaponlight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue