Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ggimesa.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* GGI-Driver for MESA
  2. *
  3. * Copyright (C) 1997 Uwe Maurer
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public
  16. * License along with this library; if not, write to the Free
  17. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. * ---------------------------------------------------------------------
  19. * This code was derived from the following source of information:
  20. *
  21. * svgamesa.c and ddsample.c by Brian Paul
  22. *
  23. */
  24. #ifndef _GGIMESA_H
  25. #define _GGIMESA_H
  26. #include <stdio.h>
  27. #include <stdlib.h>
  28. #include <stdarg.h>
  29. #include "config.h"
  30. #include "context.h"
  31. #include "drawpix.h"
  32. #include "imports.h"
  33. #include "matrix.h"
  34. #include "state.h"
  35. #include "mtypes.h"
  36. #include "macros.h"
  37. #include "depth.h"
  38. #undef ASSERT /* ASSERT is redefined */
  39. #include <ggi/internal/internal.h>
  40. #include <ggi/ggi_ext.h>
  41. #include <ggi/ggi.h>
  42. #include "GL/ggimesa.h"
  43. /*
  44. * GGIMesa visual configuration.
  45. *
  46. * This structure "derives" from Mesa's GLvisual and extends it by
  47. * GGI's visual. Combination of these two structures is enough to fully
  48. * describe the mode the application is currently running in. GGI
  49. * visual provides information about color configuration and buffering
  50. * method, GLvisual fills the rest.
  51. */
  52. struct ggi_mesa_visual {
  53. GLvisual gl_visual;
  54. ggi_visual_t ggi_visual;
  55. };
  56. /*
  57. * GGIMesa context.
  58. *
  59. * GGIMesa context expands the Mesa's context (it doesn't actualy derive
  60. * from it, but this ability isn't needed, and it is best if GL context
  61. * creation is left up to Mesa). It also contains a reference to the GGI
  62. * visual it is attached to, which is very useful for all Mesa callbacks.
  63. */
  64. struct ggi_mesa_context
  65. {
  66. GLcontext *gl_ctx;
  67. ggi_visual_t ggi_visual;
  68. ggi_pixel color; /* Current color or index*/
  69. ggi_pixel clearcolor;
  70. void *priv;
  71. };
  72. #define SHIFT (GGI_COLOR_PRECISION - 8)
  73. #endif