Draw sky in a very expensive way
This commit is contained in:
parent
9820a6cb88
commit
6c52e1e52b
2 changed files with 172 additions and 6 deletions
21
src/r_poly.h
21
src/r_poly.h
|
|
@ -181,3 +181,24 @@ public:
|
|||
static TriVertex *GetVertices(int count);
|
||||
static void Clear();
|
||||
};
|
||||
|
||||
class PolySkyDome
|
||||
{
|
||||
public:
|
||||
PolySkyDome() { CreateDome(); }
|
||||
void Render(const TriMatrix &worldToClip);
|
||||
|
||||
private:
|
||||
TArray<TriVertex> mVertices;
|
||||
TArray<unsigned int> mPrimStart;
|
||||
int mRows, mColumns;
|
||||
|
||||
void SkyVertex(int r, int c, bool yflip);
|
||||
void CreateSkyHemisphere(bool zflip);
|
||||
void CreateDome();
|
||||
void RenderRow(const TriUniforms &uniforms, FTexture *skytex, int row);
|
||||
void RenderCapColorRow(const TriUniforms &uniforms, FTexture *skytex, int row, bool bottomCap);
|
||||
|
||||
TriVertex SetVertex(float xx, float yy, float zz, float uu = 0, float vv = 0);
|
||||
TriVertex SetVertexXYZ(float xx, float yy, float zz, float uu = 0, float vv = 0);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue