Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenm_copy_tmp.h
Go to the documentation of this file.
00001 00002 /* 00003 * Mesa 3-D graphics library 00004 * Version: 3.5 00005 * 00006 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 00007 * 00008 * Permission is hereby granted, free of charge, to any person obtaining a 00009 * copy of this software and associated documentation files (the "Software"), 00010 * to deal in the Software without restriction, including without limitation 00011 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00012 * and/or sell copies of the Software, and to permit persons to whom the 00013 * Software is furnished to do so, subject to the following conditions: 00014 * 00015 * The above copyright notice and this permission notice shall be included 00016 * in all copies or substantial portions of the Software. 00017 * 00018 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00019 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00020 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00021 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00022 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00023 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00024 */ 00025 00026 /* 00027 * New (3.1) transformation code written by Keith Whitwell. 00028 */ 00029 00030 00031 #define COPY_FUNC( BITS ) \ 00032 static void TAG2(copy, BITS)( GLvector4f *to, const GLvector4f *f ) \ 00033 { \ 00034 GLfloat (*t)[4] = (GLfloat (*)[4])to->start; \ 00035 GLfloat *from = f->start; \ 00036 GLuint stride = f->stride; \ 00037 GLuint count = to->count; \ 00038 GLuint i; \ 00039 \ 00040 if (BITS) \ 00041 STRIDE_LOOP { \ 00042 if (BITS&1) t[i][0] = from[0]; \ 00043 if (BITS&2) t[i][1] = from[1]; \ 00044 if (BITS&4) t[i][2] = from[2]; \ 00045 if (BITS&8) t[i][3] = from[3]; \ 00046 } \ 00047 } 00048 00049 /* We got them all here: 00050 */ 00051 COPY_FUNC( 0x0 ) /* noop */ 00052 COPY_FUNC( 0x1 ) 00053 COPY_FUNC( 0x2 ) 00054 COPY_FUNC( 0x3 ) 00055 COPY_FUNC( 0x4 ) 00056 COPY_FUNC( 0x5 ) 00057 COPY_FUNC( 0x6 ) 00058 COPY_FUNC( 0x7 ) 00059 COPY_FUNC( 0x8 ) 00060 COPY_FUNC( 0x9 ) 00061 COPY_FUNC( 0xa ) 00062 COPY_FUNC( 0xb ) 00063 COPY_FUNC( 0xc ) 00064 COPY_FUNC( 0xd ) 00065 COPY_FUNC( 0xe ) 00066 COPY_FUNC( 0xf ) 00067 00068 static void TAG2(init_copy, 0)( void ) 00069 { 00070 _mesa_copy_tab[0x0] = TAG2(copy, 0x0); 00071 _mesa_copy_tab[0x1] = TAG2(copy, 0x1); 00072 _mesa_copy_tab[0x2] = TAG2(copy, 0x2); 00073 _mesa_copy_tab[0x3] = TAG2(copy, 0x3); 00074 _mesa_copy_tab[0x4] = TAG2(copy, 0x4); 00075 _mesa_copy_tab[0x5] = TAG2(copy, 0x5); 00076 _mesa_copy_tab[0x6] = TAG2(copy, 0x6); 00077 _mesa_copy_tab[0x7] = TAG2(copy, 0x7); 00078 _mesa_copy_tab[0x8] = TAG2(copy, 0x8); 00079 _mesa_copy_tab[0x9] = TAG2(copy, 0x9); 00080 _mesa_copy_tab[0xa] = TAG2(copy, 0xa); 00081 _mesa_copy_tab[0xb] = TAG2(copy, 0xb); 00082 _mesa_copy_tab[0xc] = TAG2(copy, 0xc); 00083 _mesa_copy_tab[0xd] = TAG2(copy, 0xd); 00084 _mesa_copy_tab[0xe] = TAG2(copy, 0xe); 00085 _mesa_copy_tab[0xf] = TAG2(copy, 0xf); 00086 } Generated on Sat May 26 2012 04:19:17 for ReactOS by
1.7.6.1
|