Matcap support in 3D Viewport.
Full log is here: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability#Matcap_in_3D_viewport Implementation notes: - Matcaps are an extension of Solid draw mode, and don't show in other drawmodes. (It's mostly intended to aid modeling/sculpt) - By design, Matcaps are a UI feature, and only stored locally for the UI itself, and won't affect rendering or materials. - Currently a set of 16 (GPL licensed) Matcaps have been compiled into Blender. It doesn't take memory or cpu time, until you use it. - Brush Icons and Matcaps use same code now, and only get generated/allocated on actually using it (instead of on startup). - The current set might get new or different images still, based on user feedback. - Matcap images are 512x512 pixels, so each image takes 1 Mb memory. Unused matcaps get freed immediately. The Matcap icon previews (128x128 pixels) stay in memory. - Loading own matcap image files will be added later. That needs design and code work to get it stable and memory-friendly. - The GLSL code uses the ID PreviewImage for matcaps. I tested it using the existing Material previews, which has its limits... especially for textured previews the normal-mapped matcap won't look good.
This commit is contained in:
@@ -43,6 +43,7 @@ struct GPUOutput;
|
||||
struct GPUNode;
|
||||
struct GPUVertexAttribs;
|
||||
struct GPUFrameBuffer;
|
||||
struct PreviewImage;
|
||||
|
||||
#define MAX_FUNCTION_NAME 64
|
||||
#define MAX_PARAMETER 32
|
||||
@@ -138,6 +139,7 @@ typedef struct GPUInput {
|
||||
|
||||
struct Image *ima; /* image */
|
||||
struct ImageUser *iuser;/* image user */
|
||||
struct PreviewImage *prv; /* preview images & icons */
|
||||
int image_isdata; /* image does not contain color data */
|
||||
float *dynamicvec; /* vector data in case it is dynamic */
|
||||
int dynamictype; /* origin of the dynamic uniform (GPUDynamicType) */
|
||||
|
||||
Reference in New Issue
Block a user