-extern int quadelements[QUADELEMENTS_MAXQUADS*6];
-
-void GL_SetupView_Orientation_Identity(void);
-void GL_SetupView_Orientation_FromEntity(const matrix4x4_t *matrix);
-void GL_SetupView_Mode_Perspective(double frustumx, double frustumy, double zNear, double zFar);
-void GL_SetupView_Mode_PerspectiveInfiniteFarClip(double frustumx, double frustumy, double zNear);
-void GL_SetupView_Mode_Ortho(double x1, double y1, double x2, double y2, double zNear, double zFar);
-void GL_SetupView_ApplyCustomNearClipPlane(double normalx, double normaly, double normalz, double dist);
+extern int quadelement3i[QUADELEMENTS_MAXQUADS*6];
+extern unsigned short quadelement3s[QUADELEMENTS_MAXQUADS*6];
+
+void R_Viewport_TransformToScreen(const r_viewport_t *v, const vec4_t in, vec4_t out);
+qboolean R_ScissorForBBox(const float *mins, const float *maxs, int *scissor);
+void R_Viewport_InitOrtho(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float x1, float y1, float x2, float y2, float zNear, float zFar, const float *nearplane);
+void R_Viewport_InitPerspective(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float zNear, float zFar, const float *nearplane);
+void R_Viewport_InitPerspectiveInfinite(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float frustumx, float frustumy, float zNear, const float *nearplane);
+void R_Viewport_InitCubeSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, float nearclip, float farclip, const float *nearplane);
+void R_Viewport_InitRectSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, int border, float nearclip, float farclip, const float *nearplane);
+void R_SetViewport(const r_viewport_t *v);
+void R_GetViewport(r_viewport_t *v);
+