Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentexstore.c
Go to the documentation of this file.
00001 /* 00002 * Mesa 3-D graphics library 00003 * Version: 6.3 00004 * 00005 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining a 00008 * copy of this software and associated documentation files (the "Software"), 00009 * to deal in the Software without restriction, including without limitation 00010 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00011 * and/or sell copies of the Software, and to permit persons to whom the 00012 * Software is furnished to do so, subject to the following conditions: 00013 * 00014 * The above copyright notice and this permission notice shall be included 00015 * in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00018 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00019 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00020 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00021 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00022 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00023 */ 00024 00025 00026 #include <assert.h> 00027 00028 #include "types.h" 00029 #include "internal.h" 00030 00031 00032 void 00033 _mesa_upscale_teximage2d (unsigned int inWidth, unsigned int inHeight, 00034 unsigned int outWidth, unsigned int outHeight, 00035 unsigned int comps, 00036 const byte *src, int srcRowStride, 00037 byte *dest) 00038 { 00039 unsigned int i, j, k; 00040 00041 assert(outWidth >= inWidth); 00042 assert(outHeight >= inHeight); 00043 00044 for (i = 0; i < outHeight; i++) { 00045 const int ii = i % inHeight; 00046 for (j = 0; j < outWidth; j++) { 00047 const int jj = j % inWidth; 00048 for (k = 0; k < comps; k++) { 00049 dest[(i * outWidth + j) * comps + k] 00050 = src[ii * srcRowStride + jj * comps + k]; 00051 } 00052 } 00053 } 00054 } Generated on Fri May 25 2012 04:17:28 for ReactOS by
1.7.6.1
|