ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

m_dotprod_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 /* Note - respects the stride of the output vector.
00032  */
00033 static void TAG(dotprod_vec2)( GLfloat *out,
00034                    GLuint outstride,
00035                    const GLvector4f *coord_vec,
00036                    const GLfloat plane[4] )
00037 {
00038    GLuint stride = coord_vec->stride;
00039    GLfloat *coord = coord_vec->start;
00040    GLuint count = coord_vec->count;
00041 
00042    GLuint i;
00043 
00044    const GLfloat plane0 = plane[0], plane1 = plane[1], plane3 = plane[3];
00045 
00046    for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
00047       *out = (coord[0] * plane0 +
00048           coord[1] * plane1 +
00049           plane3);
00050    }
00051 }
00052 
00053 static void TAG(dotprod_vec3)( GLfloat *out,
00054                    GLuint outstride,
00055                    const GLvector4f *coord_vec,
00056                    const GLfloat plane[4] )
00057 {
00058    GLuint stride = coord_vec->stride;
00059    GLfloat *coord = coord_vec->start;
00060    GLuint count = coord_vec->count;
00061 
00062    GLuint i;
00063 
00064    const GLfloat plane0 = plane[0], plane1 = plane[1], plane2 = plane[2];
00065    const GLfloat plane3 = plane[3];
00066 
00067    for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
00068       *out = (coord[0] * plane0 +
00069           coord[1] * plane1 +
00070           coord[2] * plane2 +
00071           plane3);
00072    }
00073 }
00074 
00075 static void TAG(dotprod_vec4)( GLfloat *out,
00076                    GLuint outstride,
00077                    const GLvector4f *coord_vec,
00078                    const GLfloat plane[4] )
00079 {
00080    GLuint stride = coord_vec->stride;
00081    GLfloat *coord = coord_vec->start;
00082    GLuint count = coord_vec->count;
00083    GLuint i;
00084 
00085    const GLfloat plane0 = plane[0], plane1 = plane[1], plane2 = plane[2];
00086    const GLfloat plane3 = plane[3];
00087 
00088    for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
00089       *out = (coord[0] * plane0 +
00090           coord[1] * plane1 +
00091           coord[2] * plane2 +
00092           coord[3] * plane3);
00093    }
00094 }
00095 
00096 
00097 static void TAG(init_dotprod)( void )
00098 {
00099    _mesa_dotprod_tab[2] = TAG(dotprod_vec2);
00100    _mesa_dotprod_tab[3] = TAG(dotprod_vec3);
00101    _mesa_dotprod_tab[4] = TAG(dotprod_vec4);
00102 }

Generated on Sun May 27 2012 04:20:32 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.