All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
cubemap.cpp File Reference

environment map loading routine. More...

#include <boost/algorithm/clamp.hpp>
#include <string.h>
#include <algorithm>
#include <memory>
#include "SDL_timer.h"
#include "inexor/client/network.hpp"
#include "inexor/engine/frame.hpp"
#include "inexor/engine/glemu.hpp"
#include "inexor/engine/material.hpp"
#include "inexor/engine/octree.hpp"
#include "inexor/engine/renderbackground.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/fpsgame/entities.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/io/filesystem/mediadirs.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_formatting.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_vector.hpp"
#include "inexor/shared/ents.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/cubemap.hpp"
#include "inexor/texture/format.hpp"
#include "inexor/texture/image.hpp"
#include "inexor/texture/slot.hpp"
#include "inexor/texture/texsettings.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"


struct  envmap


void forcecubemapload (GLuint tex)
 VARFP (envmapsize, 4, 7, 10, setupmaterials())
Texturecubemaploadwildcard (Texture *t, const char *name, bool mipit, bool msg, bool transient)
Texturecubemapload (const char *name, bool mipit, bool msg, bool transient)
 VAR (envmapradius, 0, 128, 10000)
void clearenvmaps ()
 VAR (aaenvmap, 0, 2, 4)
GLuint genenvmap (const vec &o, int envmapsize, int blur)
void initenvmaps ()
void genenvmaps ()
ushort closestenvmap (const vec &o)
ushort closestenvmap (int orient, const ivec &co, int size)
GLuint lookupenvmap (Slot &slot)
GLuint lookupenvmap (ushort emid)


cubemapside cubemapsides [6]
static vector< envmapenvmaps
static Textureskyenvmap = nullptr

Detailed Description

environment map loading routine.

Class Documentation

struct envmap
Class Members
int blur
vec o
int radius
int size
GLuint tex

Function Documentation

void clearenvmaps ( )
ushort closestenvmap ( const vec o)
ushort closestenvmap ( int  orient,
const ivec co,
int  size 

References C, closestenvmap(), dimcoord, dimension, and R.

Texture* cubemapload ( const char *  name,
bool  mipit,
bool  msg,
bool  transient 
Texture* cubemaploadwildcard ( Texture t,
const char *  name,
bool  mipit,
bool  msg,
bool  transient 
void forcecubemapload ( GLuint  tex)
GLuint genenvmap ( const vec o,
int  envmapsize,
int  blur 
void genenvmaps ( )
void initenvmaps ( )
GLuint lookupenvmap ( Slot slot)
GLuint lookupenvmap ( ushort  emid)
VAR ( envmapradius  ,
128  ,
VAR ( aaenvmap  ,
VARFP ( envmapsize  ,
10  ,

Variable Documentation

cubemapside cubemapsides[6]
Initial value:
{ GL_TEXTURE_CUBE_MAP_NEGATIVE_X, "lf", true, true, true },
{ GL_TEXTURE_CUBE_MAP_POSITIVE_X, "rt", false, false, true },
{ GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, "ft", true, false, false },
{ GL_TEXTURE_CUBE_MAP_POSITIVE_Y, "bk", false, true, false },
{ GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, "dn", false, false, true },
{ GL_TEXTURE_CUBE_MAP_POSITIVE_Z, "up", false, false, true },

Referenced by cubemaploadwildcard(), genenvmap(), and loadsky().

vector<envmap> envmaps
Texture* skyenvmap = nullptr