Revision: 45714
http://brlcad.svn.sourceforge.net/brlcad/?rev=45714&view=rev
Author: brlcad
Date: 2011-07-28 19:03:38 +0000 (Thu, 28 Jul 2011)
Log Message:
-----------
quellage, remove set-but-not-used variables
Modified Paths:
--------------
brlcad/trunk/src/libdm/dm-ogl.c
Modified: brlcad/trunk/src/libdm/dm-ogl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ogl.c 2011-07-28 18:46:28 UTC (rev 45713)
+++ brlcad/trunk/src/libdm/dm-ogl.c 2011-07-28 19:03:38 UTC (rev 45714)
@@ -2132,7 +2132,6 @@
unsigned char *idata = NULL;
int width = 0;
int height = 0;
- int found_valid_dm = 0;
int bytes_per_pixel = 3; /*rgb no alpha for raw pix */
GLuint *pixels;
unsigned int pixel;
@@ -2141,7 +2140,10 @@
unsigned int blue_mask = 0x0000ff00;
unsigned int alpha_mask = 0x000000ff;
int h, w;
- int big_endian, swap_bytes;
+ int big_endian;
+#if defined(DM_WGL)
+ int swap_bytes;
+#endif
if ((bu_byteorder() == BU_BIG_ENDIAN))
big_endian = 1;
@@ -2156,20 +2158,18 @@
#endif
if (dmp->dm_type == DM_TYPE_WGL || dmp->dm_type == DM_TYPE_OGL) {
- int make_ret = 0;
- found_valid_dm = 1;
width = dmp->dm_width;
height = dmp->dm_height;
pixels = bu_calloc(width * height, sizeof(GLuint), "pixels");
#if defined(DM_WGL)
- make_ret = wglMakeCurrent(((struct dm_xvars
*)dmp->dm_vars.pub_vars)->hdc,
- ((struct wgl_vars
*)dmp->dm_vars.priv_vars)->glxc);
+ wglMakeCurrent(((struct dm_xvars *)dmp->dm_vars.pub_vars)->hdc,
+ ((struct wgl_vars *)dmp->dm_vars.priv_vars)->glxc);
#else
- make_ret = glXMakeCurrent(((struct dm_xvars
*)dmp->dm_vars.pub_vars)->dpy,
- ((struct dm_xvars
*)dmp->dm_vars.pub_vars)->win,
- ((struct ogl_vars
*)dmp->dm_vars.priv_vars)->glxc);
+ glXMakeCurrent(((struct dm_xvars *)dmp->dm_vars.pub_vars)->dpy,
+ ((struct dm_xvars *)dmp->dm_vars.pub_vars)->win,
+ ((struct ogl_vars *)dmp->dm_vars.priv_vars)->glxc);
#endif
{
@@ -2195,14 +2195,18 @@
int i_h_inv = (height - h - 1)*width + w;
int j = i*bytes_per_pixel;
unsigned char *value = (unsigned char *)(idata + j);
+#if defined(DM_WGL)
unsigned char alpha;
+#endif
+
pixel = pixels[i_h_inv];
value[0] = (pixel & red_mask) >> 24;
value[1] = (pixel & green_mask) >> 16;
value[2] = (pixel & blue_mask) >> 8;
+
+#if defined(DM_WGL)
alpha = pixel & alpha_mask;
-#if defined(DM_WGL)
if (swap_bytes) {
unsigned char tmp_byte;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits