Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
renderbackground.cpp File Reference
#include <math.h>
#include <stddef.h>
#include <algorithm>
#include <string>
#include "inexor/client/network.hpp"
#include "inexor/engine/frame.hpp"
#include "inexor/engine/glemu.hpp"
#include "inexor/engine/renderbackground.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/rendertext.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/io/filesystem/mediadirs.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/sound/sound.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/legacy/menus.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"
#include "inexor/util/legacy_time.hpp"
#include "inexor/util/random.hpp"

Functions

 SVARFP (background,"interface/background.png", background_texture=NULL;)
 
 SVARFP (logo,"interface/logo.png", logo_texture=NULL;)
 
static void getbackgroundres (int &w, int &h)
 create a resolution suggestion by scaling down the larger side of the 2 screen dimensions. More...
 
void restorebackground ()
 this function is called to render the main menu background once so the loading progress can be rendered over it continuously More...
 
void bgquad (float x, float y, float w, float h)
 Render a textured quad of the given dimensions. More...
 
void renderbackground (const char *caption, Texture *mapshot, const char *mapname, const char *mapinfo, bool restore, bool force)
 render background texture for the mainmenu and the loading screen. More...
 
void renderprogress (float bar, const char *text, GLuint tex, bool background)
 render progress bar and map screenshot More...
 

Variables

static Texturelogo_texture = nullptr
 
static Texturebackground_texture = nullptr
 
static Texturemapshotframe_texture = nullptr
 
static Textureloadingbar_texture = nullptr
 
static Textureloadingframe_texture = nullptr
 
float loadprogress = 0
 
string backgroundcaption = ""
 
string backgroundmapname = ""
 
char * backgroundmapinfo = nullptr
 
Texturebackgroundmapshot = nullptr
 

Function Documentation

void bgquad ( float  x,
float  y,
float  w,
float  h 
)

Render a textured quad of the given dimensions.

Difference to screenquad is the ability to change the start position (with x and y -> lower left corner of the quad)

References gle::begin(), and gle::end().

Referenced by renderbackground(), and renderprogress().

static void getbackgroundres ( int &  w,
int &  h 
)
static

create a resolution suggestion by scaling down the larger side of the 2 screen dimensions.

Warning
this is a call by reference function!
this function uses old style C-casting

References inexor::rpc::max().

Referenced by renderbackground(), and renderprogress().

void renderbackground ( const char *  caption,
Texture mapshot,
const char *  mapname,
const char *  mapinfo,
bool  restore,
bool  force 
)
void renderprogress ( float  bar,
const char *  text,
GLuint  tex,
bool  background 
)
void restorebackground ( )

this function is called to render the main menu background once so the loading progress can be rendered over it continuously

See Also
renderbackground

References renderbackground(), and renderedframe.

Referenced by renderprogress().

SVARFP ( background  ,
"interface/background.png"  ,
background_texture  = NULL; 
)
SVARFP ( logo  ,
"interface/logo.png"  ,
logo_texture  = NULL; 
)

Variable Documentation

Texture* background_texture = nullptr
static
string backgroundcaption = ""
char* backgroundmapinfo = nullptr
string backgroundmapname = ""
Texture* backgroundmapshot = nullptr
Texture* loadingbar_texture = nullptr
static
Texture* loadingframe_texture = nullptr
static
float loadprogress = 0
Texture* logo_texture = nullptr
static
Texture* mapshotframe_texture = nullptr
static