filename | src/pvr2/render.c |
changeset | 322:354407942957 |
prev | 315:2d8ba198d62c |
next | 331:a6048d3a9a79 |
author | nkeynes |
date | Thu Jan 25 10:16:32 2007 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Move PVR2 dma handling (0x10000000-0x13FFFFFF) into pvr2mem.c, minor register cleanups in asic.c |
file | annotate | diff | log | raw |
1.1 --- a/src/pvr2/render.c Tue Jan 23 11:19:32 2007 +00001.2 +++ b/src/pvr2/render.c Thu Jan 25 10:16:32 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: render.c,v 1.18 2007-01-23 11:19:32 nkeynes Exp $1.6 + * $Id: render.c,v 1.19 2007-01-25 08:18:03 nkeynes Exp $1.7 *1.8 * PVR2 Renderer support. This part is primarily1.9 *1.10 @@ -148,7 +148,7 @@1.11 static void pvr2_render_prepare_context( sh4addr_t render_addr,1.12 uint32_t width, uint32_t height,1.13 uint32_t colour_format,1.14 - float bgplanez,1.15 + float bgplanez, float nearz,1.16 gboolean texture_target )1.17 {1.18 /* Select and initialize the render context */1.19 @@ -186,7 +186,7 @@1.20 glViewport( 0, 0, width, height );1.21 glMatrixMode(GL_PROJECTION);1.22 glLoadIdentity();1.23 - glOrtho( 0, width, height, 0, bgplanez, -4 );1.24 + glOrtho( 0, width, height, 0, bgplanez, -(nearz+1) );1.25 glMatrixMode(GL_MODELVIEW);1.26 glLoadIdentity();1.27 glCullFace( GL_BACK );1.28 @@ -230,8 +230,9 @@1.29 int width = 640; /* FIXME - get this from the tile buffer */1.30 int height = 480;1.31 int colour_format = pvr2_render_colour_format[render_mode&0x07];1.32 + float maxz = pvr2_render_find_maximum_z();1.33 pvr2_render_prepare_context( render_addr, width, height, colour_format,1.34 - bgplanez, render_to_tex );1.35 + bgplanez, maxz, render_to_tex );1.37 int clip_x = MMIO_READ( PVR2, RENDER_HCLIP ) & 0x03FF;1.38 int clip_y = MMIO_READ( PVR2, RENDER_VCLIP ) & 0x03FF;
.