2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes: * Sequence transform strip uses G.scene global, this is commented out now, should be fixed. * Etch-a-ton code was most difficult to merge. The files already in 2.5 got merged, but no new files were added. Calls to these files are commented out with "XXX etch-a-ton". editarmature.c and transform_snap.c were complex to merge. Martin, please check? * Game engine compiles and links again here for scons/make/cmake (player still fails to link).
This commit is contained in:
@@ -59,6 +59,8 @@ RAS_OpenGLRasterizer::RAS_OpenGLRasterizer(RAS_ICanvas* canvas)
|
||||
m_2DCanvas(canvas),
|
||||
m_fogenabled(false),
|
||||
m_time(0.0),
|
||||
m_campos(0.0f, 0.0f, 0.0f),
|
||||
m_camortho(false),
|
||||
m_stereomode(RAS_STEREO_NOSTEREO),
|
||||
m_curreye(RAS_STEREO_LEFTEYE),
|
||||
m_eyeseparation(0.0),
|
||||
@@ -325,13 +327,12 @@ void RAS_OpenGLRasterizer::ClearCachingInfo(void)
|
||||
m_materialCachingInfo = 0;
|
||||
}
|
||||
|
||||
|
||||
void RAS_OpenGLRasterizer::EndFrame()
|
||||
void RAS_OpenGLRasterizer::FlushDebugLines()
|
||||
{
|
||||
//DrawDebugLines
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
//DrawDebugLines
|
||||
glBegin(GL_LINES);
|
||||
for (unsigned int i=0;i<m_debugLines.size();i++)
|
||||
{
|
||||
@@ -346,8 +347,19 @@ void RAS_OpenGLRasterizer::EndFrame()
|
||||
}
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
m_debugLines.clear();
|
||||
|
||||
}
|
||||
|
||||
void RAS_OpenGLRasterizer::EndFrame()
|
||||
{
|
||||
|
||||
|
||||
FlushDebugLines();
|
||||
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
m_2DCanvas->EndFrame();
|
||||
}
|
||||
@@ -756,8 +768,9 @@ void RAS_OpenGLRasterizer::SetProjectionMatrix(MT_CmMatrix4x4 &mat)
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
double* matrix = &mat(0,0);
|
||||
glLoadMatrixd(matrix);
|
||||
}
|
||||
|
||||
m_camortho= (mat(3, 3) != 0.0f);
|
||||
}
|
||||
|
||||
void RAS_OpenGLRasterizer::SetProjectionMatrix(const MT_Matrix4x4 & mat)
|
||||
{
|
||||
@@ -767,6 +780,8 @@ void RAS_OpenGLRasterizer::SetProjectionMatrix(const MT_Matrix4x4 & mat)
|
||||
mat.getValue(matrix);
|
||||
/* Internally, MT_Matrix4x4 uses doubles (MT_Scalar). */
|
||||
glLoadMatrixd(matrix);
|
||||
|
||||
m_camortho= (mat[3][3] != 0.0f);
|
||||
}
|
||||
|
||||
MT_Matrix4x4 RAS_OpenGLRasterizer::GetFrustumMatrix(
|
||||
@@ -883,6 +898,10 @@ const MT_Point3& RAS_OpenGLRasterizer::GetCameraPosition()
|
||||
return m_campos;
|
||||
}
|
||||
|
||||
bool RAS_OpenGLRasterizer::GetCameraOrtho()
|
||||
{
|
||||
return m_camortho;
|
||||
}
|
||||
|
||||
void RAS_OpenGLRasterizer::SetCullFace(bool enable)
|
||||
{
|
||||
|
@@ -80,6 +80,7 @@ class RAS_OpenGLRasterizer : public RAS_IRasterizer
|
||||
MT_Matrix4x4 m_viewmatrix;
|
||||
MT_Matrix4x4 m_viewinvmatrix;
|
||||
MT_Point3 m_campos;
|
||||
bool m_camortho;
|
||||
|
||||
StereoMode m_stereomode;
|
||||
StereoEye m_curreye;
|
||||
@@ -168,6 +169,7 @@ public:
|
||||
);
|
||||
|
||||
virtual const MT_Point3& GetCameraPosition();
|
||||
virtual bool GetCameraOrtho();
|
||||
|
||||
virtual void SetFog(
|
||||
float start,
|
||||
@@ -238,6 +240,8 @@ public:
|
||||
|
||||
virtual void SetPolygonOffset(float mult, float add);
|
||||
|
||||
virtual void FlushDebugLines();
|
||||
|
||||
virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
|
||||
{
|
||||
OglDebugLine line;
|
||||
|
@@ -6,4 +6,9 @@ sources = env.Glob('*.cpp')
|
||||
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines '
|
||||
incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
|
||||
|
||||
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350, 115] )
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
|
||||
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350, 115], cxx_compileflags = cxxflags )
|
||||
|
Reference in New Issue
Block a user