Example #1
0
static int glX_resize_viewport(GLContext *c,int *xsize_ptr,int *ysize_ptr)
{
  TinyNGLXContext *ctx;
  int xsize,ysize;
  
  ctx=(TinyNGLXContext *)c->opaque;

  xsize=*xsize_ptr;
  ysize=*ysize_ptr;

  /* we ensure that xsize and ysize are multiples of 2 for the zbuffer. 
     TODO: find a better solution */
  xsize&=~3;
  ysize&=~3;

  if (xsize == 0 || ysize == 0) return -1;

  *xsize_ptr=xsize;
  *ysize_ptr=ysize;

  ctx->xsize=xsize;
  ctx->ysize=ysize;

  /* resize the Z buffer */
  ZB_resize(c->zb,NULL,xsize,ysize);
  return 0;
}
Example #2
0
/*!  Resize context  */
static int pl110_resize_viewport( GLContext *c, int *xsize_ptr, int *ysize_ptr ){
	pl110_Context *ctx;
	int               xsize;
	int               ysize;
  
	ctx = (pl110_Context *)c->opaque;

	xsize = *xsize_ptr;
	ysize = *ysize_ptr;

	/* we ensure that xsize and ysize are multiples of 2 for the zbuffer. 
	   TODO: find a better solution */
	xsize &= ~3;
	ysize &= ~3;

	if (xsize == 0 || ysize == 0) return -1;

	*xsize_ptr = xsize;
	*ysize_ptr = ysize;

	/* resize the Z buffer */
        void *fb = (uint16*) 0x40000000;
	ZB_resize( c->zb, fb, xsize, ysize );
	return 0;
}
Example #3
0
void
ostgl_resize(ostgl_context *context,
             const int xsize,
             const int ysize,
             void **framebuffers)
{
  int i;
  for (i = 0; i < context->numbuffers; i++) {
    ZB_resize(context->zbs[i], framebuffers[i], xsize, ysize);
  }
}