mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix rendering skyboxes to a tile by altering renderSetTarget() & renderRestoreTarget() to set & reset xdim & ydim so that G_ShowView() can render while a render target is set,
and additionally modifying G_SetupCamTile() to call EVENT_DISPLAYROOMSCAMERATILE after calling renderSetTarget() git-svn-id: https://svn.eduke32.com/eduke32@7852 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fdaee03dfb
commit
5377b128a9
3 changed files with 9 additions and 11 deletions
|
@ -11948,7 +11948,7 @@ void renderSetTarget(int16_t tilenume, int32_t xsiz, int32_t ysiz)
|
|||
|
||||
//DRAWROOMS TO TILE BACKUP&SET CODE
|
||||
tilesiz[tilenume].x = xsiz; tilesiz[tilenume].y = ysiz;
|
||||
bakxsiz[setviewcnt] = xsiz; bakysiz[setviewcnt] = ysiz;
|
||||
bakxsiz[setviewcnt] = xdim; bakysiz[setviewcnt] = ydim;
|
||||
bakframeplace[setviewcnt] = frameplace; frameplace = waloff[tilenume];
|
||||
bakwindowxy1[setviewcnt] = windowxy1;
|
||||
bakwindowxy2[setviewcnt] = windowxy2;
|
||||
|
@ -11970,6 +11970,8 @@ void renderSetTarget(int16_t tilenume, int32_t xsiz, int32_t ysiz)
|
|||
setviewcnt++;
|
||||
|
||||
offscreenrendering = 1;
|
||||
xdim = ysiz;
|
||||
ydim = xsiz;
|
||||
videoSetViewableArea(0,0,ysiz-1,xsiz-1);
|
||||
renderSetAspect(65536,65536);
|
||||
|
||||
|
@ -11994,14 +11996,16 @@ void renderRestoreTarget(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
xdim = bakxsiz[setviewcnt];
|
||||
ydim = bakysiz[setviewcnt];
|
||||
videoSetViewableArea(bakwindowxy1[setviewcnt].x,bakwindowxy1[setviewcnt].y,
|
||||
bakwindowxy2[setviewcnt].x,bakwindowxy2[setviewcnt].y);
|
||||
copybufbyte(&bakumost[windowxy1.x],&startumost[windowxy1.x],(windowxy2.x-windowxy1.x+1)*sizeof(startumost[0]));
|
||||
copybufbyte(&bakdmost[windowxy1.x],&startdmost[windowxy1.x],(windowxy2.x-windowxy1.x+1)*sizeof(startdmost[0]));
|
||||
frameplace = bakframeplace[setviewcnt];
|
||||
|
||||
calc_ylookup(bytesperline,
|
||||
(setviewcnt == 0) ? bakxsiz[0] : max(bakxsiz[setviewcnt - 1], bakxsiz[setviewcnt]));
|
||||
calc_ylookup((setviewcnt == 0) ? bytesperline : bakxsiz[setviewcnt],
|
||||
bakysiz[setviewcnt]);
|
||||
|
||||
modechange=1;
|
||||
}
|
||||
|
|
|
@ -1175,13 +1175,6 @@ LUNATIC_EXTERN void G_ShowView(vec3_t vec, fix16_t a, fix16_t horiz, int sect, i
|
|||
if (g_screenCapture)
|
||||
return;
|
||||
|
||||
//POGOTODO: check if this has anything to do with cameras not rendering the skybox properly
|
||||
if (offscreenrendering)
|
||||
{
|
||||
videoClearViewableArea(0);
|
||||
return;
|
||||
}
|
||||
|
||||
int x1 = min(ix1, ix2);
|
||||
int x2 = max(ix1, ix2);
|
||||
int y1 = min(iy1, iy2);
|
||||
|
|
|
@ -377,7 +377,6 @@ int SetAnimation(int sectNum, int32_t *animPtr, int goalVal, int animVel)
|
|||
static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
|
||||
{
|
||||
int const playerNum = screenpeek;
|
||||
int const noDraw = VM_OnEventWithReturn(EVENT_DISPLAYROOMSCAMERATILE, spriteNum, playerNum, 0);
|
||||
|
||||
vec3_t const camera = G_GetCameraPosition(spriteNum, smoothRatio);
|
||||
int const saveMirror = display_mirror;
|
||||
|
@ -385,6 +384,8 @@ static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
|
|||
//if (waloff[wn] == 0) loadtile(wn);
|
||||
renderSetTarget(tileNum, tilesiz[tileNum].y, tilesiz[tileNum].x);
|
||||
|
||||
int const noDraw = VM_OnEventWithReturn(EVENT_DISPLAYROOMSCAMERATILE, spriteNum, playerNum, 0);
|
||||
|
||||
if (noDraw == 1)
|
||||
return;
|
||||
#ifdef DEBUGGINGAIDS
|
||||
|
|
Loading…
Reference in a new issue