Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2009-05-06 03:10:32 +0400
committerDiego Borghetti <bdiego@gmail.com>2009-05-06 03:10:32 +0400
commit405cf80eb8dc2df8ae160aee70aef34052add24a (patch)
treef03cc27e95bdf91b25ea9d2a0dffb28ccef666be /intern/bmfont/test
parent71c38978e14ebf3522fe60fc239ad04f10ef30ab (diff)
Big, big commit!!
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2 2) Remove the old bmfont 3) Remove ftfont and bFTGL library 4) Implement a new BLF_draw_default function for place that still need/use the old BMF api. I try to update both, scons and cmake, but I only can test with make, so hope all work fine. MSVC is broken, but I don't have Windows, things to search and fix are any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont). Always have to link/include the freetype2 library Remove any reference to libbmfont Remove any reference to libftfont Remove any reference to libbftgl (or libbFTGL)
Diffstat (limited to 'intern/bmfont/test')
-rw-r--r--intern/bmfont/test/Makefile60
-rw-r--r--intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp109
-rw-r--r--intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw44
-rw-r--r--intern/bmfont/test/simpletest/BMF_Test.cpp226
-rw-r--r--intern/bmfont/test/simpletest/Makefile42
5 files changed, 0 insertions, 481 deletions
diff --git a/intern/bmfont/test/Makefile b/intern/bmfont/test/Makefile
deleted file mode 100644
index 135db74f38b..00000000000
--- a/intern/bmfont/test/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# 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.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-# Test the bmfont module
-#
-
-LIBNAME = bmfont
-SOURCEDIR = intern/$(LIBNAME)/test
-DIR = $(OCGDIR)/$(SOURCEDIR)
-DIRS = simpletest
-
-include nan_subdirs.mk
-include nan_compile.mk
-include nan_link.mk
-
-TESTLIBS = $(OCGDIR)/intern/$(LIBNAME)/$(DEBUG_DIR)lib$(LIBNAME).a
-TESTLIBS += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
-TESTLIBS += $(LCGDIR)/ghost/$(DEBUG_DIR)lib/libghost.a
-
-
-ifeq ($(OS),$(findstring $(OS), "beos darwin linux freebsd openbsd"))
- TESTLIBS += -L/usr/X11R6/lib -lglut -pthread
-endif
-
-ifeq ($(OS),$(findstring $(OS), "solaris"))
- TESTLIBS += -L/usr/openwin/lib -lglut -lX11 -lGL -lGLU -lXmu
-endif
-
-
-all debug::
- @echo "****> linking $@ in $(SOURCEDIR)"
- $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)BMF_Test $(DIR)/BMF_Test.o $(TESTLIBS)
-
-clean::
- $(RM) $(DIR)/BMF_Test $(DIR)/debug/BMF_Test
-
-test:: $(DIR)/BMF_Test
- $(DIR)/BMF_Test $(NAN_TEST_VERBOSITY)
-
diff --git a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp b/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp
deleted file mode 100644
index d178f5b4dc1..00000000000
--- a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp
+++ /dev/null
@@ -1,109 +0,0 @@
-# Microsoft Developer Studio Project File - Name="BMF_Test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=BMF_Test - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "BMF_Test.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "BMF_Test.mak" CFG="BMF_Test - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "BMF_Test - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "BMF_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "BMF_Test - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test"
-# PROP Intermediate_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../../" /I "../../../../../lib/windows/string/include" /I "../../../../../lib/windows/ghost/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libstring.a libghost.a glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../../../lib/windows/string/lib" /libpath:"../../../../../lib/windows/ghost/lib"
-
-!ELSEIF "$(CFG)" == "BMF_Test - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test/debug"
-# PROP Intermediate_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../" /I "../../../../../lib/windows/string/include" /I "../../../../../lib/windows/ghost/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glu32.lib opengl32.lib libstring.a libghost.a user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../../../lib/windows/string/lib" /libpath:"../../../../../lib/windows/ghost/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "BMF_Test - Win32 Release"
-# Name "BMF_Test - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\..\intern\BMF_glut_helb8.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\intern\BMF_glut_helb8.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\BMF_Test.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw b/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw
deleted file mode 100644
index 321de497224..00000000000
--- a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw
+++ /dev/null
@@ -1,44 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "BMF_Test"=.\BMF_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name BMF_bmfont
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "BMF_bmfont"=..\..\..\make\msvc_6_0\BMF_bmfont.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/intern/bmfont/test/simpletest/BMF_Test.cpp b/intern/bmfont/test/simpletest/BMF_Test.cpp
deleted file mode 100644
index 93a55042a4f..00000000000
--- a/intern/bmfont/test/simpletest/BMF_Test.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * $Id$
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * 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.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/**
-
- * $Id$
- * Copyright (C) 2001 NaN Technologies B.V.
- * Simple test file for the bitmap font library using GHOST.
- * @author Maarten Gribnau
- * @date November 15, 2001
- */
-
-#include <iostream>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#define FALSE 0
-#define TRUE 1
-
-#if defined(WIN32) || defined(__APPLE__)
-#ifdef WIN32
-#include <windows.h>
-#include <GL/gl.h>
-#else // WIN32
-// __APPLE__ is defined
-#include <AGL/gl.h>
-#endif // WIN32
-#else // defined(WIN32) || defined(__APPLE__)
-#include <GL/gl.h>
-#endif // defined(WIN32) || defined(__APPLE__)
-
-
-#include "STR_String.h"
-#include "GHOST_Rect.h"
-
-#include "GHOST_ISystem.h"
-#include "GHOST_IEvent.h"
-#include "GHOST_IEventConsumer.h"
-
-#include "BMF_Api.h"
-
-static class Application* fApp;
-static GHOST_ISystem* fSystem = 0;
-
-
-static void drawGL()
-{
- GLint x = 10, y = 10;
-
- ::glRasterPos2i(x, y);
- BMF_Font *font = BMF_GetFont(BMF_kHelvetica10);
- BMF_DrawString(font, "Helvetica 10 point");
- y += 14;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kHelvetica12);
- BMF_DrawString(font, "Helvetica 12 point");
- y += 16;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kHelveticaBold8);
- BMF_DrawString(font, "Helvetica Bold 8 point");
- y += 12;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kHelveticaBold10);
- BMF_DrawString(font, "Helvetica Bold 10 point");
- y += 14;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kHelveticaBold12);
- BMF_DrawString(font, "Helvetica Bold 12 point");
- y += 16;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kHelveticaBold14);
- BMF_DrawString(font, "Helvetica Bold 14 point");
- y += 18;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kScreen12);
- BMF_DrawString(font, "Screen 12 point");
- y += 16;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kScreen14);
- BMF_DrawString(font, "Screen 14 point");
- y += 18;
- ::glRasterPos2i(x, y);
- font = BMF_GetFont(BMF_kScreen15);
- BMF_DrawString(font, "Screen 15 point");
-}
-
-
-static void setViewPortGL(GHOST_IWindow* window)
-{
- window->activateDrawingContext();
- GHOST_Rect bnds;
- window->getClientBounds(bnds);
-
- ::glViewport(0, 0, bnds.getWidth(), bnds.getHeight());
-
- ::glMatrixMode(GL_PROJECTION);
- ::glLoadIdentity();
- ::glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10);
-
- ::glClearColor(.2f,0.0f,0.0f,0.0f);
- ::glClear(GL_COLOR_BUFFER_BIT);
-}
-
-
-
-class Application : public GHOST_IEventConsumer {
-public:
- Application(GHOST_ISystem* system);
- virtual bool processEvent(GHOST_IEvent* event);
-
- GHOST_ISystem* m_system;
- GHOST_IWindow* m_mainWindow;
- bool m_exitRequested;
-};
-
-
-Application::Application(GHOST_ISystem* system)
- : m_system(system), m_mainWindow(0), m_exitRequested(false)
-{
- fApp = this;
-
- // Create the main window
- STR_String title1 ("gears - main window");
- m_mainWindow = system->createWindow(title1, 10, 64, 320, 200, GHOST_kWindowStateNormal, GHOST_kDrawingContextTypeOpenGL,FALSE);
- if (!m_mainWindow) {
- std::cout << "could not create main window\n";
- exit(-1);
- }
-}
-
-
-bool Application::processEvent(GHOST_IEvent* event)
-{
- bool handled = true;
-
- switch (event->getType()) {
- case GHOST_kEventWindowClose:
- {
- GHOST_IWindow* window2 = event->getWindow();
- if (window2 == m_mainWindow) {
- exit(0);
- } else {
- m_system->disposeWindow(window2);
- }
- }
- break;
-
- case GHOST_kEventWindowActivate:
- handled = false;
- break;
- case GHOST_kEventWindowDeactivate:
- handled = false;
- break;
- case GHOST_kEventWindowUpdate:
- {
- GHOST_IWindow* window2 = event->getWindow();
- if (!m_system->validWindow(window2)) break;
- {
- setViewPortGL(window2);
- drawGL();
- window2->swapBuffers();
- }
- }
- break;
-
- default:
- handled = false;
- break;
- }
- return handled;
-}
-
-
-int main(int /*argc*/, char** /*argv*/)
-{
- // Create the system
- GHOST_ISystem::createSystem();
- fSystem = GHOST_ISystem::getSystem();
-
- if (fSystem) {
- // Create an application object
- Application app (fSystem);
-
- // Add the application as event consumer
- fSystem->addEventConsumer(&app);
-
- // Enter main loop
- while (!app.m_exitRequested) {
- fSystem->processEvents(TRUE);
- fSystem->dispatchEvents();
- }
- }
-
- // Dispose the system
- GHOST_ISystem::disposeSystem();
-
- return 0;
-}
-
diff --git a/intern/bmfont/test/simpletest/Makefile b/intern/bmfont/test/simpletest/Makefile
deleted file mode 100644
index 5c5e32f2ed2..00000000000
--- a/intern/bmfont/test/simpletest/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# 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.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-# Test the bmfont module
-#
-
-LIBNAME = bmfont
-DIR = $(OCGDIR)/intern/$(LIBNAME)/test
-
-# we don't want a library here, only object files:
-ALLTARGETS = $(OBJS)
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_2_CPP_WARNINGS)
-
-CPPFLAGS = -I../..
-CPPFLAGS += -I../../intern
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_STRING)/include
-CPPFLAGS += -I$(NAN_GHOST)/include