Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: NSOpenGLView visual transparency vs. mouse transparency

  1. #1
    Intern Newbie
    Join Date
    May 2015
    Posts
    37

    NSOpenGLView visual transparency vs. mouse transparency

    Hello.
    Not sure if this is the right place to ask, so please redirect me if I`m wrong.

    The program I`m writing has 2 rendering paths: one using pure CPU and based on NSView, the other OpenGL-accelerated and based on NSOpenGLView. Both of them have transparent main views on a transparent window. As an effect, this enables users to see through some parts of the window.
    My problem is that, unlike NSView, NSOpenGLView is not click-through. I suppose this is due to OpenGL output never making it back to RAM from VRAM (which is generally the right thing to do), but that also means that the compositor can`t normally tell if the cursor is over a transparent pixel.
    My question is: are there any standard workarounds for this? Potentially, I`m able to calculate under-cursor transparency myself, without any buffer readback. One thing that I don`t know is where to pass this information. Maybe some user-supplied hint from NSOpenGLView to the compositor, in case such hint exists at all…
    Tried to directly call NSWindow::setIgnoresMouseEvents. When I passed true, the whole window became transparent for the cursor, which is not what I want.

    P.S.: Tested under OS X 10.8.5–10.10.1 with the standard context using OpenGL 2.0 / GLSL 1.10 and GL_EXT_framebuffer_object. No GLUT / GLEW / GLFW.

  2. #2
    Intern Newbie
    Join Date
    May 2015
    Posts
    37
    Oh, great. Now this is the first link in Google for «NSOpenGLView mouse transparency»… =(

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •