/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "server_dispatch.h"
#include "server.h"
#include "cr_error.h"
#include "state/cr_statetypes.h"
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
};
/*
* Clip the rectangle q against the given image window.
*/
static void
{
}
/*
* Translate the rectangle q from the image window space to the outputwindow
* space.
*/
static void
const CRrecti *outputwindow,
CRrecti *q )
{
}
/*
* Compute clipped image window, scissor, viewport and base projection
* info for each tile in the mural.
* Need to call this when either the viewport or mural is changed.
*/
void
{
#if 0
int i;
for (i = 0; i < mural->numExtents; i++) {
CRrecti q;
/* If the scissor is disabled set it to the whole output.
** We might as well use the actual scissorTest rather than
** scissorValid - it never gets reset anyway.
*/
if (!v->scissorTest)
{
}
else
{
&(extent->outputwindow), &q);
extent->scissorBox = q;
}
/* if the viewport is not valid,
** set it to the entire output.
*/
if (!v->viewportValid)
{
}
else
{
/* This is where the viewport gets clamped to the max size. */
extent->clippedImagewindow = q;
&(extent->outputwindow), &q);
}
/*
** Now, compute the base projection.
*/
/* zero-area extent, use identity matrix (doesn't really matter) */
}
else
{
CRrectf p;
/*
* We need to take account of the current viewport parameters,
* and they are passed to this function as x, y, w, h.
* In the default case (from main.c) we pass the the
* full muralsize of 0, 0, width, height
*/
/* XXX not sure this clamping is really need anymore
*/
if (p.x1 < 0.0) {
p.x1 = 0.0;
}
if (p.y1 < 0.0) {
p.y1 = 0.0;
}
/* Rescale [0,1] -> [-1,1] */
}
}
#endif
}
/*
* Issue the glScissor, glViewport and projection matrix needed for
* rendering the tile specified by extNum. We computed the scissor,
* viewport and projection parameters above in crServerComputeViewportBounds.
*/
void
{
#if 0
/*
* Serial Number info:
* Everytime we compute new scissor, viewport, projection matrix info for
* a tile, we give that tile a new serial number.
* When we're about to render into a tile, we only update the scissor,
* viewport and projection matrix if the tile's serial number doesn't match
* the current serial number. This avoids a _LOT_ of redundant calls to
* those three functions.
*/
}
#endif
}
/*
* Pre-multiply the current projection matrix with the current client's
* base projection. I.e. P' = b * P. Note that OpenGL's glMultMatrix
* POST-multiplies.
*/
void
{
if (cr_server.projectionOverride) {
}
else
}
void
{
const CRmatrix *modelview = cr_server.curClient->currentCtxInfo->pContext->transform.modelViewStack.top;
}
/*
* Called via unpacker module.
* Note: when there's a tilesort SPU upstream, the viewport dimensions
* will typically match the mural size. That is, the viewport dimensions
* probably won't be the same values that the application issues.
*/
void SERVER_DISPATCH_APIENTRY crServerDispatchViewport( GLint x, GLint y, GLsizei width, GLsizei height )
{
/* Note -- If there are tiles, this will be overridden in the
* process of decoding the BoundsInfo packet, so no worries. */
}
/* always dispatch to be safe */
}