[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16438] branches/soc-2008-mxcurioni/source /blender/freestyle: soc-2008-mxcurioni: replaced extgl calls with glew, to test whether glBlendEquation is present.

Maxime Curioni maxime.curioni at gmail.com
Tue Sep 9 18:40:36 CEST 2008


Revision: 16438
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16438
Author:   mxcurioni
Date:     2008-09-09 18:40:36 +0200 (Tue, 09 Sep 2008)

Log Message:
-----------
soc-2008-mxcurioni: replaced extgl calls with glew, to test whether glBlendEquation is present. Removal of app/ folder

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLUtils.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/rendering/GLUtils.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/FreestyleConfig.h

Removed Paths:
-------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppCanvas.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppCanvas.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppConfig.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppConfig.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppDensityCurvesWindow.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppDensityCurvesWindow.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppGLWidget.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppGLWidget.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppInteractiveShaderWindow.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppInteractiveShaderWindow.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppMainWindow.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppMainWindow.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppOptionsWindow.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppOptionsWindow.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppProgressBar.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppProgressBar.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppStyleWindow.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppStyleWindow.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/ConfigIO.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/ConfigIO.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/Controller.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/Controller.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/Main.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/QGLBasicWidget.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/QGLBasicWidget.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/QStyleModuleSyntaxHighlighter.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/QStyleModuleSyntaxHighlighter.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/appmainwindowbase4.ui
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/densitycurveswindow4.ui
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/freestyle.qrc
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/icons/
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/interactiveshaderwindow4.ui
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/optionswindow4.ui
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/progressdialog4.ui
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/stylewindow4.ui
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/ui_dir/

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript	2008-09-09 16:38:08 UTC (rev 16437)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript	2008-09-09 16:40:36 UTC (rev 16438)
@@ -8,6 +8,7 @@
 
 incs += '../blenkernel ../blenloader ../blenlib ../imbuf ../makesdna ../python '
 incs += '../render/extern/include ../render/intern/include ../include ../src'
+incs += ' #/extern/glew/include'
 incs += ' ' + env['BF_PYTHON_INC']	
 incs += ' ' + env['BF_PNG_INC']
 

Deleted: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.cpp	2008-09-09 16:38:08 UTC (rev 16437)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.cpp	2008-09-09 16:40:36 UTC (rev 16438)
@@ -1,36 +0,0 @@
-
-//
-//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
-//   with this source distribution. 
-//
-//  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.
-//
-//  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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include <qmessagebox.h>
-#include "AppConfig.h"
-#include "AppAboutWindow.h"
-
-void AppAboutWindow::display() {
-  QMessageBox* mb;
-  
-  mb = new QMessageBox("About " + Config::APPLICATION_NAME,
-						Config::ABOUT_STRING,
-						QMessageBox::NoIcon,
-                        QMessageBox::Ok | QMessageBox::Default, QMessageBox::NoButton, QMessageBox::NoButton,
-						NULL,
-						(Qt::WFlags)(Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WA_DeleteOnClose));
-  mb->show();
-}

Deleted: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.h	2008-09-09 16:38:08 UTC (rev 16437)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppAboutWindow.h	2008-09-09 16:40:36 UTC (rev 16438)
@@ -1,40 +0,0 @@
-//
-//  Filename         : AppAboutWindow.h
-//  Author           : Emmanuel Turquin
-//  Purpose          : Class to display a "About" window
-//  Date of creation : 13/06/2003
-//
-///////////////////////////////////////////////////////////////////////////////
-
-
-//
-//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
-//   with this source distribution. 
-//
-//  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.
-//
-//  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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef  APPABOUTWINDOWS_H
-# define APPABOUTWINDOWS_H
-
-class AppAboutWindow
-{
- public:
-
-  static void display();
-};
-
-#endif // APPABOUTWINDOWS_H

