#include "tnl/t_pipeline.h"
#include "drivers/common/driverfuncs.h"
#include "drivers/common/meta.h"
-#include "util/u_math.h"
/**
* Global X driver lock
*/
static int check_for_xshm( XMesaDisplay *display )
{
-#if defined(USE_XSHM)
+#if defined(USE_XSHM)
int ignore;
if (XQueryExtension( display, "MIT-SHM", &ignore, &ignore, &ignore )) {
}
else {
double x = (double) value / (double) max;
- return IROUND_POS((GLfloat) max * pow(x, 1.0F/gamma));
+ return lroundf((GLfloat) max * pow(x, 1.0F/gamma));
}
}
b->backxrb->Parent = b;
/* determine back buffer implementation */
b->db_mode = vis->ximage_flag ? BACK_XIMAGE : BACK_PIXMAP;
-
+
_mesa_attach_and_own_rb(&b->mesa_buffer, BUFFER_BACK_LEFT,
&b->backxrb->Base.Base);
}
/**
* Convert an X visual type to a GLX visual type.
- *
+ *
* \param visualType X visual type (i.e., \c TrueColor, \c StaticGray, etc.)
* to be converted.
* \return If \c visualType is a valid X visual type, a GLX visual type will
* be returned. Otherwise \c GLX_NONE will be returned.
- *
+ *
* \note
* This code was lifted directly from lib/GL/glx/glcontextmodes.c in the
* DRI CVS tree.
if (b->db_mode) {
if (b->backxrb->ximage) {
/* Copy Ximage (back buf) from client memory to server window */
-#if defined(USE_XSHM)
+#if defined(USE_XSHM)
if (b->shm) {
/*mtx_lock(&_xmesa_lock);*/
XShmPutImage( b->xm_visual->display, b->frontxrb->drawable,
if (!b->backxrb) {
/* single buffered */
- return;
+ return;
}
if (b->db_mode) {
int yTop = b->mesa_buffer.Height - y - height;
if (b->backxrb->ximage) {
/* Copy Ximage from host's memory to server's window */
-#if defined(USE_XSHM)
+#if defined(USE_XSHM)
if (b->shm) {
/* XXX assuming width and height aren't too large! */
XShmPutImage( b->xm_visual->display, b->frontxrb->drawable,
#include "c99_math.h"
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/teximage.h"
return 0;
else if (z > CHAN_MAX)
return CHAN_MAX;
- return (GLchan) IROUND_POS(z);
+ return (GLchan) lroundf(z);
#endif
}
typedef void (*plot_func)(struct gl_context *ctx, struct LineInfo *line,
int ix, int iy);
-
+
/*