2010年9月13日星期一

Weekly update 2010/9/6~


http://en.wikipedia.org/wiki/HSL_and_HSV
http://www.manifold.net/doc/colors_as_hue_saturation_and_brightness.htm


讲述GUI的history,也是发展了2/30年嘛. keyword: xerox, windows, mac.
http://www.gladdengraphics.com/academics/GradCourses/ComputerGraphicsHistory/ResearchPaper/parcgui01.pdf


There is a case that pointer is needed. for example,
class GLSLShaderProgram {
public:
GLSLShaderProgram *createInstanceFromSource(vs string, fs string);
protected:
GLSLShaderProgram(...);
...
};
In this case, we cannot define something like this:
class App {
public:
App(): ... {}
private:
GLSLShaderProgram m_programHandle;
};
Because the m_programHandle will be initialized in the initialization list with constructor, which is not available from outside.

后来我才意识到:
shading effect = lighting + material of geometry.
而shading shader 就是那个”+”加号, 根据特定的shading stype来计算.
所以GLSLShadingProgram不该直接放到App里面, 而是例如:
而且具体的某一个shading shader 就是用于某一种shading effect的.
class App {
PhongShading m_phong;
};
class PhongShading {

bool initialize() {

m_programHandle = createProgramFromFile(phong.glsl);

return m_programHandle != 0;

}

GLSLShadingProgram m_programHandle;
};
class Model {
void render() {
get m_phong from app;
set the lighting and material parameters;
active the shading program to draw the model;
};


How the mask is effecting on a image layer?
Blend mode 用于有一个background image, 当上面加一个image做blending and composing时候用的。
Masks是附加于a specified image layer, 不修改影响那个image layer本身(un-destructive), 只是觉得那些pixel可以透过mask被看到, 那些被遮挡了不能看到.
Shader中是怎么实现的呢?


What is the l-value and r-value, difference?
http://blogs.msdn.com/b/vcblog/archive/2009/02/03/rvalue-references-c-0x-features-in-vc10-part-2.aspx

没有评论:

发表评论