octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51875] Cannot add light source to patch


From: Tasos Papastylianou
Subject: [Octave-bug-tracker] [bug #51875] Cannot add light source to patch
Date: Sun, 27 Aug 2017 16:20:16 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

URL:
  <http://savannah.gnu.org/bugs/?51875>

                 Summary: Cannot add light source to patch
                 Project: GNU Octave
            Submitted by: tpapastylianou
            Submitted on: Sun 27 Aug 2017 08:20:15 PM UTC
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Tasos Papastylianou <poacheR>
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Attempting to add a light source to a patch object does not work.
Adding a light to other types of plot (e.g. surface) works.
Creating a patch object automatically, e.g. using isosurface, also works.
Removing the light source and then adding another one in an object which
previously supported lighting works as intended, e.g.:


A = zeros(5,5,5);   A(2:4,2:4,2:4) = 1;
isosurface(A, 0.5);
h = get(gca, 'children');
delete(h(1)); % deleting light object
camlight      % new light object works as intended


But attempting to create a patch object from scratch and then add light,
doesn't seem to have an effect.

Example:


X = [0, 1, 1, 0; 1, 1, 1, 1; 0, 1, 1, 0];
Y = [0, 0, 1, 1; 0, 0, 1, 1; 1, 1, 1, 1];
Z = [0, 0, 0, 0; 0, 1, 1, 0; 0, 0, 1, 1];
p = patch(X', Y', Z', 'r')
camlight
 

I'm not sure if this bug is related: https://savannah.gnu.org/bugs/?42006
(referring specifically to the line "It looks like 'glEnable (LIGHTING)'
should only be called for patches and surfaces if a light object is present in
the axes")






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51875>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]