From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Oct 11 2013 - 08:11:48 CDT

Vani,
  Thanks, that's very helpful. It definitely seems that your OpenGL
driver is broken with respect to proper handling of gl_FrontFacing...

In your VMD installation, try editing the GLSL shader code.
It is found inside the "shaders" folder within the VMD installation.
  /path/to/VMD/folder/vmd/shaders/vmd.frag

On a Mac, you will need to go inside the VMD.app directory:
  cd "VMD 1.9.1.app/Contents/vmd/shaders"
  edit vmd.frag

Look for "gl_FrontFacing" in the code:
  // determined by polygon winding order provided by OpenGL.
  vec3 N = normalize(oglnormal);
  if (!gl_FrontFacing) {
    N = -N;
  }

Comment out that 'if' statement entirely:
  // determined by polygon winding order provided by OpenGL.
  vec3 N = normalize(oglnormal);
  // XXX disable gl_FrontFacing test on broken Mac Intel OpenGL video driver
  // if (!gl_FrontFacing) {
  // N = -N;
  // }

Let us know if that has a positive impact on your problem or not...
Disabling that test will mean that the renderings of low-resolution
surfaces or cartoon representations won't look as good as they would
otherwise, but they should look much better than the results you're
getting currently.

Cheers,
  John

On Fri, Oct 11, 2013 at 03:54:09PM +0530, Vani Vemparala wrote:
> John,
>
> The VDW/Licorice representations with GLSL off and on are here:
> http://www.imsc.res.in/~vani/vmd/GLSL-ON-OFF-protein-VDW-licorice.jpg
>
> The same protein with 'NewCartoon' representation here:
> http://www.imsc.res.in/~vani/vmd/GLSL-ON-OFF-protein.jpg
>
> -Thank You
> Vani
>
> On Mon, Oct 7, 2013 at 10:37 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
>
> Hi,
> I have to concur with Axel, something appears to be quite broken with
> the
> OpenGL driver on your Mac. I have heard that a number of other Mac
> users with
> Intel chips have had intermittent issues with various driver versions.
> I don't know if it's possible to roll back a driver update on MacOS, or
> whether you might be able to install a newer driver, but either way, the
> driver you have is clearly not working correctly. Since the screen is
> nearly
> all black, my guess is that they have a bug in the implementation of
> gl_FrontFacing, or something similar. There's a tiny sliver of blue
> from the
> curved portion of the "D" in VMD, which makes me think that this may be
> a
> bug with surface normal handling, likely specifically with
> gl_FrontFracing.
> What happens if you load a molecule and set the representation to VDW or
> CPK, or Licorice? Do you still see mostly black, or do any of the
> spheres
> show up? They are rendered with a different shader that doesn't depend
> on
> gl_FrontFacing, so that's why I ask. Another thing to try: disable
> cueing
> and see if that has any effect.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
> On Fri, Oct 04, 2013 at 07:33:13AM +0200, Axel Kohlmeyer wrote:
> > On Fri, Oct 4, 2013 at 6:30 AM, Vani Vemparala
> <vanivemparala_at_gmail.com> wrote:
> > > Hello all,
> > >
> > > I recently purchased a MAC mini with the following specifications:
> > >
> > > MAC OSX version 10.8.5
> > > Graphics Intel HD Graphics 4000 512 MB
> > > MAC mini specifications: 2.3 GHz Intel Core i7
> > > Memory 4 GB 1600 MHZ DDR3
> > >
> > > I installed VMD 1.9.1 (I tried both CUDA and NO-CUDA versions of
> VMD) and
> > > have been having problems with GLSL rendering. The VMD start up
> message is
> > > below and a figure comparing the VMD GUI window with and without
> GLSL
> > > rendering is located at:
> > > http://www.imsc.res.in/~vani/vmd/GLSL.jpg
> > >
> > > Any suggestions in this regard would be really helpful.
> >
> > looks like a broken OpenGL driver. happens a lot with intel chipset
> graphics.
> > the linux version of the intel driver had been very broken for OpenGL
> > with GLSL for the last 3-4 years or so and is behaving decently only
> > since about a couple of months ago .
> >
> > axel.
> >
> > >
> > > -Thanks
> > > Vani
> > > ------------------------------
> > >
> -----------------------------------------------------------------------------
> > > /Users/vani $ vmd
> > > Info) VMD for MACOSXX86, version 1.9.1 (February 4, 2012)
> > > Info) http://www.ks.uiuc.edu/Research/vmd/
> > > Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
> > > Info) Please include this reference in published work using VMD:
> > > Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
> > > Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
> > > Info) -------------------------------------------------------------
> > > Info) Multithreading available, 8 CPUs detected.
> > > Info) OpenGL renderer: Intel HD Graphics 4000 OpenGL Engine
> > > Info) Features: STENCIL MDE MTX NPOT PP PS GLSL(OVF)
> > > Info) Full GLSL rendering mode is available.
> > > Info) Textures: 2-D (16384x16384), 3-D (2048x2048x2048),
> Multitexture (8)
> > > Info) Dynamically loaded 2 plugins in directory:
> > > Info)
> /Applications/VMD1.9.1.app/Contents/vmd/plugins/MACOSXX86/molfile
> > > vmd > Info) VMD for MACOSXX86, version 1.9.1 (February 4, 2012)
> > >
> --------------------------------------------------------------------------------------------------------------
> >
> >
> >
> > --
> > Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
> > International Centre for Theoretical Physics, Trieste. Italy.
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/