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

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