This commit is based on the patch & cool design work of Matt. It includes the new Lamp drawing style, and replaces the Object center dots with a similar styled OpenGL drawn dot. Important side-note is that removing the old glDrawPixels() for centers or lamps will not only make Blender faster, but also prevents crashing on a couple of cheaper 3d cards (as reported for S3 and Intel on-board cards) Notes: - The new default only draws Object centers when selected or active. If you like to see them always, use the View Properties Panel. You can also save that in the .B.blend - The size for centers (and lamps) is in the User settings "View & Controls" - Unselected Lamps, and their offset lines from zero Z, are drawn in a new Theme color Changes and additions in Matt's patch: - Lamps and centers are drawn fixed size, in pixels. Also the 'sun' lamp draws screen aligned now. - Center dots now also draw in blue to denote Library linkage or to show that an Object has been linked to other scenes. - When objects are empty (no vertices) they will always draw a center dot. Otherwise these objects would never be selectable anymore! - Added theme setting for center size, and initialization - Removed the old redundant code for drawing centers - Cleanup of drawing routines, made center dots faster - Started removing calls to glBlendFunc(). Regular alpha drawing should become standard, and the (very) occasional exception should return this to default after usage.
75 lines
2.5 KiB
C++
75 lines
2.5 KiB
C++
/**
|
|
* $Id$
|
|
*
|
|
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version. The Blender
|
|
* Foundation also sells licenses for use in proprietary software under
|
|
* the Blender License. See http://www.blender.org/BL/ for information
|
|
* about this.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
* All rights reserved.
|
|
*
|
|
* The Original Code is: all of this file.
|
|
*
|
|
* Contributor(s): none yet.
|
|
*
|
|
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
|
*/
|
|
|
|
#ifndef BDR_DRAWOBJECT_H
|
|
#define BDR_DRAWOBJECT_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
struct Object;
|
|
struct Nurb;
|
|
struct Lamp;
|
|
struct ListBase;
|
|
struct BoundBox;
|
|
struct Base;
|
|
struct BPoint;
|
|
struct BezTriple;
|
|
struct EditVert;
|
|
struct EditFace;
|
|
|
|
void drawaxes(float size);
|
|
void drawcamera(struct Object *ob);
|
|
|
|
void mesh_foreachScreenVert(void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts);
|
|
void mesh_foreachScreenEdge(void (*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, int clipVerts);
|
|
void mesh_foreachScreenFace(void (*func)(void *userData, struct EditFace *efa, int x, int y, int index), void *userData);
|
|
|
|
void lattice_foreachScreenVert(void (*func)(void *userData, struct BPoint *bp, int x, int y), void *userData);
|
|
void nurbs_foreachScreenVert(void (*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, int x, int y), void *userData);
|
|
|
|
void drawcircball(int mode, float *cent, float rad, float tmat[][4]);
|
|
void get_local_bounds(struct Object *ob, float *centre, float *size);
|
|
void draw_object(struct Base *base);
|
|
void draw_object_ext(struct Base *base);
|
|
void drawsolidcube(float size);
|
|
extern void draw_object_backbufsel(struct Object *ob);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BDR_DRAWOBJECT_H */
|
|
|