#include <GL/glxproto.h>
#include "xm_api.h"
+#include "main/imports.h"
+#include "main/errors.h"
+#include "util/u_math.h"
/* An "Atrribs/Attribs" typo was fixed in glxproto.h in Nov 2014.
* This is in case we don't have the updated header.
* 10 bits per color channel. Mesa's limited to a max of 8 bits/channel.
*/
if (vis && depth > 24 && (xclass==TrueColor || xclass==DirectColor)) {
- if (_mesa_bitcount((GLuint) vis->red_mask ) <= 8 &&
- _mesa_bitcount((GLuint) vis->green_mask) <= 8 &&
- _mesa_bitcount((GLuint) vis->blue_mask ) <= 8) {
+ if (util_bitcount((GLuint) vis->red_mask ) <= 8 &&
+ util_bitcount((GLuint) vis->green_mask) <= 8 &&
+ util_bitcount((GLuint) vis->blue_mask ) <= 8) {
return vis;
}
else {
int numAux = 0;
GLint num_samples = 0;
- xmesa_init( dpy );
+ if (xmesa_init( dpy ) != 0) {
+ _mesa_warning(NULL, "Failed to initialize display");
+ return NULL;
+ }
parselist = list;
}
-PUBLIC int
+PUBLIC void
glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute,
unsigned int *value)
{
if (!xmbuf) {
/* Generate GLXBadPbufferSGIX for bad pbuffer */
- return 0;
+ return;
}
switch (attribute) {
default:
*value = 0;
}
- return 0;
}
#endif
-/*** GLX_SGIX_swap_group ***/
-
-PUBLIC void
-glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member)
-{
- (void) dpy;
- (void) drawable;
- (void) member;
-}
-
-
-
-/*** GLX_SGIX_swap_barrier ***/
-
-PUBLIC void
-glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier)
-{
- (void) dpy;
- (void) drawable;
- (void) barrier;
-}
-
-PUBLIC Bool
-glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
-{
- (void) dpy;
- (void) screen;
- (void) max;
- return False;
-}
-
-
-
/*** GLX_SUN_get_transparent_index ***/
PUBLIC Status
glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay,
- long *pTransparent)
+ unsigned long *pTransparent)
{
(void) dpy;
(void) overlay;