header for octarender
parent
089c896411
commit
9ce4837683
|
@ -63,22 +63,4 @@ extern bool useavatarmask();
|
||||||
extern void enableavatarmask();
|
extern void enableavatarmask();
|
||||||
extern void disableavatarmask();
|
extern void disableavatarmask();
|
||||||
|
|
||||||
// octarender
|
|
||||||
extern ivec worldmin, worldmax, nogimin, nogimax;
|
|
||||||
extern vector<tjoint> tjoints;
|
|
||||||
extern vector<vtxarray *> varoot, valist;
|
|
||||||
|
|
||||||
extern ushort encodenormal(const vec &n);
|
|
||||||
extern vec decodenormal(ushort norm);
|
|
||||||
extern void guessnormals(const vec *pos, int numverts, vec *normals);
|
|
||||||
extern void reduceslope(ivec &n);
|
|
||||||
extern void findtjoints();
|
|
||||||
extern void octarender();
|
|
||||||
extern void allchanged(bool load = false);
|
|
||||||
extern void clearvas(cube *c);
|
|
||||||
extern void destroyva(vtxarray *va, bool reparent = true);
|
|
||||||
extern void updatevabb(vtxarray *va, bool force = false);
|
|
||||||
extern void updatevabbs(bool force = false);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "main.hh" // renderbackground
|
#include "main.hh" // renderbackground
|
||||||
#include "octa.hh"
|
#include "octa.hh"
|
||||||
#include "octaedit.hh" // commitchanges
|
#include "octaedit.hh" // commitchanges
|
||||||
|
#include "octarender.hh"
|
||||||
#include "physics.hh"
|
#include "physics.hh"
|
||||||
#include "renderlights.hh"
|
#include "renderlights.hh"
|
||||||
#include "texture.hh"
|
#include "texture.hh"
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "console.hh"
|
#include "console.hh"
|
||||||
#include "movie.hh"
|
#include "movie.hh"
|
||||||
#include "octaedit.hh"
|
#include "octaedit.hh"
|
||||||
|
#include "octarender.hh" // allchanged
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "rendermodel.hh" // cleanupmodels
|
#include "rendermodel.hh" // cleanupmodels
|
||||||
#include "renderparticles.hh"
|
#include "renderparticles.hh"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
#include "octaedit.hh" // editmode
|
#include "octaedit.hh" // editmode
|
||||||
|
#include "octarender.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "renderlights.hh"
|
#include "renderlights.hh"
|
||||||
#include "renderva.hh"
|
#include "renderva.hh"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "main.hh" // renderprogress
|
#include "main.hh" // renderprogress
|
||||||
|
#include "octarender.hh"
|
||||||
#include "texture.hh"
|
#include "texture.hh"
|
||||||
|
|
||||||
#include "engine.hh"
|
#include "engine.hh"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "console.hh" /* conoutf */
|
#include "console.hh" /* conoutf */
|
||||||
#include "main.hh" // renderprogress
|
#include "main.hh" // renderprogress
|
||||||
#include "octaedit.hh"
|
#include "octaedit.hh"
|
||||||
|
#include "octarender.hh"
|
||||||
#include "world.hh"
|
#include "world.hh"
|
||||||
|
|
||||||
#include "engine.hh"
|
#include "engine.hh"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "main.hh" // mainmenu, keyrepeat, renderedframe
|
#include "main.hh" // mainmenu, keyrepeat, renderedframe
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
#include "octa.hh"
|
#include "octa.hh"
|
||||||
|
#include "octarender.hh"
|
||||||
#include "pvs.hh"
|
#include "pvs.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "renderlights.hh"
|
#include "renderlights.hh"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// octarender.cpp: fill vertex arrays with different cube surfaces.
|
// octarender.cpp: fill vertex arrays with different cube surfaces.
|
||||||
|
|
||||||
|
#include "octarender.hh"
|
||||||
|
|
||||||
#include "blend.hh"
|
#include "blend.hh"
|
||||||
#include "console.hh" /* conoutf */
|
#include "console.hh" /* conoutf */
|
||||||
#include "grass.hh"
|
#include "grass.hh"
|
||||||
|
@ -836,7 +838,7 @@ ushort encodenormal(const vec &n)
|
||||||
return ushort(clamp(pitch + 90, 0, 180)*360 + (yaw < 0 ? yaw%360 + 360 : yaw%360) + 1);
|
return ushort(clamp(pitch + 90, 0, 180)*360 + (yaw < 0 ? yaw%360 + 360 : yaw%360) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec decodenormal(ushort norm)
|
static vec decodenormal(ushort norm)
|
||||||
{
|
{
|
||||||
if(!norm) return vec(0, 0, 1);
|
if(!norm) return vec(0, 0, 1);
|
||||||
norm--;
|
norm--;
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef ENGINE_OCTARENDER_HH
|
||||||
|
#define ENGINE_OCTARENDER_HH
|
||||||
|
|
||||||
|
#include <shared/tools.hh>
|
||||||
|
#include <shared/geom.hh>
|
||||||
|
|
||||||
|
#include "octa.hh"
|
||||||
|
|
||||||
|
extern ivec worldmin, worldmax, nogimin, nogimax;
|
||||||
|
extern vector<tjoint> tjoints;
|
||||||
|
extern vector<vtxarray *> varoot, valist;
|
||||||
|
|
||||||
|
ushort encodenormal(const vec &n);
|
||||||
|
void guessnormals(const vec *pos, int numverts, vec *normals);
|
||||||
|
void reduceslope(ivec &n);
|
||||||
|
void findtjoints();
|
||||||
|
void octarender();
|
||||||
|
void allchanged(bool load = false);
|
||||||
|
void clearvas(cube *c);
|
||||||
|
void destroyva(vtxarray *va, bool reparent = true);
|
||||||
|
void updatevabb(vtxarray *va, bool force = false);
|
||||||
|
void updatevabbs(bool force = false);
|
||||||
|
|
||||||
|
#endif
|
|
@ -3,6 +3,7 @@
|
||||||
#include "console.hh" /* conoutf */
|
#include "console.hh" /* conoutf */
|
||||||
#include "main.hh" // numcpus, interceptkey, renderbackground
|
#include "main.hh" // numcpus, interceptkey, renderbackground
|
||||||
#include "octa.hh"
|
#include "octa.hh"
|
||||||
|
#include "octarender.hh" // valist
|
||||||
|
|
||||||
#include "engine.hh"
|
#include "engine.hh"
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
#include "pvs.hh"
|
#include "pvs.hh"
|
||||||
#include "octaedit.hh"
|
#include "octaedit.hh"
|
||||||
|
#include "octarender.hh" // valist
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "renderlights.hh"
|
#include "renderlights.hh"
|
||||||
#include "rendermodel.hh"
|
#include "rendermodel.hh"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "main.hh" // initwarning
|
#include "main.hh" // initwarning
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
#include "octaedit.hh" // editmode
|
#include "octaedit.hh" // editmode
|
||||||
|
#include "octarender.hh"
|
||||||
#include "pvs.hh"
|
#include "pvs.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "rendermodel.hh"
|
#include "rendermodel.hh"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "grass.hh"
|
#include "grass.hh"
|
||||||
#include "main.hh" // renderprogress
|
#include "main.hh" // renderprogress
|
||||||
#include "octaedit.hh" // editmode
|
#include "octaedit.hh" // editmode
|
||||||
|
#include "octarender.hh"
|
||||||
#include "pvs.hh"
|
#include "pvs.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "renderlights.hh"
|
#include "renderlights.hh"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "command.hh" // identflags
|
#include "command.hh" // identflags
|
||||||
#include "console.hh" /* conoutf */
|
#include "console.hh" /* conoutf */
|
||||||
#include "main.hh" // loadprogress, renderprogress
|
#include "main.hh" // loadprogress, renderprogress
|
||||||
|
#include "octarender.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "rendermodel.hh" // cleanupmodels
|
#include "rendermodel.hh" // cleanupmodels
|
||||||
#include "texture.hh"
|
#include "texture.hh"
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "main.hh" // initwarning, loadprogress, renderprogress, screenw/h, renderedframe
|
#include "main.hh" // initwarning, loadprogress, renderprogress, screenw/h, renderedframe
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
#include "octaedit.hh"
|
#include "octaedit.hh"
|
||||||
|
#include "octarender.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "rendersky.hh"
|
#include "rendersky.hh"
|
||||||
#include "shader.hh"
|
#include "shader.hh"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
|
#include "octarender.hh"
|
||||||
#include "rendergl.hh"
|
#include "rendergl.hh"
|
||||||
#include "texture.hh"
|
#include "texture.hh"
|
||||||
#include "water.hh"
|
#include "water.hh"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "main.hh" // clearmainmenu
|
#include "main.hh" // clearmainmenu
|
||||||
#include "octa.hh"
|
#include "octa.hh"
|
||||||
#include "octaedit.hh"
|
#include "octaedit.hh"
|
||||||
|
#include "octarender.hh"
|
||||||
#include "physics.hh"
|
#include "physics.hh"
|
||||||
#include "pvs.hh"
|
#include "pvs.hh"
|
||||||
#include "rendergl.hh" /* fovy */
|
#include "rendergl.hh" /* fovy */
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "main.hh" // clearmainmenu, renderbackground
|
#include "main.hh" // clearmainmenu, renderbackground
|
||||||
#include "octa.hh"
|
#include "octa.hh"
|
||||||
#include "octaedit.hh" // texmru
|
#include "octaedit.hh" // texmru
|
||||||
|
#include "octarender.hh"
|
||||||
#include "pvs.hh"
|
#include "pvs.hh"
|
||||||
#include "rendermodel.hh" // loadmapmodel, getmminfo, flushpreloadedmodels
|
#include "rendermodel.hh" // loadmapmodel, getmminfo, flushpreloadedmodels
|
||||||
#include "texture.hh"
|
#include "texture.hh"
|
||||||
|
|
Loading…
Reference in New Issue