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

swrast.h
Go to the documentation of this file.
00001 /*
00002  * Mesa 3-D graphics library
00003  * Version:  6.5
00004  *
00005  * Copyright (C) 1999-2006  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 
00032 #ifndef SWRAST_H
00033 #define SWRAST_H
00034 
00035 #include "main/mtypes.h"
00036 
00071 typedef struct {
00072    GLfloat attrib[FRAG_ATTRIB_MAX][4];
00073    GLchan color[4];   
00074    GLfloat pointSize;
00075 } SWvertex;
00076 
00077 
00078 #define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0
00079 
00080 
00081 struct swrast_device_driver;
00082 
00083 
00084 /* These are the public-access functions exported from swrast.
00085  */
00086 
00087 extern GLboolean
00088 _swrast_CreateContext( GLcontext *ctx );
00089 
00090 extern void
00091 _swrast_DestroyContext( GLcontext *ctx );
00092 
00093 /* Get a (non-const) reference to the device driver struct for swrast.
00094  */
00095 extern struct swrast_device_driver *
00096 _swrast_GetDeviceDriverReference( GLcontext *ctx );
00097 
00098 extern void
00099 _swrast_Bitmap( GLcontext *ctx,
00100         GLint px, GLint py,
00101         GLsizei width, GLsizei height,
00102         const struct gl_pixelstore_attrib *unpack,
00103         const GLubyte *bitmap );
00104 
00105 extern void
00106 _swrast_CopyPixels( GLcontext *ctx,
00107             GLint srcx, GLint srcy,
00108             GLint destx, GLint desty,
00109             GLsizei width, GLsizei height,
00110             GLenum type );
00111 
00112 extern void
00113 _swrast_DrawPixels( GLcontext *ctx,
00114             GLint x, GLint y,
00115             GLsizei width, GLsizei height,
00116             GLenum format, GLenum type,
00117             const struct gl_pixelstore_attrib *unpack,
00118             const GLvoid *pixels );
00119 
00120 extern void
00121 _swrast_ReadPixels( GLcontext *ctx,
00122             GLint x, GLint y, GLsizei width, GLsizei height,
00123             GLenum format, GLenum type,
00124             const struct gl_pixelstore_attrib *unpack,
00125             GLvoid *pixels );
00126 
00127 extern void
00128 _swrast_BlitFramebuffer(GLcontext *ctx,
00129                         GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
00130                         GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
00131                         GLbitfield mask, GLenum filter);
00132 
00133 extern void
00134 _swrast_Clear(GLcontext *ctx, GLbitfield buffers);
00135 
00136 extern void
00137 _swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value);
00138 
00139 
00140 
00141 /* Reset the stipple counter
00142  */
00143 extern void
00144 _swrast_ResetLineStipple( GLcontext *ctx );
00145 
00150 extern void
00151 _swrast_SetFacing(GLcontext *ctx, GLuint facing);
00152 
00153 /* These will always render the correct point/line/triangle for the
00154  * current state.
00155  *
00156  * For flatshaded primitives, the provoking vertex is the final one.
00157  */
00158 extern void
00159 _swrast_Point( GLcontext *ctx, const SWvertex *v );
00160 
00161 extern void
00162 _swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 );
00163 
00164 extern void
00165 _swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
00166                   const SWvertex *v1, const SWvertex *v2 );
00167 
00168 extern void
00169 _swrast_Quad( GLcontext *ctx,
00170               const SWvertex *v0, const SWvertex *v1,
00171           const SWvertex *v2,  const SWvertex *v3);
00172 
00173 extern void
00174 _swrast_flush( GLcontext *ctx );
00175 
00176 extern void
00177 _swrast_render_primitive( GLcontext *ctx, GLenum mode );
00178 
00179 extern void
00180 _swrast_render_start( GLcontext *ctx );
00181 
00182 extern void
00183 _swrast_render_finish( GLcontext *ctx );
00184 
00185 /* Tell the software rasterizer about core state changes.
00186  */
00187 extern void
00188 _swrast_InvalidateState( GLcontext *ctx, GLbitfield new_state );
00189 
00190 /* Configure software rasterizer to match hardware rasterizer characteristics:
00191  */
00192 extern void
00193 _swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value );
00194 
00195 extern void
00196 _swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value );
00197 
00198 /* Debug:
00199  */
00200 extern void
00201 _swrast_print_vertex( GLcontext *ctx, const SWvertex *v );
00202 
00203 
00204 /*
00205  * Imaging fallbacks (a better solution should be found, perhaps
00206  * moving all the imaging fallback code to a new module) 
00207  */
00208 extern void
00209 _swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, 
00210                 GLenum internalFormat, 
00211                 GLint x, GLint y, GLsizei width, 
00212                 GLsizei height);
00213 extern void
00214 _swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, 
00215                 GLenum internalFormat, 
00216                 GLint x, GLint y, GLsizei width);
00217 extern void
00218 _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
00219                GLint x, GLint y, GLsizei width);
00220 extern void
00221 _swrast_CopyColorTable( GLcontext *ctx, 
00222             GLenum target, GLenum internalformat,
00223             GLint x, GLint y, GLsizei width);
00224 
00225 
00226 /*
00227  * Texture fallbacks.  Could also live in a new module
00228  * with the rest of the texture store fallbacks?
00229  */
00230 extern void
00231 _swrast_copy_teximage1d(GLcontext *ctx, GLenum target, GLint level,
00232                         GLenum internalFormat,
00233                         GLint x, GLint y, GLsizei width, GLint border);
00234 
00235 extern void
00236 _swrast_copy_teximage2d(GLcontext *ctx, GLenum target, GLint level,
00237                         GLenum internalFormat,
00238                         GLint x, GLint y, GLsizei width, GLsizei height,
00239                         GLint border);
00240 
00241 
00242 extern void
00243 _swrast_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
00244                            GLint xoffset, GLint x, GLint y, GLsizei width);
00245 
00246 extern void
00247 _swrast_copy_texsubimage2d(GLcontext *ctx,
00248                            GLenum target, GLint level,
00249                            GLint xoffset, GLint yoffset,
00250                            GLint x, GLint y, GLsizei width, GLsizei height);
00251 
00252 extern void
00253 _swrast_copy_texsubimage3d(GLcontext *ctx,
00254                            GLenum target, GLint level,
00255                            GLint xoffset, GLint yoffset, GLint zoffset,
00256                            GLint x, GLint y, GLsizei width, GLsizei height);
00257 
00258 
00259 extern void
00260 _swrast_eject_texture_images(GLcontext *ctx);
00261 
00262 
00263 #if FEATURE_MESA_program_debug
00264 extern void
00265 _swrast_get_program_register(GLcontext *, enum register_file file,
00266                              GLuint index, GLfloat val[4]);
00267 #endif /* FEATURE_MESA_program_debug */
00268 
00269 
00275 struct swrast_device_driver {
00276    /*
00277     * These are called before and after accessing renderbuffers during
00278     * software rasterization.
00279     *
00280     * These are a suitable place for grabbing/releasing hardware locks.
00281     *
00282     * NOTE: The swrast triangle/line/point routines *DO NOT* call
00283     * these functions.  Locking in that case must be organized by the
00284     * driver by other mechanisms.
00285     */
00286    void (*SpanRenderStart)(GLcontext *ctx);
00287    void (*SpanRenderFinish)(GLcontext *ctx);
00288 };
00289 
00290 
00291 
00292 #endif

Generated on Thu May 24 2012 04:20:58 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.