Deleted: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppCanvas.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppCanvas.cpp	2008-09-09 16:38:08 UTC (rev 16437)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app/AppCanvas.cpp	2008-09-09 16:40:36 UTC (rev 16438)
@@ -1,404 +0,0 @@
-
-//
-//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
-//   with this source distribution. 
-//
-//  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.
-//
-//  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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "AppGLWidget.h"
-#include "../image/Image.h"
-#include "../system/TimeStamp.h"
-#include "Controller.h"
-#include "../stroke/StrokeRenderer.h"
-#include "AppCanvas.h"
-#include "../rendering/GLRenderer.h"
-#include "../rendering/GLStrokeRenderer.h"
-#include "../rendering/GLUtils.h"
-#include "AppConfig.h"
-#include <QImage>
-
-#ifdef WIN32
-# include <windows.h>
-# include "../rendering/extgl.h"
-#endif
-#ifdef __MACH__
-# include <OpenGL/gl.h>
-#else
-# include <GL/gl.h>
-#endif
-
-AppCanvas::AppCanvas()
-:Canvas()
-{
-  _pViewer = 0;
-  _blendEquation = true;
-  _MapsPath = (const char*)(Config::Path::getInstance()->getMapsDir().toAscii().data());
-}
-
-AppCanvas::AppCanvas(AppGLWidget* iViewer)
-:Canvas()
-{
-  _pViewer = iViewer;
-  _blendEquation = true;
-}
-
-AppCanvas::AppCanvas(const AppCanvas& iBrother)
-:Canvas(iBrother)
-{
-  _pViewer = iBrother._pViewer;
-  _blendEquation = iBrother._blendEquation;
-}
-
-AppCanvas::~AppCanvas()
-{
-  _pViewer = 0;
-}
-
-void AppCanvas::setViewer(AppGLWidget *iViewer)
-{
-  _pViewer = iViewer;
-}  
-
-int AppCanvas::width() const 
-{
-  return _pViewer->width();
-}
-
-int AppCanvas::height() const
-{
-  return _pViewer->height();
-}
-
-BBox<Vec3r> AppCanvas::scene3DBBox() const 
-{
-  return _pViewer->scene3DBBox();
-}
-
-void AppCanvas::preDraw()
-{
-  Canvas::preDraw();
-
-  _pViewer->prepareCanvas();
-  glClearColor(0,0,0,0);
-	glClear(GL_COLOR_BUFFER_BIT);
-	glDisable(GL_LIGHTING);
-	glPolygonMode(GL_FRONT, GL_FILL);
-	glShadeModel(GL_SMOOTH);
-	glDisable(GL_DEPTH_TEST);
-	glEnable(GL_TEXTURE_2D);
-  glEnable(GL_BLEND);
-}
-
-void AppCanvas::init() 
-{
-#ifdef WIN32
-  static bool firsttime = true;
-  if (firsttime)
-    {
-      if (extgl_Initialize() != 0)
-	      cerr << "Error: problem occurred while initializing GL extensions" << endl;			
-      else
-	      cout << "GL extensions initialized" << endl;
-
-      if(!glutils_extgl_GetProcAddress("glBlendEquation")){
-        _blendEquation = false;
-        cout << "glBlendEquation unavailable on this hardware -> switching to strokes basic rendering mode" << endl;
-      }
-      firsttime=false;
-    }
-#endif
-
-  _Renderer = new GLStrokeRenderer;
-  if(!StrokeRenderer::loadTextures())
-    {
-      cerr << "unable to load stroke textures" << endl;
-      return;
-    }
-}
-
-void AppCanvas::postDraw()
-{
-  //inverse frame buffer
-  glDisable(GL_TEXTURE_2D);
-  glDisable(GL_BLEND);
-  _pViewer->releaseCanvas();
-
-  Canvas::postDraw();
-}
-
-void AppCanvas::Erase()
-{
-  Canvas::Erase();
-  //_pViewer->clear();
-}
-
-#include "../image/GaussianFilter.h"
-void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const
-{
-  //static unsigned number = 0;
-  float *rgb = new float[3*w*h];
-  _pViewer->readPixels(x,y,w,h,AppGLWidget::RGB,rgb);
-  oImage.setArray(rgb, width(), height(), w,h, x, y, false);
-  // FIXME
-  //  QImage qtmp(w, h, 32);
-  //  for(unsigned py=0;py<h;++py){
-  //    for(unsigned px=0;px<w;++px){
-  //      int r = (int)255*(oImage.getR(x+px,y+py));
-  //      int g = (int)255*(oImage.getG(x+px,y+py));
-  //      int b = (int)255*(oImage.getB(x+px,y+py));
-  //      qtmp.setPixel(px,py,qRgb(r,g,b));
-  //    }
-  //  }
-  //  qtmp.save("densityQuery"+QString::number(number)+".png", "PNG");
-  //  if(number == 1090){
-  //    RGBImage img;
-  //    float *rgbtmp = new float[3*width()*height()];
-  //    _pViewer->readPixels(0,0,width(),height(),AppGLWidget::RGB,rgbtmp);
-  //    img.setArray(rgbtmp, width(), height(), width(), height(), 0, 0, false);
-  //    QImage qtmp(width(), height(), 32);
-  //    for(unsigned py=0;py<height();++py){
-  //      for(unsigned px=0;px<width();++px){
-  //        int r = (int)255*(img.getR(px,py));
-  //        int g = (int)255*(img.getG(px,py));
-  //        int b = (int)255*(img.getB(px,py));
-  //        qtmp.setPixel(px,height()-1-py,qRgb(r,g,b));
-  //      }
-  //    }
-  //    qtmp.save("densityQuery"+QString::number(number)+".png", "PNG");
-  //    
-  //    GaussianFilter filter;
-  //    filter.setSigma(4.0);
-  //    int bound = filter.getBound();
-  //    QImage qtmp2(width(), height(), 32);
-  //    for(int py2=0;py2<height();++py2){
-  //      for(int px2=0;px2<width();++px2){  
-  //        if( (px2-bound < 0) || (px2+bound>width())
-  //	      || (py2-bound < 0) || (py2+bound>height()))
-  //          continue;
-  //        int g = 255*filter.getSmoothedPixel<RGBImage>(&img, px2,py2);
-  //        qtmp2.setPixel(px2,height()-1-py2,qRgb(g,g,g));
-  //      }
-  //    }
-  //    qtmp2.save("blurredCausalDensity"+QString::number(number)+".png", "PNG");
-  //  }
-  //  cout << number << endl;
-  //  ++number;
-}
-
-void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const
-{
-  float *rgb = new float[w*h];
-  _pViewer->readPixels(x,y,w,h,AppGLWidget::DEPTH,rgb);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list