- moved most of gl_setup.cpp to r_data as this is only some data setup in the main map data structures.

- made currentmapsections array something nicer to look at and made it a member of the scene drawer class.
This commit is contained in:
Christoph Oelckers 2018-04-02 09:27:40 +02:00
commit 8080e039e0
12 changed files with 101 additions and 40 deletions

View file

@ -88,7 +88,6 @@ EXTERN_CVAR (Bool, r_drawvoxels)
extern bool NoInterpolateView;
area_t in_area;
TArray<uint8_t> currentmapsection;
int camtexcount;
//-----------------------------------------------------------------------------
@ -737,8 +736,9 @@ void GLSceneDrawer::ProcessScene(bool toscreen)
GLPortal::BeginScene();
int mapsection = R_PointInSubsector(r_viewpoint.Pos)->mapsection;
memset(&currentmapsection[0], 0, currentmapsection.Size());
currentmapsection[mapsection>>3] |= 1 << (mapsection & 7);
CurrentMapSections.Resize(level.NumMapSections);
CurrentMapSections.Zero();
CurrentMapSections.Set(mapsection);
DrawScene(toscreen ? DM_MAINVIEW : DM_OFFSCREEN);
FDrawInfo::EndDrawInfo();
@ -1129,10 +1129,12 @@ void FGLInterface::RenderTextureView (FCanvasTexture *tex, AActor *Viewpoint, do
//
//
//===========================================================================
void gl_PreprocessLevel();
void FGLInterface::PreprocessLevel()
{
gl_PreprocessLevel();
if (GLRenderer != NULL)
{
GLRenderer->SetupLevel();
}
}
uint32_t FGLInterface::GetCaps()