# HG changeset patch # User John W. Eaton # Date 1212703237 14400 # Node ID e3a502930e2ab373fd0e923d351fc0abbae243c7 # Parent 02b590f46a29c43ca23a77b32170a6a1364172ae eliminate src/graphics subdirectory diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-05 John W. Eaton + + * configure.in: Add FT2_CFLAGS to XTRA_CXXFLAGS, not CXXFLAGS. + Don't add FT2_LIBS to LIBS. + Don't generate src/graphics/Makefile, src/graphics/Makerules, + src/graphics/opengl/Makefile, or src/graphics/fltk_backend/Makefile. + + * Makeconf.in (FT2_LIBS, GRAPHICS_LIBS): Substitute here. + 2008-06-04 Shai Ayal * configure.in: Use AC_TRY_LINK in FTGL test. diff --git a/Makeconf.in b/Makeconf.in --- a/Makeconf.in +++ b/Makeconf.in @@ -215,6 +215,8 @@ LIBREADLINE = @LIBREADLINE@ TERMLIBS = @TERMLIBS@ +FT2_LIBS = @FT2_LIBS@ +GRAPHICS_LIBS = @GRAPHICS_LIBS@ QHULL_LIBS = @QHULL_LIBS@ REGEX_LIBS = @REGEX_LIBS@ BLAS_LIBS = @BLAS_LIBS@ diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -664,11 +664,12 @@ OPENGL_LIBS="$OPENGL_LIBS $FT2_LIBS -lftgl" LIBS="$save_LIBS" AC_DEFINE(HAVE_FTGL, 1, [Define to 1 if FTGL is present]) - AC_MSG_RESULT(yes)],[ + AC_MSG_RESULT(yes) + XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FT2_CFLAGS"],[ + AC_MSG_RESULT(no)])],[ + warn_graphics="FTGL library not found. Native renderer will not have on-screen text"]) LIBS="$save_LIBS" CXXFLAGS="$save_CXXFLAGS" - AC_MSG_RESULT(no)])],[ - warn_graphics="FTGL library not found. Native renderer will not have on-screen text"]) AC_LANG_POP(C++) fi fi @@ -1961,9 +1962,7 @@ libcruft/qrupdate/Makefile libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile libcruft/villad/Makefile - libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile - src/graphics/Makefile src/graphics/Makerules - src/graphics/opengl/Makefile src/graphics/fltk_backend/Makefile]) + libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) AC_OUTPUT AC_CONFIG_COMMANDS([default-1],[[chmod +x install-octave]],[[]]) diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,21 @@ 2008-06-05 John W. Eaton + * gl-render.cc (opengl_renderer::draw): Correctly avoid shadow + warnings from gcc for xmin, xmax, ymin, ymax, zmin, and zmax. + + * graphics/ChangeLog, graphics/Makefile.in, graphics/Makerules.in, + graphics/fltk_backend/Makefile.in, graphics/opengl/Makefile.in: + Delete. + + * gl-render.cc, gl-render.h: Move here from src/graphics/opengl. + * Makefile.in: Add them to the appropriate lists. + (octave$(EXEEXT)): Also link with $(OPENGL_LIBS) + + * fltk_backend.cc: Move here from src/graphics/fltk_backend. + * Makefile.in (DLD_XSRC): Add it to the list + (fltk_backend.oct): Include special rules for linking with + $(GRAPHICS_LIBS) and $(FT2_LIBS). + * dynamic-ld.cc (octave_dynamic_loader::mex_mangler, octave_dynamic_loader::mex_uscore_mangler, octave_dynamic_loader::mex_f77_mangler): New functions. @@ -12,6 +28,192 @@ * graphics.cc (properties::update_normals): Style fixes. * graphics.h.in: Style fixes. + ChangeLog entries for gl-render.h, gl-render.cc, and + fltk_backend.cc before the move: + + 2008-06-05 John W. Eaton + + * opengl/gl-render.cc (xmin): New static function. + + * opengl/gl-render.h (opengl_renderer): Style fixes. + * fltk_backend/fltk_backend.cc: Style fixes. + + 2008-04-26 Michael Goffioul + + * opengl/gl-render.h (opengl_renderer::draw(hggroup)): New method. + * opengl/gl-render.cc (opengl_renderer::draw(hggroup)): Likewise. + (opengl_renderer::draw(graphics_object)): Call it. + + 2008-03-17 Shai Ayal + + * fltk_backend/fltk_backend.cc (plot_window::resize, + plot_window::draw): make canvas the size of figure.position + + 2008-03-09 Shai Ayal + + * fltk_backend/fltk_backend.cc (plot_window::handle): add zoom + stack + + 2008-03-06 Shai Ayal + + * fltk_backend/fltk_backend.cc (plot_window::handle): Add handling + of the 'a' and 'g' keys + (plot_window: toggle_grid): New helper function + (plot_window): Add new togglegrid button + + 2008-03-01 Shai Ayal + + * fltk_backend/fltk_backend.cc (OpenGL_fltk::draw_overlay, + OpenGL_fltk::zoom, OpenGL_fltk::set_zoom_box): Added to support + zoom box + (plot_window::handle): Added zoom box code, B-3 now does autoscale + (plot_window::axis_auto): New utility function to call axis("auto") + (plot_window::button_press): "A" button now does autoscale + + * opengl/gl-render.cc (make_marker_list): Add the "+x*.^v><" + markers + + 2008-02-27 Michael Goffioul + + * opengl/gl-render.cc (opengl_renderer::draw(patch), + opengl_renderer::draw(surface)): Adapt to type change of facealpha and + edgealpha, using double_radio_property class. + + 2008-02-26 Michael Goffioul + + * opengl/gl-render.h: Make sure windows.h is included before OpenGL + headers. + * fltk_backend/Makefile.in (FLTK_EXTRA_CXXFLAGS): Use $(srcdir) for + includesion of OpenGL renderer headers. + (Makeconf): Move inclusion of Makeconf later on, to avoid freezing + MinGW make. + + * fltk_backend/Makefile.in (GRAPHICS_CFLAGS): New substituted + variable. + + 2008-02-25 Shai Ayal + + * fltk_backend/fltk_backend.cc (class plot_window): Many changes + to use figure::properties instead of figure handle to reference + the figure + (class figure_manager): ditto + (__fltk_redraw__): moved most of functionality into the + figure_manager class + (plot_window::pixel2pos): Modified to use axes::pixel2coord + (plot_window::pixel2staus): Modified to use pixel2pos + (plot_window::handle): Added zoom with mouse + + 2008-02-24 Shai Ayal + + * fltk_backend/fltk_backend.cc (OpenGL_fltk::Draw): removed double + buffer switch + (OpenGL_fltk::setup_viewport): removed call to glOrtho -- + gl-render takes care of all the transformations + + 2008-02-23 Shai Ayal + + * fltk_backend/fltk_backend.cc (plot_window::mark_modifed): mark + the whole window as damaged (otherwise changing figure.postion + does not have immediate effect) + (plot_window::draw): New function, checks for window size + (__fltk_maxtime__): New DEFUN to allow tweaking of fltk timeout + (__fltk_redraw__): Use fltk_maxtime as timeout + + 2008-02-21 Michael Goffioul + + * opengl/gl-render.cc (opengl_renderer::patch_tesselator::combine): + Protect against NULL vertex data. + + * opengl/gl-render.cc (opengl_renderer::draw(patch)): Add marker + rendering of patch objects. + + 2008-02-21 Shai Ayal + + * opengl/gl-render.cc: remove OpenGL includes + * opengl/gl-render.h: add OpenGL includes + * fltk_backend/fltk_backend.cc: remove OpenGL includes + (__fltk_redraw__): put figure handle into the figure's + __plot_stream__ property for later + (fltk_backend::close_figure): use argument as figure handle to + close + + 2008-02-20 Shai Ayal + + * fltk_backend/Makefile.in: initial import + + * fltk_backend/fltk_backend.cc: initial import + + + 2008-02-20 Michael Goffioul + + * opengl/gl-render.h (opengl_renderer::draw(patch)): New method to + render patch objects. + (class opengl_renderer::patch_tesselator): Forward declaration. + * opengl/gl-render.cc (opengl_texture::create): Use RGB data format + instead of RGBA. + (class opengl_tesselator): New classes to abstract GLU tessellation + process. + (class opengl_renderer::patch_tesselator): New class to render opaque + patch objects. + (class vertex_data): New class to hold vertex data during tessellation + of patch objects. + (opengl_renderer::draw(patch)): New method to render patch objects (no + transparency, no border, no marker yet). + (opengl_renderer::draw(graphics_object)): Dispatch to it. + + * opengl/gl-render.cc (opengl_renderer::draw(patch)): Use patch color + data and support face/vertex single color specification. + + * opengl/gl-render.cc (opengl_tesselator::begin_polygon): Set + tessellation property also for non-filled polygons. + (opengl_renderer::patch_tesselator::vertex): Protect against empty + color matrices. + (opengl_renderer::draw(patch)): Render patch border (no transparency + yet). + + 2008-02-19 Michael Goffioul + + * opengl/gl-render.cc (opengl_texture::texture_rep::tex_coord, + opengl_texture::tex_coord): New wrapper around glTexCoord2d. + (opengl_renderer::draw(surface)): Use it for texturemap + implementation. + (opengl_renderer::draw(surface)): Fix indexing bug when creating clip + matrix. + (opengl_texture::operator=): Add assignment operator. + (opengl_texture::create): New static opengl_texture creator. + (opengl_texture::is_valid): New accessor. + + 2008-02-18 Michael Goffioul + + * opengl/gl-render.cc (class opengl_texture): New class to wrap + texture operations in OpenGL. + + 2008-02-17 Michael Goffioul + + * opengl/gl-render.cc (opengl_renderer::draw(surface)): Set material + color when rendering surface facets. + + * opengl/gl-render.cc (opengl_renderer::draw(surface)): Add rendering + of mesh and markers. + + 2008-02-16 Michael Goffioul + + * opengl/gl-render.cc (opengl_renderer::draw(figure)): Initialize the + OpenGL context correctly. + (opengl_renderer::draw(surface)): Add missing glEnd call. + + 2008-02-14 Michael Goffioul + + * opengl/gl-render.h opengl/gl-render.cc: Add rendering + interface for surface objects (actual implement still + missing). + + 2008-02-14 Michael Goffioul + + * Makefile.in Makerules.in: Initial import + * opengl/Makefile.in: Likewise. + * opengl/gl-render.h opengl/gl-render.cc: Likewise. + 2008-06-04 Shai Ayal * graphics.cc (axes::properties::set_defaults): Preserve position diff --git a/src/graphics/fltk_backend/fltk_backend.cc b/src/DLD-FUNCTIONS/fltk_backend.cc rename from src/graphics/fltk_backend/fltk_backend.cc rename to src/DLD-FUNCTIONS/fltk_backend.cc --- a/src/graphics/fltk_backend/fltk_backend.cc +++ b/src/DLD-FUNCTIONS/fltk_backend.cc @@ -1,6 +1,6 @@ /* -Copyright (C) 2007 Shai Ayal +Copyright (C) 2007, 2008 Shai Ayal This file is part of Octave. @@ -20,15 +20,26 @@ */ +/* + +To initialize: + + input_event_hook ("__fltk_redraw__"); + __init_fltk__ (); + set (gcf (), "__backend__", "fltk"); + plot (randn (1e3, 1)); + +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include #include -#ifdef HAVE_CONFIG_H -#include -#endif - #include "gl-render.h" #include @@ -793,15 +804,8 @@ return retval; } -/* to init -autoload("__init_fltk__",[pwd(),"/fltk_backend.oct"]) -autoload("__remove_fltk__",[pwd(),"/fltk_backend.oct"]) -autoload("__fltk_redraw__",[pwd(),"/fltk_backend.oct"]) -autoload("__fltk_maxtime__",[pwd(),"/fltk_backend.oct"]) -input_event_hook ("__fltk_redraw__"); -__init_fltk__ (); -set(gcf(),"__backend__","fltk") -plot(randn(1e3,1)); - - +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** */ diff --git a/src/Makefile.in b/src/Makefile.in --- a/src/Makefile.in +++ b/src/Makefile.in @@ -65,7 +65,8 @@ DLD_XSRC := amd.cc balance.cc besselj.cc betainc.cc bsxfun.cc cellfun.cc \ chol.cc ccolamd.cc colamd.cc colloc.cc conv2.cc convhulln.cc daspk.cc \ dasrt.cc dassl.cc det.cc dispatch.cc dlmread.cc dmperm.cc eig.cc \ - expm.cc fft.cc fft2.cc fftn.cc fftw.cc filter.cc find.cc fsolve.cc \ + expm.cc fft.cc fft2.cc fftn.cc fftw.cc filter.cc find.cc \ + fltk_backend.cc fsolve.cc \ gammainc.cc gcd.cc getgrent.cc getpwent.cc getrusage.cc \ givens.cc hess.cc hex2num.cc inv.cc kron.cc lookup.cc lsode.cc \ lu.cc luinc.cc matrix_type.cc max.cc md5sum.cc pinv.cc qr.cc \ @@ -117,8 +118,8 @@ INCLUDES := Cell.h base-list.h builtins.h c-file-ptr-stream.h \ comment-list.h debug.h defun-dld.h defun-int.h defun.h \ - dirfns.h dynamic-ld.h error.h file-io.h gripes.h help.h \ - input.h lex.h load-path.h load-save.h ls-hdf5.h \ + dirfns.h dynamic-ld.h error.h file-io.h gl-render.h \ + gripes.h help.h input.h lex.h load-path.h load-save.h ls-hdf5.h \ ls-mat-ascii.h ls-mat4.h ls-mat5.h ls-oct-ascii.h \ ls-oct-binary.h ls-utils.h mex.h mexproto.h oct-errno.h \ oct-fstrm.h oct-hist.h oct-iostrm.h oct-map.h oct-obj.h \ @@ -196,9 +197,9 @@ DIST_SRC := Cell.cc bitfcns.cc c-file-ptr-stream.cc comment-list.cc \ cutils.c data.cc debug.cc defaults.cc defun.cc dirfns.cc \ - dynamic-ld.cc error.cc file-io.cc graphics.cc gripes.cc \ - help.cc input.cc lex.l load-path.cc load-save.cc ls-hdf5.cc \ - ls-mat-ascii.cc ls-mat4.cc ls-mat5.cc ls-oct-ascii.cc \ + dynamic-ld.cc error.cc file-io.cc gl-render.cc graphics.cc \ + gripes.cc help.cc input.cc lex.l load-path.cc load-save.cc \ + ls-hdf5.cc ls-mat-ascii.cc ls-mat4.cc ls-mat5.cc ls-oct-ascii.cc \ ls-oct-binary.cc ls-utils.cc main.c mappers.cc matherr.c \ mex.cc oct-fstrm.cc oct-hist.cc oct-iostrm.cc oct-map.cc \ oct-obj.cc oct-prcstrm.cc oct-procbuf.cc oct-stream.cc \ @@ -348,7 +349,7 @@ $(OCTAVE_LIBS) \ $(LEXLIB) $(UMFPACK_LIBS) $(AMD_LIBS) $(CAMD_LIBS) $(COLAMD_LIBS) \ $(CHOLMOD_LIBS) $(CCOLAMD_LIBS) $(CXSPARSE_LIBS) $(BLAS_LIBS) \ - $(FFTW_LIBS) $(LIBS) $(FLIBS) + $(FFTW_LIBS) $(OPENGL_LIBS) $(LIBS) $(FLIBS) stmp-pic: pic @if [ -f stmp-pic ]; then \ @@ -633,6 +634,8 @@ $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(CURL_LIBS) __glpk__.oct : pic/__glpk__.o octave$(EXEEXT) $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS) + fltk_backend.oct : pic/fltk_backend.o octave$(EXEEXT) + $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GRAPHICS_LIBS) $(FT2_LIBS) else convhulln.oct : convhulln.o octave$(EXEEXT) $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(QHULL_LIBS) @@ -646,6 +649,8 @@ $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(CURL_LIBS) __glpk__.oct : __glpk__.o octave$(EXEEXT) $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS) + fltk_backend.oct : fltk_backend.o octave$(EXEEXT) + $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GRAPHICS_LIBS) $(FT2_LIBS) endif endif diff --git a/src/graphics/opengl/gl-render.cc b/src/gl-render.cc rename from src/graphics/opengl/gl-render.cc rename to src/gl-render.cc --- a/src/graphics/opengl/gl-render.cc +++ b/src/gl-render.cc @@ -1010,7 +1010,7 @@ xlabel_props.set_verticalalignment (xstate == AXE_VERT_DIR ? "bottom" : (zd*zv(2) <= 0 ? "top" : "bottom")); double angle = 0; - ColumnVector p = graphics_xform::xform_vector ((xmin+xmax)/2, yPlaneN, zPlane); + ColumnVector p = graphics_xform::xform_vector ((x_min+x_max)/2, yPlaneN, zPlane); if (tick_along_z) p(2) += (signum(zPlane-zPlaneN)*fz*xtickoffset); @@ -1197,7 +1197,7 @@ ylabel_props.set_verticalalignment (ystate == AXE_VERT_DIR ? "bottom" : (zd*zv(2) <= 0 ? "top" : "bottom")); double angle = 0; - ColumnVector p = graphics_xform::xform_vector (xPlaneN, (ymin+ymax)/2, zPlane); + ColumnVector p = graphics_xform::xform_vector (xPlaneN, (y_min+y_max)/2, zPlane); if (tick_along_z) p(2) += (signum(zPlane-zPlaneN)*fz*ytickoffset); @@ -1447,7 +1447,7 @@ if (xySym) { - p = graphics_xform::xform_vector (xPlaneN, yPlane, (zmin+zmax)/2); + p = graphics_xform::xform_vector (xPlaneN, yPlane, (z_min+z_max)/2); if (xisinf (fy)) p(0) += (signum(xPlaneN-xPlane)*fx*ztickoffset); else @@ -1455,7 +1455,7 @@ } else { - p = graphics_xform::xform_vector (xPlane, yPlaneN, (zmin+zmax)/2); + p = graphics_xform::xform_vector (xPlane, yPlaneN, (z_min+z_max)/2); if (xisinf (fx)) p(1) += (signum(yPlaneN-yPlane)*fy*ztickoffset); else @@ -1506,7 +1506,7 @@ title_props.set_position (p.extract_n(0, 3).transpose ()); } - set_clipbox (xmin, xmax, ymin, ymax, zmin, zmax); + set_clipbox (x_min, x_max, y_min, y_max, z_min, z_max); // Children @@ -2775,3 +2775,9 @@ return ID; } + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/ diff --git a/src/graphics/opengl/gl-render.h b/src/gl-render.h rename from src/graphics/opengl/gl-render.h rename to src/gl-render.h diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog deleted file mode 100644 --- a/src/graphics/ChangeLog +++ /dev/null @@ -1,182 +0,0 @@ -2008-06-05 John W. Eaton - - * opengl/gl-render.cc (xmin): New static function. - - * opengl/gl-render.h (opengl_renderer): Style fixes. - * fltk_backend/fltk_backend.cc: Style fixes. - -2008-04-26 Michael Goffioul - - * opengl/gl-render.h (opengl_renderer::draw(hggroup)): New method. - * opengl/gl-render.cc (opengl_renderer::draw(hggroup)): Likewise. - (opengl_renderer::draw(graphics_object)): Call it. - -2008-03-17 Shai Ayal - - * fltk_backend/fltk_backend.cc (plot_window::resize, - plot_window::draw): make canvas the size of figure.position - -2008-03-09 Shai Ayal - - * fltk_backend/fltk_backend.cc (plot_window::handle): add zoom - stack - -2008-03-06 Shai Ayal - - * fltk_backend/fltk_backend.cc (plot_window::handle): Add handling - of the 'a' and 'g' keys - (plot_window: toggle_grid): New helper function - (plot_window): Add new togglegrid button - -2008-03-01 Shai Ayal - - * fltk_backend/fltk_backend.cc (OpenGL_fltk::draw_overlay, - OpenGL_fltk::zoom, OpenGL_fltk::set_zoom_box): Added to support - zoom box - (plot_window::handle): Added zoom box code, B-3 now does autoscale - (plot_window::axis_auto): New utility function to call axis("auto") - (plot_window::button_press): "A" button now does autoscale - - * opengl/gl-render.cc (make_marker_list): Add the "+x*.^v><" - markers - -2008-02-27 Michael Goffioul - - * opengl/gl-render.cc (opengl_renderer::draw(patch), - opengl_renderer::draw(surface)): Adapt to type change of facealpha and - edgealpha, using double_radio_property class. - -2008-02-26 Michael Goffioul - - * opengl/gl-render.h: Make sure windows.h is included before OpenGL - headers. - * fltk_backend/Makefile.in (FLTK_EXTRA_CXXFLAGS): Use $(srcdir) for - includesion of OpenGL renderer headers. - (Makeconf): Move inclusion of Makeconf later on, to avoid freezing - MinGW make. - - * fltk_backend/Makefile.in (GRAPHICS_CFLAGS): New substituted - variable. - -2008-02-25 Shai Ayal - - * fltk_backend/fltk_backend.cc (class plot_window): Many changes - to use figure::properties instead of figure handle to reference - the figure - (class figure_manager): ditto - (__fltk_redraw__): moved most of functionality into the - figure_manager class - (plot_window::pixel2pos): Modified to use axes::pixel2coord - (plot_window::pixel2staus): Modified to use pixel2pos - (plot_window::handle): Added zoom with mouse - -2008-02-24 Shai Ayal - - * fltk_backend/fltk_backend.cc (OpenGL_fltk::Draw): removed double - buffer switch - (OpenGL_fltk::setup_viewport): removed call to glOrtho -- - gl-render takes care of all the transformations - -2008-02-23 Shai Ayal - - * fltk_backend/fltk_backend.cc (plot_window::mark_modifed): mark - the whole window as damaged (otherwise changing figure.postion - does not have immediate effect) - (plot_window::draw): New function, checks for window size - (__fltk_maxtime__): New DEFUN to allow tweaking of fltk timeout - (__fltk_redraw__): Use fltk_maxtime as timeout - -2008-02-21 Michael Goffioul - - * opengl/gl-render.cc (opengl_renderer::patch_tesselator::combine): - Protect against NULL vertex data. - - * opengl/gl-render.cc (opengl_renderer::draw(patch)): Add marker - rendering of patch objects. - -2008-02-21 Shai Ayal - - * opengl/gl-render.cc: remove OpenGL includes - * opengl/gl-render.h: add OpenGL includes - * fltk_backend/fltk_backend.cc: remove OpenGL includes - (__fltk_redraw__): put figure handle into the figure's - __plot_stream__ property for later - (fltk_backend::close_figure): use argument as figure handle to - close - -2008-02-20 Shai Ayal - - * fltk_backend/Makefile.in: initial import - - * fltk_backend/fltk_backend.cc: initial import - - -2008-02-20 Michael Goffioul - - * opengl/gl-render.h (opengl_renderer::draw(patch)): New method to - render patch objects. - (class opengl_renderer::patch_tesselator): Forward declaration. - * opengl/gl-render.cc (opengl_texture::create): Use RGB data format - instead of RGBA. - (class opengl_tesselator): New classes to abstract GLU tessellation - process. - (class opengl_renderer::patch_tesselator): New class to render opaque - patch objects. - (class vertex_data): New class to hold vertex data during tessellation - of patch objects. - (opengl_renderer::draw(patch)): New method to render patch objects (no - transparency, no border, no marker yet). - (opengl_renderer::draw(graphics_object)): Dispatch to it. - - * opengl/gl-render.cc (opengl_renderer::draw(patch)): Use patch color - data and support face/vertex single color specification. - - * opengl/gl-render.cc (opengl_tesselator::begin_polygon): Set - tessellation property also for non-filled polygons. - (opengl_renderer::patch_tesselator::vertex): Protect against empty - color matrices. - (opengl_renderer::draw(patch)): Render patch border (no transparency - yet). - -2008-02-19 Michael Goffioul - - * opengl/gl-render.cc (opengl_texture::texture_rep::tex_coord, - opengl_texture::tex_coord): New wrapper around glTexCoord2d. - (opengl_renderer::draw(surface)): Use it for texturemap - implementation. - (opengl_renderer::draw(surface)): Fix indexing bug when creating clip - matrix. - (opengl_texture::operator=): Add assignment operator. - (opengl_texture::create): New static opengl_texture creator. - (opengl_texture::is_valid): New accessor. - -2008-02-18 Michael Goffioul - - * opengl/gl-render.cc (class opengl_texture): New class to wrap - texture operations in OpenGL. - -2008-02-17 Michael Goffioul - - * opengl/gl-render.cc (opengl_renderer::draw(surface)): Set material - color when rendering surface facets. - - * opengl/gl-render.cc (opengl_renderer::draw(surface)): Add rendering - of mesh and markers. - -2008-02-16 Michael Goffioul - - * opengl/gl-render.cc (opengl_renderer::draw(figure)): Initialize the - OpenGL context correctly. - (opengl_renderer::draw(surface)): Add missing glEnd call. - -2008-02-14 Michael Goffioul - - * opengl/gl-render.h opengl/gl-render.cc: Add rendering - interface for surface objects (actual implement still - missing). - -2008-06-04 Michael Goffioul - - * Makefile.in Makerules.in: Initial import - * opengl/Makefile.in: Likewise. - * opengl/gl-render.h opengl/gl-render.cc: Likewise. diff --git a/src/graphics/Makefile.in b/src/graphics/Makefile.in deleted file mode 100644 --- a/src/graphics/Makefile.in +++ /dev/null @@ -1,70 +0,0 @@ -# Makefile for octave's src/graphics directory -# -# Copyright (C) 2008 John W. Eaton -# -# This file is part of Octave. -# -# Octave 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 3 of the License, or (at -# your option) any later version. -# -# Octave 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 Octave; see the file COPYING. If not, see -# . - -TOPDIR = ../.. - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -GRAPHICS_DIRS = @GRAPHICS_OPENGL@ - -SUBDIRS = $(GRAPHICS_DIRS) - -DISTSUBDIRS = $(GRAPHICS_DIRS) - -CLEAN_SUBDIRS = $(DISTSUBDIRS) - -DISTFILES = Makefile.in Makerules.in - -all: $(SUBDIRS) -.PHONY: all - -$(SUBDIRS): - $(MAKE) -C $@ all -.PHONY: $(SUBDIRS) - -check: all -.PHONY: check - -install install-strip uninstall:: - @$(subdir-for-command) - -clean mostlyclean distclean maintainer-clean:: - @$(foreach d, $(CLEAN_SUBDIRS), $(do-subdir-for-command)) - -install-strip:: - $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install - -tags TAGS:: $(SOURCES) - $(SUBDIR_FOR_COMMAND) - -dist: - for dir in $(DISTSUBDIRS); do mkdir $(TOPDIR)/`cat $(TOPDIR)/.fname`/src/graphics/$$dir; $(MAKE) -C $$dir $@; done - ln $(addprefix $(srcdir)/, $(DISTFILES)) $(TOPDIR)/`cat $(TOPDIR)/.fname`/src/graphics -.PHONY: dist - -.NOTPARALLEL: diff --git a/src/graphics/Makerules.in b/src/graphics/Makerules.in deleted file mode 100644 --- a/src/graphics/Makerules.in +++ /dev/null @@ -1,221 +0,0 @@ -# Makefile for octave's src/graphics directory -# -# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave 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 3 of the License, or (at -# your option) any later version. -# -# Octave 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 Octave; see the file COPYING. If not, see -# . - -include $(TOPDIR)/Makeconf - -DLL_CDEFS = @OCTGRAPHICS_DLL_DEFS@ -DLL_CXXDEFS = @OCTGRAPHICS_DLL_DEFS@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -PT_FLAGS = -fexternal-templates -fno-implicit-templates -CXXFLAGS_NO_PT_FLAGS = $(filter-out $(PT_FLAGS), $(ALL_CXXFLAGS)) - -OCTGRAPHICS_INCS = $(GRAPHICS_INCS) - -OCTGRAPHICS_SRC = $(GRAPHICS_SRC) - -OCTGRAPHICS_BASE = $(basename $(notdir $(OCTGRAPHICS_SRC))) - -OCTGRAPHICS_OBJ = $(addsuffix .o, $(OCTGRAPHICS_BASE)) - -ifeq ($(SHARED_LIBS), true) - ifdef CXXPICFLAG - OCTGRAPHICS_PICOBJ := $(addprefix pic/, $(OCTGRAPHICS_OBJ)) - else - OCTGRAPHICS_PICOBJ := $(OCTGRAPHICS_OBJ) - endif -endif - -SOURCES := $(OCTGRAPHICS_SRC) - -# Ugh. - -DEP_1 := $(OCTGRAPHICS_SRC) -MAKEDEPS := $(patsubst %.cc, %.d, $(DEP_1)) - -OCTGRAPHICS_LINK_DEPS = \ - -L$(TOPDIR)/src $(LIBOCTINTERP) -L$(TOPDIR)/liboctave $(LIBOCTAVE) \ - -L$(TOPDIR)/libcruft $(LIBCRUFT) $(GRAPHICS_EXTRA_LIBS) $(LIBS) $(FLIBS) - -DISTFILES = $(OCTGRAPHICS_SRC) $(OCTGRAPHICS_INCS) \ - $(addprefix $(srcdir)/, Makefile.in $(SPECIAL)) - -CWD = $(shell pwd) -THISDIR = $(notdir $(CWD)) - -ifeq ($(SHARED_LIBS), true) - ifeq ($(STATIC_LIBS), true) - LIBRARIES = $(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT) $(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT_VER) - else - LIBRARIES = $(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT_VER) - endif -else - ifeq ($(STATIC_LIBS), true) - LIBRARIES = $(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT) - else - ## This is not going to work, but hey, you asked for it... - LIBRARIES = - endif -endif - -all: $(LIBRARIES) -.PHONY: all - -objects: $(OCTGRAPHICS_OBJ) - -libraries: $(LIBRARIES) -.PHONY: libraries - -$(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT): $(OCTGRAPHICS_OBJ) - rm -f $@ - $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ - $(RANLIB) $@ - -$(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT_VER): $(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT) - rm -f $@ - $(LN_S) $< $@ - -$(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT): $(OCTGRAPHICS_PICOBJ) - rm -f $@ - $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTGRAPHICS_LINK_DEPS) - -stmp-pic: pic - @if [ -f stmp-pic ]; then \ - true; \ - else \ - echo "touch stmp-pic"; \ - touch stmp-pic; \ - fi - -pic: - @if [ -d pic ]; then \ - true; \ - else \ - echo "mkdir pic"; \ - mkdir pic; \ - fi - -$(OCTGRAPHICS_PICOBJ): stmp-pic - -PREREQ := $(GRAPHICS_PREREQ) - -$(MAKEDEPS): $(PREREQ) - -check: all -.PHONY: check - -install: install-bin install-lib install-inc -.PHONY: install - -install-strip: - $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install -.PHONY: install-strip - -install-bin: -.PHONY: install-bin - -install-lib: - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(octlibdir) - if $(STATIC_LIBS); then \ - rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT); \ - $(INSTALL_DATA) $(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT) \ - $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT); \ - $(RANLIB) $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT); \ - fi - if $(SHARED_LIBS); then \ - rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT_VER); \ - $(INSTALL) $(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB) \ - $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB_VER); \ - rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB); \ - (cd $(DESTDIR)$(octlibdir) ; $(LN_S) $(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB_VER) $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB)); \ - if test x$(SHLBIN) != x ; then \ - rm -f $(DESTDIR)$(bindir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLBIN); \ - $(INSTALL_PROGRAM) \ - $(LIBPRE)$(GRAPHICS_NAME).$(SHLBIN) $(DESTDIR)$(bindir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLBIN); \ - fi; \ - fi -.PHONY: install-lib - -install-inc: - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(octincludedir)/octave - for f in $(OCTGRAPHICS_INCS); do \ - rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \ - if [ -f $$f ]; then \ - $(INSTALL_DATA) $$f $(DESTDIR)$(octincludedir)/octave/$$f; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(octincludedir)/octave/$$f; \ - fi ; \ - done -.PHONY: install-inc - -uninstall: - rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT) - rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB) - rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLLIB_VER) - if test x$(SHLBIN) != x ; then \ - rm -f $(DESTDIR)$(bindir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLBIN); \ - rm -f $(DESTDIR)$(bindir)/$(LIBPRE)$(GRAPHICS_NAME).$(SHLBIN_VER); \ - fi - for f in $(OCTGRAPHICS_INCS); do \ - rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \ - done - -rmdir $(DESTDIR)$(octincludedir)/octave - -rmdir $(DESTDIR)$(octincludedir) - -rmdir $(DESTDIR)$(octlibdir) - -rmdir $(DESTDIR)$(octfiledir) -.PHONY: uninstall - -tags: $(SOURCES) $(DLD_SRC) - ctags $(SOURCES) $(DLD_SRC) - -TAGS: $(SOURCES) $(DLD_SRC) - etags $(SOURCES) $(DLD_SRC) - -clean mostlyclean distclean maintainer-clean:: - rm -f $(MAKEDEPS) $(OCTGRAPHICS_OBJ) $(OCTGRAPHICS_PICOBJ) - -rmdir pic - rm -f stmp-pic -.PHONY: clean mostlyclean - -clean:: - rm -f $(LIBPRE)$(GRAPHICS_NAME).$(LIBEXT) - rm -f $(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT_VER) $(LIBPRE)$(GRAPHICS_NAME).$(SHLEXT) - -distclean maintainer-clean:: - rm -f Makefile -.PHONY: distclean - -maintainer-clean:: - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(EXTERNAL_DISTFILES) $(TOPDIR)/`cat $(TOPDIR)/.fname`/src/graphics/$(THISDIR) -.PHONY: dist - -ifdef omit_deps -.PHONY: $(MAKEDEPS) -endif - --include $(MAKEDEPS) diff --git a/src/graphics/fltk_backend/Makefile.in b/src/graphics/fltk_backend/Makefile.in deleted file mode 100644 --- a/src/graphics/fltk_backend/Makefile.in +++ /dev/null @@ -1,77 +0,0 @@ -# Makefile for octave's src/graphics/opengl directory -# -# Copyright (C) 1998, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave 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 3 of the License, or (at -# your option) any later version. -# -# Octave 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 Octave; see the file COPYING. If not, see -# . - -TOPDIR = ../../.. - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -GRAPHICS_LIBS = @GRAPHICS_LIBS@ -GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@ - -include $(TOPDIR)/Makeconf - -FLTK_EXTRA_LIBS = $(OPENGL_LIBS) $(GRAPHICS_LIBS) -FLTK_EXTRA_CXXFLAGS = $(GRAPHICS_CFLAGS) -I$(srcdir)/../opengl - -FLTK_NAME = fltk_backend - -FLTK_SRC := fltk_backend.cc -FLTK_OBJ := $(patsubst %.cc, %.o, $(FLTK_SRC)) - -%.o : %.cc - $(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $(FLTK_EXTRA_CXXFLAGS) $< -o $@ - -# Some stupid egreps don't like empty elements in alternation patterns, -# so we have to repeat ourselves because some stupid egreps don't like -# empty elements in alternation patterns. - -DEFUN_PATTERN = "^[ \t]*DEF(CONSTFUN|CMD|UN|UN_DLD|UNX_DLD|UN_TEXT|UN_MAPPER)[ \t]*\\(" - -DLD_DEF_FILES := $(patsubst %.cc, %.df, $(FLTK_SRC)) - -OCTAVE_LFLAGS = -L$(TOPDIR)/liboctave -L$(TOPDIR)/libcruft \ - -L$(TOPDIR)/src $(RLD_FLAG) - -ifeq ($(ENABLE_DYNAMIC_LINKING), true) - OCTAVE_LIBS = $(LIBOCTINTERP) $(LIBOCTAVE) \ - $(SPECIAL_MATH_LIB) $(LIBCRUFT) \ - $(LIBPLPLOT) $(LIBGLOB) -else - OCTAVE_LIBS = $(LIBOCTINTERP) $(LIBOCTAVE) $(QHULL_LIBS) \ - $(GLPK_LIBS) $(REGEX_LIBS) $(SPECIAL_MATH_LIB) $(LIBCRUFT) \ - $(LIBPLPLOT) $(LIBGLOB) -endif - -OCT_LINK_DEPS = \ - -L../../../libcruft $(LIBCRUFT) -L../../../liboctave $(LIBOCTAVE) \ - -L../../ $(LIBOCTINTERP) -L../opengl -loctgraphics_gl $(CHOLMOD_LIBS) $(UMFPACK_LIBS) $(AMD_LIBS) \ - $(CAMD_LIBS) $(COLAMD_LIBS) $(CCOLAMD_LIBS) $(CXSPARSE_LIBS) $(BLAS_LIBS) \ - $(FFTW_LIBS) $(LIBS) $(FLIBS) $(FLTK_EXTRA_LIBS) $(GRAPHICS_LIBS) - - -fltk_backend.oct : fltk_backend.o - $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) - -test_stuff.oct : test_stuff.o - $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) - -all : fltk_backend.oct diff --git a/src/graphics/opengl/Makefile.in b/src/graphics/opengl/Makefile.in deleted file mode 100644 --- a/src/graphics/opengl/Makefile.in +++ /dev/null @@ -1,37 +0,0 @@ -# Makefile for octave's src/graphics/opengl directory -# -# Copyright (C) 1998, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave 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 3 of the License, or (at -# your option) any later version. -# -# Octave 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 Octave; see the file COPYING. If not, see -# . - -TOPDIR = ../../.. - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -EXTERNAL_DISTFILES = $(DISTFILES) - -GRAPHICS_NAME = octgraphics_gl - -GRAPHICS_SRC = gl-render.cc - -GRAPHICS_INCS = gl-render.h - -GRAPHICS_EXTRA_LIBS = $(OPENGL_LIBS) - -include ../Makerules