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.

svgamesa.h 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* $Id: svgamesa.h,v 1.1.1.1.2.1 1999/11/24 18:40:45 brianp Exp $ */
  2. /*
  3. * Mesa 3-D graphics library
  4. * Version: 3.1
  5. * Copyright (C) 1995-1998 Brian Paul
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Library General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Library General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Library General Public
  18. * License along with this library; if not, write to the Free
  19. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. /*
  22. * $Log: svgamesa.h,v $
  23. * Revision 1.1.1.1.2.1 1999/11/24 18:40:45 brianp
  24. * bumped version to 3.1
  25. *
  26. * Revision 1.1.1.1 1999/08/19 00:55:40 jtg
  27. * Imported sources
  28. *
  29. * Revision 3.0 1998/02/20 05:07:24 brianp
  30. * initial rev
  31. *
  32. */
  33. /*
  34. * SVGA/Mesa interface for Linux.
  35. */
  36. /*
  37. * Intro to using the VGA/Mesa interface
  38. *
  39. * 1. #include the <vga.h> file
  40. * 2. Call vga_init() to initialize the SVGA library.
  41. * 3. Call vga_setmode() to specify the screen size and color depth.
  42. * 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit
  43. * color Mesa assumes color index mode, if using 16-bit or deeper color
  44. * Mesa assumes RGB mode.
  45. * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  46. * 6. You can now use the Mesa API functions.
  47. * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  48. * to restore the original text screen.
  49. *
  50. * Notes
  51. * 1. You must run your executable as root (or use the set UID-bit) because
  52. * the SVGA library requires it.
  53. * 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what
  54. * has to be done yet.
  55. */
  56. #ifndef SVGAMESA_H
  57. #define SVGAMESA_H
  58. #define SVGAMESA_MAJOR_VERSION 3
  59. #define SVGAMESA_MINOR_VERSION 1
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63. #include "GL/gl.h"
  64. /*
  65. * This is the SVGAMesa context 'handle':
  66. */
  67. typedef struct svgamesa_context *SVGAMesaContext;
  68. /*
  69. * doubleBuffer flag new in version 2.4
  70. */
  71. extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
  72. extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
  73. extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
  74. extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
  75. extern void SVGAMesaSwapBuffers( void );
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #endif