- moved the aspect ratio correction factor from the projection to the view matrix where it should have been from the start.
- removed the mCameraPos variable in FGLRenderer because it was only used in one place where it is just as easy to use the global viewx/y/z variables directly.
This commit is contained in:
parent
045725de15
commit
45cf65afbd
3 changed files with 13 additions and 16 deletions
|
|
@ -90,7 +90,6 @@ FGLRenderer::FGLRenderer(OpenGLFrameBuffer *fb)
|
|||
mLightCount = 0;
|
||||
mAngles = FRotator(0,0,0);
|
||||
mViewVector = FVector2(0,0);
|
||||
mCameraPos = FVector3(0,0,0);
|
||||
mVBO = NULL;
|
||||
mSkyVBO = NULL;
|
||||
gl_spriteindex = 0;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ public:
|
|||
|
||||
FRotator mAngles;
|
||||
FVector2 mViewVector;
|
||||
FVector3 mCameraPos;
|
||||
|
||||
FFlatVertexBuffer *mVBO;
|
||||
FSkyVertexBuffer *mSkyVBO;
|
||||
|
|
@ -83,7 +82,7 @@ public:
|
|||
void SetViewport(GL_IRECT *bounds);
|
||||
sector_t *RenderViewpoint (AActor * camera, GL_IRECT * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen);
|
||||
void RenderView(player_t *player);
|
||||
void SetCameraPos(fixed_t viewx, fixed_t viewy, fixed_t viewz, angle_t viewangle);
|
||||
void SetViewAngle(angle_t viewangle);
|
||||
void SetupView(fixed_t viewx, fixed_t viewy, fixed_t viewz, angle_t viewangle, bool mirror, bool planemirror);
|
||||
|
||||
void Initialize();
|
||||
|
|
@ -121,7 +120,7 @@ public:
|
|||
void Flush() {}
|
||||
|
||||
void SetProjection(float fov, float ratio, float fovratio);
|
||||
void SetViewMatrix(bool mirror, bool planemirror);
|
||||
void SetViewMatrix(fixed_t viewx, fixed_t viewy, fixed_t viewz, bool mirror, bool planemirror);
|
||||
void ProcessScene(bool toscreen = false);
|
||||
|
||||
bool StartOffscreen();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue