On Thu, Sep 03, 2009 at 02:27:42PM +0800, Chia-I Wu wrote:
> I am still cleaning up the implementation.  But I would like to know
> your ideas about OpenGL ES support, and the path I take.  Thanks.
After some cleanups, I think it is more suitable to split the patch
series into 2 parts

1. Make features more modular
2. Support for OpenGL ES

The previous patch series tried to add OpenGL ES support without
changing mesa.  It worked, but there were some code duplications in es
overlay.  To support es overlay in a more elegant way, I think it is
necessary to change how mesa supports features.

In mesa, a feature, defined in mfeatures.h, can be anything.  However,
many of the features share some characteristics.  It is possible to
define some conventions to make features more modular, in that a user of
a feature need not to know if a feature is enabled or not.

Many of the features consist of 4 things

* States.  E.g., ctx->Accum stores the states of FEATURE_accum
* Entry points in glapi_table.  E.g. Accum and ClearAccum are two entry
  points of FEATURE_accum.
* Entry points in dd_function_table.  E.g., Accum is the entry point
  defined by FEATURE_accum.
* Entry points in GLvertexformat.  E.g. EvalCoord1f is an entry point in
  GLvertexformat defined by FEATURE_evaluators

What I want to do is to define functions/macros to manipulate any of the
above.  When a new functionality, say ARB_sync, is added as a feature,
it will define the necessary functions/macros.  For the rest of mesa, it
will not need to care if the feature is enabled or not.

For the 4 things respectively, I would like to suggest a feature to
provide

* _mesa_init_<feature> and _mesa_free_<feature>_data to initialize and
  free the states. 
* _mesa_init_<feature>_dispatch to initialize the dispatch table
* _MESA_INIT_<FEATURE>_functions (macro) to initialize the dd table
* _mesa_init_<feature>_vtxfmt and _MESA_INIT_<FEATURE>_VTXFMT (macro) to
  initialize the GLvertexformat

The important thing to note is that they should be always available.
When a feature is disabled, they will simply compile to no-op, with
state init being an exception.  It might still initialize the states to
sane defaults.

-- 
Regards,
olv

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to