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.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* $Id: svgamesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
  2. /*
  3. * Mesa 3-D graphics library
  4. * Version: 3.0
  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 1999/08/19 00:55:40 jtg
  24. * Initial revision
  25. *
  26. * Revision 3.0 1998/02/20 05:07:24 brianp
  27. * initial rev
  28. *
  29. */
  30. /*
  31. * SVGA/Mesa interface for Linux.
  32. */
  33. /*
  34. * Intro to using the VGA/Mesa interface
  35. *
  36. * 1. #include the <vga.h> file
  37. * 2. Call vga_init() to initialize the SVGA library.
  38. * 3. Call vga_setmode() to specify the screen size and color depth.
  39. * 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit
  40. * color Mesa assumes color index mode, if using 16-bit or deeper color
  41. * Mesa assumes RGB mode.
  42. * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  43. * 6. You can now use the Mesa API functions.
  44. * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  45. * to restore the original text screen.
  46. *
  47. * Notes
  48. * 1. You must run your executable as root (or use the set UID-bit) because
  49. * the SVGA library requires it.
  50. * 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what
  51. * has to be done yet.
  52. */
  53. #ifndef SVGAMESA_H
  54. #define SVGAMESA_H
  55. #define SVGAMESA_MAJOR_VERSION 3
  56. #define SVGAMESA_MINOR_VERSION 0
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60. #include "GL/gl.h"
  61. /*
  62. * This is the SVGAMesa context 'handle':
  63. */
  64. typedef struct svgamesa_context *SVGAMesaContext;
  65. /*
  66. * doubleBuffer flag new in version 2.4
  67. */
  68. extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
  69. extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
  70. extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
  71. extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
  72. extern void SVGAMesaSwapBuffers( void );
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif