Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cubemap.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "SDL_opengl.h" // for GLuint, GLenum
7 #include "inexor/shared/cube_types.hpp" // for ushort
8 
9 class Slot;
10 struct Texture;
11 struct ivec;
12 struct vec;
13 
15 {
17  const char *name;
18  bool flipx, flipy, swapxy;
19 };
20 
21 extern cubemapside cubemapsides[6];
22 
23 extern Texture *cubemapload(const char *name, bool mipit = true, bool msg = true, bool transient = false);
24 extern Texture *cubemaploadwildcard(Texture *t, const char *name, bool mipit, bool msg, bool transient = false);
25 
26 extern void initenvmaps();
27 extern void genenvmaps();
28 extern void clearenvmaps();
29 
30 extern ushort closestenvmap(const vec &o);
31 extern ushort closestenvmap(int orient, const ivec &co, int size);
32 extern GLuint lookupenvmap(ushort emid);
33 extern GLuint lookupenvmap(Slot &slot);
34 
35 // rendergl.cpp:
36 extern void drawcubemap(int size, const vec &o, float yaw, float pitch, const cubemapside &side);
37 
38 
bool flipy
Definition: cubemap.hpp:18
typedef GLenum(APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target)
bool swapxy
Definition: cubemap.hpp:18
const char * name
Definition: cubemap.hpp:17
void genenvmaps()
Definition: cubemap.cpp:300
Definition: cubemap.hpp:14
typedef GLuint(APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program
unsigned short ushort
Definition: cube_types.hpp:8
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
void clearenvmaps()
Definition: cubemap.cpp:212
GLenum target
Definition: cubemap.hpp:16
int orient
Definition: octaedit.cpp:164
void t(T x, const char *cmp)
Definition: utilTest.cpp:52
GLuint GLuint GLintptr GLsizeiptr size
Definition: glexts.hpp:412
ushort closestenvmap(const vec &o)
Definition: cubemap.cpp:319
Definition: slot.hpp:81
Texture * cubemaploadwildcard(Texture *t, const char *name, bool mipit, bool msg, bool transient=false)
Definition: cubemap.cpp:77
cubemapside cubemapsides[6]
Definition: cubemap.cpp:65
GLuint lookupenvmap(ushort emid)
Definition: cubemap.cpp:352
3-dimensional INTEGER vectors
Definition: geom.hpp:1226
bool flipx
Definition: cubemap.hpp:18
void initenvmaps()
Definition: cubemap.cpp:280
void drawcubemap(int size, const vec &o, float yaw, float pitch, const cubemapside &side)
Definition: rendergl.cpp:1589
Texture * cubemapload(const char *name, bool mipit=true, bool msg=true, bool transient=false)
Definition: cubemap.cpp:179
A Texture entry, holding info about a texture on the GPU.
Definition: texture.hpp:27