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

vbo_exec.c
Go to the documentation of this file.
00001 /*
00002  * Mesa 3-D graphics library
00003  * Version:  6.3
00004  *
00005  * Copyright (C) 1999-2005  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  * Authors:
00025  *    Keith Whitwell <keith@tungstengraphics.com>
00026  */
00027 
00028 
00029 #include "main/api_arrayelt.h"
00030 #include "main/glheader.h"
00031 #include "main/imports.h"
00032 #include "main/context.h"
00033 #include "main/macros.h"
00034 #include "main/mtypes.h"
00035 #include "main/vtxfmt.h"
00036 
00037 #include "vbo_context.h"
00038 
00039 void vbo_exec_init( GLcontext *ctx )
00040 {
00041    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
00042 
00043    exec->ctx = ctx;
00044 
00045    /* Initialize the arrayelt helper
00046     */
00047    if (!ctx->aelt_context &&
00048        !_ae_create_context( ctx )) 
00049       return;
00050 
00051    vbo_exec_vtx_init( exec );
00052    vbo_exec_array_init( exec );
00053 
00054    /* Hook our functions into exec and compile dispatch tables.
00055     */
00056    _mesa_install_exec_vtxfmt( ctx, &exec->vtxfmt );
00057 
00058    ctx->Driver.NeedFlush = 0;
00059    ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
00060    ctx->Driver.FlushVertices = vbo_exec_FlushVertices;
00061 
00062    vbo_exec_invalidate_state( ctx, ~0 );
00063 }
00064 
00065 
00066 void vbo_exec_destroy( GLcontext *ctx )
00067 {
00068    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
00069 
00070    if (ctx->aelt_context) {
00071       _ae_destroy_context( ctx );
00072       ctx->aelt_context = NULL;
00073    }
00074 
00075    vbo_exec_vtx_destroy( exec );
00076    vbo_exec_array_destroy( exec );
00077 }
00078 
00079 /* Really want to install these callbacks to a central facility to be
00080  * invoked according to the state flags.  That will have to wait for a
00081  * mesa rework:
00082  */ 
00083 void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state )
00084 {
00085    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
00086 
00087    if (new_state & (_NEW_PROGRAM|_NEW_EVAL))
00088       exec->eval.recalculate_maps = 1;
00089 
00090    _ae_invalidate_state(ctx, new_state);
00091 }
00092 
00093 
00094 
00095 
00096 

Generated on Wed May 23 2012 04:18:57 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.