[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23919] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/blender_interface: forgotten files of last commit
Maxime Curioni
maxime.curioni at gmail.com
Sun Oct 18 19:06:29 CEST 2009
Revision: 23919
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23919
Author: mxcurioni
Date: 2009-10-18 19:06:29 +0200 (Sun, 18 Oct 2009)
Log Message:
-----------
forgotten files of last commit
Added Paths:
-----------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.h
Added: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.cpp (rev 0)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.cpp 2009-10-18 17:06:29 UTC (rev 23919)
@@ -0,0 +1,71 @@
+#include "BlenderTextureManager.h"
+
+
+BlenderTextureManager::BlenderTextureManager ()
+: TextureManager()
+{
+ //_brushes_path = Config::getInstance()...
+}
+
+BlenderTextureManager::~BlenderTextureManager ()
+{
+}
+
+void BlenderTextureManager::loadStandardBrushes()
+{
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/charcoalAlpha.bmp", Stroke::HUMID_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/washbrushAlpha.bmp", Stroke::HUMID_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/oil.bmp", Stroke::HUMID_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/oilnoblend.bmp", Stroke::HUMID_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/charcoalAlpha.bmp", Stroke::DRY_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/washbrushAlpha.bmp", Stroke::DRY_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/opaqueDryBrushAlpha.bmp", Stroke::OPAQUE_MEDIUM);
+ // getBrushTextureIndex(TEXTURES_DIR "/brushes/opaqueBrushAlpha.bmp", Stroke::OPAQUE_MEDIUM);
+ //_defaultTextureId = getBrushTextureIndex("smoothAlpha.bmp", Stroke::OPAQUE_MEDIUM);
+}
+
+
+unsigned
+BlenderTextureManager::loadBrush(string sname, Stroke::MediumType mediumType)
+{
+// GLuint texId;
+// glGenTextures(1, &texId);
+// bool found = false;
+// vector<string> pathnames;
+// string path; //soc
+// StringUtils::getPathName(TextureManager::Options::getBrushesPath(),
+// sname,
+// pathnames);
+// for (vector<string>::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) {
+// path = j->c_str();
+// //soc if(QFile::exists(path)){
+// if( BLI_exists( const_cast<char *>(path.c_str()) ) ) {
+// found = true;
+// break;
+// }
+// }
+// if(!found)
+// return 0;
+// // Brush texture
+// cout << "Loading brush texture..." << endl;
+// switch(mediumType){
+// case Stroke::DRY_MEDIUM:
+// //soc prepareTextureLuminance((const char*)path.toAscii(), texId);
+// prepareTextureLuminance(StringUtils::toAscii(path), texId);
+// break;
+// case Stroke::HUMID_MEDIUM:
+// case Stroke::OPAQUE_MEDIUM:
+// default:
+// //soc prepareTextureAlpha((const char*)path.toAscii(), texId);
+// prepareTextureAlpha(StringUtils::toAscii(path), texId);
+// break;
+// }
+// cout << "Done." << endl << endl;
+//
+// return texId;
+//
+ return 0;
+}
+
+
+
Added: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.h (rev 0)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.h 2009-10-18 17:06:29 UTC (rev 23919)
@@ -0,0 +1,23 @@
+#ifndef BLENDERTEXTUREMANAGER_H
+#define BLENDERTEXTUREMANAGER_H
+
+# include "../system/FreestyleConfig.h"
+# include "../stroke/StrokeRenderer.h"
+# include "../stroke/StrokeRep.h"
+
+/*! Class to load textures
+ */
+class LIB_RENDERING_EXPORT BlenderTextureManager : public TextureManager
+{
+ public:
+ BlenderTextureManager ();
+ virtual ~BlenderTextureManager ();
+protected:
+ virtual unsigned loadBrush(string fileName, Stroke::MediumType = Stroke::OPAQUE_MEDIUM);
+
+ protected:
+ virtual void loadStandardBrushes();
+
+};
+
+#endif // BLENDERTEXTUREMANAGER_H
More information about the Bf-blender-cvs
mailing list