From e912de25877304e1e0a9e5453d1a182e11ba01da Mon Sep 17 00:00:00 2001 From: pradeep Date: Fri, 25 Mar 2016 08:39:57 +0530 Subject: [PATCH] Rename enums --- examples/cpu/bubblechart.cpp | 6 ++--- examples/cpu/histogram.cpp | 2 +- examples/cpu/plot3.cpp | 2 +- examples/cpu/plotting.cpp | 8 +++--- examples/cpu/surface.cpp | 2 +- examples/cuda/histogram.cu | 2 +- examples/cuda/plot3.cu | 2 +- examples/cuda/plotting.cu | 8 +++--- examples/cuda/surface.cu | 2 +- examples/opencl/histogram.cpp | 2 +- examples/opencl/plot3.cpp | 2 +- examples/opencl/plotting.cpp | 8 +++--- examples/opencl/surface.cpp | 2 +- include/fg/chart.h | 4 +-- include/fg/defines.h | 42 ++++++++++++++--------------- include/fg/plot.h | 2 +- include/fg/surface.h | 2 +- src/api/c/chart.cpp | 30 ++++++++++----------- src/api/c/font.cpp | 8 +++--- src/api/c/histogram.cpp | 20 +++++++------- src/api/c/image.cpp | 22 ++++++++-------- src/api/c/plot.cpp | 26 +++++++++--------- src/api/c/surface.cpp | 20 +++++++------- src/api/c/window.cpp | 44 +++++++++++++++---------------- src/api/cpp/chart.cpp | 10 +++---- src/backend/Chart.hpp | 4 +-- src/backend/chart_renderables.hpp | 10 +++---- src/backend/opengl/plot.cpp | 4 +-- src/backend/opengl/surface.cpp | 4 +-- src/backend/opengl/surface.hpp | 2 +- src/backend/opengl/window.cpp | 14 +++++----- 31 files changed, 158 insertions(+), 158 deletions(-) diff --git a/examples/cpu/bubblechart.cpp b/examples/cpu/bubblechart.cpp index 4a92c125..71f8aadb 100644 --- a/examples/cpu/bubblechart.cpp +++ b/examples/cpu/bubblechart.cpp @@ -73,16 +73,16 @@ int main(void) fg::Window wnd(DIMX, DIMY, "Bubble chart with Transparency Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); chart.setAxesLimits(FRANGE_START, FRANGE_END, -1.1f, 1.1f); /* Create several plot objects which creates the necessary * vertex buffer objects to hold the different plot types */ fg::Plot plt1 = chart.plot(cosData.size()/2, f32, - FG_LINE, FG_TRIANGLE); //or specify a specific plot type + FG_PLOT_LINE, FG_MARKER_TRIANGLE); //or specify a specific plot type fg::Plot plt2 = chart.plot(tanData.size()/2, f32, - FG_LINE, FG_CIRCLE); //last parameter specifies marker shape + FG_PLOT_LINE, FG_MARKER_CIRCLE); //last parameter specifies marker shape /* Set plot colors */ plt1.setColor(FG_RED); diff --git a/examples/cpu/histogram.cpp b/examples/cpu/histogram.cpp index 851b1959..f5facbad 100644 --- a/examples/cpu/histogram.cpp +++ b/examples/cpu/histogram.cpp @@ -68,7 +68,7 @@ int main(void) fg::Image img(IMGW, IMGH, FG_RGBA, u8); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); /* set x axis limits to maximum and minimum values of data * and y axis limits to range [0, number of pixels ideally] * but practically total number of pixels as y range will skew diff --git a/examples/cpu/plot3.cpp b/examples/cpu/plot3.cpp index a8d9ba89..33f39259 100644 --- a/examples/cpu/plot3.cpp +++ b/examples/cpu/plot3.cpp @@ -45,7 +45,7 @@ int main(void) fg::Window wnd(DIMX, DIMY, "Plot3d Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_3D); + fg::Chart chart(FG_CHART_3D); chart.setAxesLimits(-1.1f, 1.1f, -1.1f, 1.1f, 0.f, 10.f); chart.setAxesTitles("x-axis", "y-axis", "z-axis"); diff --git a/examples/cpu/plotting.cpp b/examples/cpu/plotting.cpp index 3c2941a5..e8793ada 100644 --- a/examples/cpu/plotting.cpp +++ b/examples/cpu/plotting.cpp @@ -51,16 +51,16 @@ int main(void) fg::Window wnd(DIMX, DIMY, "Plotting Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); chart.setAxesLimits(FRANGE_START, FRANGE_END, -1.1f, 1.1f); /* Create several plot objects which creates the necessary * vertex buffer objects to hold the different plot types */ fg::Plot plt0 = chart.plot(sinData.size()/2, f32); //create a default plot - fg::Plot plt1 = chart.plot(cosData.size()/2, f32, FG_LINE, FG_NONE); //or specify a specific plot type - fg::Plot plt2 = chart.plot(tanData.size()/2, f32, FG_LINE, FG_TRIANGLE); //last parameter specifies marker shape - fg::Plot plt3 = chart.plot(logData.size()/2, f32, FG_SCATTER, FG_CROSS); + fg::Plot plt1 = chart.plot(cosData.size()/2, f32, FG_PLOT_LINE, FG_MARKER_NONE); //or specify a specific plot type + fg::Plot plt2 = chart.plot(tanData.size()/2, f32, FG_PLOT_LINE, FG_MARKER_TRIANGLE); //last parameter specifies marker shape + fg::Plot plt3 = chart.plot(logData.size()/2, f32, FG_PLOT_SCATTER, FG_MARKER_CROSS); /* * Set plot colors diff --git a/examples/cpu/surface.cpp b/examples/cpu/surface.cpp index fd8c0fb8..19f4c7ea 100644 --- a/examples/cpu/surface.cpp +++ b/examples/cpu/surface.cpp @@ -48,7 +48,7 @@ int main(void) fg::Window wnd(1024, 768, "3d Surface Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_3D); + fg::Chart chart(FG_CHART_3D); chart.setAxesLimits(-10.f, 10.f, -10.f, 10.f, -0.5f, 1.f); chart.setAxesTitles("x-axis", "y-axis", "z-axis"); diff --git a/examples/cuda/histogram.cu b/examples/cuda/histogram.cu index 3aea6ae3..7e1faa0d 100644 --- a/examples/cuda/histogram.cu +++ b/examples/cuda/histogram.cu @@ -79,7 +79,7 @@ int main(void) fg::Image img(IMGW, IMGH, FG_RGBA, u8); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); /* set x axis limits to maximum and minimum values of data * and y axis limits to range [0, number of pixels ideally] * but practically total number of pixels as y range will skew diff --git a/examples/cuda/plot3.cu b/examples/cuda/plot3.cu index 55f5914e..0841c37c 100644 --- a/examples/cuda/plot3.cu +++ b/examples/cuda/plot3.cu @@ -37,7 +37,7 @@ int main(void) fg::Window wnd(DIMX, DIMY, "Plot 3d Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_3D); + fg::Chart chart(FG_CHART_3D); chart.setAxesLimits(-1.1f, 1.1f, -1.1f, 1.1f, 0.f, 10.f); chart.setAxesTitles("x-axis", "y-axis", "z-axis"); diff --git a/examples/cuda/plotting.cu b/examples/cuda/plotting.cu index 8bddfa81..f5aeebb2 100644 --- a/examples/cuda/plotting.cu +++ b/examples/cuda/plotting.cu @@ -31,16 +31,16 @@ int main(void) wnd.makeCurrent(); wnd.grid(1,2); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); chart.setAxesLimits(FRANGE_START, FRANGE_END, -1.1f, 1.1f); /* Create several plot objects which creates the necessary * vertex buffer objects to hold the different plot types */ fg::Plot plt0 = chart.plot( DATA_SIZE, f32); //create a default plot - fg::Plot plt1 = chart.plot( DATA_SIZE, f32, FG_LINE, FG_NONE); //or specify a specific plot type - fg::Plot plt2 = chart.plot( DATA_SIZE, f32, FG_LINE, FG_TRIANGLE); //last parameter specifies marker shape - fg::Plot plt3 = chart.plot( DATA_SIZE, f32, FG_SCATTER, FG_CROSS); + fg::Plot plt1 = chart.plot( DATA_SIZE, f32, FG_PLOT_LINE, FG_MARKER_NONE); //or specify a specific plot type + fg::Plot plt2 = chart.plot( DATA_SIZE, f32, FG_PLOT_LINE, FG_MARKER_TRIANGLE); //last parameter specifies marker shape + fg::Plot plt3 = chart.plot( DATA_SIZE, f32, FG_PLOT_SCATTER, FG_MARKER_CROSS); /* * Set plot colors diff --git a/examples/cuda/surface.cu b/examples/cuda/surface.cu index e727a8d5..7f477080 100644 --- a/examples/cuda/surface.cu +++ b/examples/cuda/surface.cu @@ -28,7 +28,7 @@ int main(void) fg::Window wnd(1024, 768, "3d Surface Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_3D); + fg::Chart chart(FG_CHART_3D); chart.setAxesLimits(-10.f, 10.f, -10.f, 10.f, -0.5f, 1.f); chart.setAxesTitles("x-axis", "y-axis", "z-axis"); diff --git a/examples/opencl/histogram.cpp b/examples/opencl/histogram.cpp index 9f29e071..5c58b7d7 100644 --- a/examples/opencl/histogram.cpp +++ b/examples/opencl/histogram.cpp @@ -274,7 +274,7 @@ int main(void) fg::Image img(IMGW, IMGH, FG_RGBA, u8); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); /* set x axis limits to maximum and minimum values of data * and y axis limits to range [0, number of pixels ideally] * but practically total number of pixels as y range will skew diff --git a/examples/opencl/plot3.cpp b/examples/opencl/plot3.cpp index b774c882..58c5108f 100644 --- a/examples/opencl/plot3.cpp +++ b/examples/opencl/plot3.cpp @@ -83,7 +83,7 @@ int main(void) fg::Window wnd(DIMX, DIMY, "Plot3d Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_3D); + fg::Chart chart(FG_CHART_3D); chart.setAxesLimits(-1.1f, 1.1f, -1.1f, 1.1f, 0.f, 10.f); chart.setAxesTitles("x-axis", "y-axis", "z-axis"); diff --git a/examples/opencl/plotting.cpp b/examples/opencl/plotting.cpp index c160faad..fc3c7d21 100644 --- a/examples/opencl/plotting.cpp +++ b/examples/opencl/plotting.cpp @@ -86,16 +86,16 @@ int main(void) fg::Window wnd(DIMX, DIMY, "Plotting Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_2D); + fg::Chart chart(FG_CHART_2D); chart.setAxesLimits(FRANGE_START, FRANGE_END, -1.1f, 1.1f); /* Create several plot objects which creates the necessary * vertex buffer objects to hold the different plot types */ fg::Plot plt0 = chart.plot(DATA_SIZE, f32); //create a default plot - fg::Plot plt1 = chart.plot(DATA_SIZE, f32, FG_LINE, FG_NONE); //or specify a specific plot type - fg::Plot plt2 = chart.plot(DATA_SIZE, f32, FG_LINE, FG_TRIANGLE); //last parameter specifies marker shape - fg::Plot plt3 = chart.plot(DATA_SIZE, f32, FG_SCATTER, FG_CROSS); + fg::Plot plt1 = chart.plot(DATA_SIZE, f32, FG_PLOT_LINE, FG_MARKER_NONE); //or specify a specific plot type + fg::Plot plt2 = chart.plot(DATA_SIZE, f32, FG_PLOT_LINE, FG_MARKER_TRIANGLE); //last parameter specifies marker shape + fg::Plot plt3 = chart.plot(DATA_SIZE, f32, FG_PLOT_SCATTER, FG_MARKER_CROSS); /* * Set plot colors diff --git a/examples/opencl/surface.cpp b/examples/opencl/surface.cpp index e4815bb3..2857ebd5 100644 --- a/examples/opencl/surface.cpp +++ b/examples/opencl/surface.cpp @@ -109,7 +109,7 @@ int main(void) fg::Window wnd(1024, 768, "3d Surface Demo"); wnd.makeCurrent(); - fg::Chart chart(FG_3D); + fg::Chart chart(FG_CHART_3D); chart.setAxesLimits(-10.f, 10.f, -10.f, 10.f, -0.5f, 1.f); chart.setAxesTitles("x-axis", "y-axis", "z-axis"); diff --git a/include/fg/chart.h b/include/fg/chart.h index 76cb7d73..88b1f2b9 100644 --- a/include/fg/chart.h +++ b/include/fg/chart.h @@ -197,7 +197,7 @@ class Chart { the values of \ref MarkerType. */ FGAPI Plot plot(const uint pNumPoints, const dtype pDataType, - const PlotType pPlotType=FG_LINE, const MarkerType pMarkerType=FG_NONE); + const PlotType pPlotType=FG_PLOT_LINE, const MarkerType pMarkerType=FG_MARKER_NONE); /** Create and add an Plot object to the current chart @@ -211,7 +211,7 @@ class Chart { \param[in] pMarkerType is the type of \ref MarkerType to draw for \ref FG_SCATTER plot type */ FGAPI Surface surface(const uint pNumXPoints, const uint pNumYPoints, const dtype pDataType, - const PlotType pPlotType=FG_SURFACE, const MarkerType pMarkerType=FG_NONE); + const PlotType pPlotType=FG_PLOT_SURFACE, const MarkerType pMarkerType=FG_MARKER_NONE); /** Render the chart to given window diff --git a/include/fg/defines.h b/include/fg/defines.h index 70ac96c7..21ebd195 100644 --- a/include/fg/defines.h +++ b/include/fg/defines.h @@ -60,7 +60,7 @@ typedef unsigned short ushort; typedef unsigned char uchar; typedef enum { - FG_SUCCESS = 0, ///< Fuction returned successfully. + FG_ERR_NONE = 0, ///< Fuction returned successfully. /* * Arguement related error codes that are * generated when invalid arguments are @@ -128,8 +128,8 @@ typedef enum { } fg_channel_format; typedef enum { - FG_2D = 2, ///< Two dimensional charts - FG_3D = 3 ///< Three dimensional charts + FG_CHART_2D = 2, ///< Two dimensional charts + FG_CHART_3D = 3 ///< Three dimensional charts } fg_chart_type; /** @@ -138,13 +138,13 @@ typedef enum { \image html gfx_palette.png */ typedef enum { - FG_DEFAULT_MAP = 0, ///< Default [0-255] grayscale colormap - FG_SPECTRUM_MAP = 1, ///< Spectrum color - FG_COLORS_MAP = 2, ///< Pure Colors - FG_RED_MAP = 3, ///< Red color map - FG_MOOD_MAP = 4, ///< Mood color map - FG_HEAT_MAP = 5, ///< Heat color map - FG_BLUE_MAP = 6 ///< Blue color map + FG_COLOR_MAP_DEFAULT = 0, ///< Default [0-255] grayscale colormap + FG_COLOR_MAP_SPECTRUM = 1, ///< Spectrum color + FG_COLOR_MAP_COLORS = 2, ///< Pure Colors + FG_COLOR_MAP_RED = 3, ///< Red color map + FG_COLOR_MAP_MOOD = 4, ///< Mood color map + FG_COLOR_MAP_HEAT = 5, ///< Heat color map + FG_COLOR_MAP_BLUE = 6 ///< Blue color map } fg_color_map; typedef enum { @@ -169,20 +169,20 @@ typedef enum { } fg_dtype; typedef enum { - FG_LINE = 0, ///< Line plot - FG_SCATTER = 1, ///< Scatter plot - FG_SURFACE = 2 ///< Surface plot + FG_PLOT_LINE = 0, ///< Line plot + FG_PLOT_SCATTER = 1, ///< Scatter plot + FG_PLOT_SURFACE = 2 ///< Surface plot } fg_plot_type; typedef enum { - FG_NONE = 0, ///< No marker - FG_POINT = 1, ///< Point marker - FG_CIRCLE = 2, ///< Circle marker - FG_SQUARE = 3, ///< Square marker - FG_TRIANGLE = 4, ///< Triangle marker - FG_CROSS = 5, ///< Cross-hair marker - FG_PLUS = 6, ///< Plus symbol marker - FG_STAR = 7 ///< Star symbol marker + FG_MARKER_NONE = 0, ///< No marker + FG_MARKER_POINT = 1, ///< Point marker + FG_MARKER_CIRCLE = 2, ///< Circle marker + FG_MARKER_SQUARE = 3, ///< Square marker + FG_MARKER_TRIANGLE = 4, ///< Triangle marker + FG_MARKER_CROSS = 5, ///< Cross-hair marker + FG_MARKER_PLUS = 6, ///< Plus symbol marker + FG_MARKER_STAR = 7 ///< Star symbol marker } fg_marker_type; diff --git a/include/fg/plot.h b/include/fg/plot.h index d66cb275..56173900 100644 --- a/include/fg/plot.h +++ b/include/fg/plot.h @@ -81,7 +81,7 @@ class Plot { the values of \ref MarkerType. */ FGAPI Plot(const uint pNumPoints, const dtype pDataType, const ChartType pChartType, - const PlotType pPlotType=FG_LINE, const MarkerType pMarkerType=FG_NONE); + const PlotType pPlotType=FG_PLOT_LINE, const MarkerType pMarkerType=FG_MARKER_NONE); /** Copy constructor for Plot diff --git a/include/fg/surface.h b/include/fg/surface.h index c1bbd18e..5e9d8185 100644 --- a/include/fg/surface.h +++ b/include/fg/surface.h @@ -72,7 +72,7 @@ class Surface { \param[in] pMarkerType is the type of \ref MarkerType to draw for \ref FG_SCATTER plot type */ FGAPI Surface(const uint pNumXPoints, const uint pNumYPoints, const dtype pDataType, - const PlotType pPlotType=FG_SURFACE, const MarkerType pMarkerType=FG_NONE); + const PlotType pPlotType=FG_PLOT_SURFACE, const MarkerType pMarkerType=FG_MARKER_NONE); /** Copy constructor for Plot diff --git a/src/api/c/chart.cpp b/src/api/c/chart.cpp index c0ccdeb2..d9bd9ab3 100644 --- a/src/api/c/chart.cpp +++ b/src/api/c/chart.cpp @@ -31,7 +31,7 @@ fg_err fg_create_chart(fg_chart *pHandle, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_chart(fg_chart pHandle) @@ -41,7 +41,7 @@ fg_err fg_destroy_chart(fg_chart pHandle) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_chart_axes_titles(fg_chart pHandle, @@ -54,7 +54,7 @@ fg_err fg_set_chart_axes_titles(fg_chart pHandle, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_chart_axes_limits(fg_chart pHandle, @@ -67,7 +67,7 @@ fg_err fg_set_chart_axes_limits(fg_chart pHandle, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_chart_legend_position(fg_chart pHandle, const float pX, const float pY) @@ -77,7 +77,7 @@ fg_err fg_set_chart_legend_position(fg_chart pHandle, const float pX, const floa } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_add_image_to_chart(fg_image* pImage, fg_chart pHandle, @@ -92,7 +92,7 @@ fg_err fg_add_image_to_chart(fg_image* pImage, fg_chart pHandle, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_add_histogram_to_chart(fg_histogram* pHistogram, fg_chart pHandle, @@ -101,7 +101,7 @@ fg_err fg_add_histogram_to_chart(fg_histogram* pHistogram, fg_chart pHandle, try { common::Chart* chrt = getChart(pHandle); - if (chrt->chartType()== FG_2D) { + if (chrt->chartType()== FG_CHART_2D) { common::Histogram* hist = new common::Histogram(pNBins, pType); chrt->addRenderable(hist->impl()); *pHistogram = getHandle(hist); @@ -112,7 +112,7 @@ fg_err fg_add_histogram_to_chart(fg_histogram* pHistogram, fg_chart pHandle, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_add_plot_to_chart(fg_plot* pPlot, fg_chart pHandle, @@ -123,19 +123,19 @@ fg_err fg_add_plot_to_chart(fg_plot* pPlot, fg_chart pHandle, common::Chart* chrt = getChart(pHandle); fg::ChartType ctype = chrt->chartType(); - if (ctype == FG_2D) { - common::Plot* plt = new common::Plot(pNPoints, pType, pPlotType, pMarkerType, FG_2D); + if (ctype == FG_CHART_2D) { + common::Plot* plt = new common::Plot(pNPoints, pType, pPlotType, pMarkerType, FG_CHART_2D); chrt->addRenderable(plt->impl()); *pPlot = getHandle(plt); } else { - common::Plot* plt = new common::Plot(pNPoints, pType, pPlotType, pMarkerType, FG_3D); + common::Plot* plt = new common::Plot(pNPoints, pType, pPlotType, pMarkerType, FG_CHART_3D); chrt->addRenderable(plt->impl()); *pPlot = getHandle(plt); } } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_add_surface_to_chart(fg_surface* pSurface, fg_chart pHandle, @@ -146,7 +146,7 @@ fg_err fg_add_surface_to_chart(fg_surface* pSurface, fg_chart pHandle, common::Chart* chrt = getChart(pHandle); fg::ChartType ctype = chrt->chartType(); - if (ctype == FG_3D) { + if (ctype == FG_CHART_3D) { common::Surface* surf = new common::Surface(pXPoints, pYPoints, pType, pPlotType, pMarkerType); chrt->addRenderable(surf->impl()); @@ -158,7 +158,7 @@ fg_err fg_add_surface_to_chart(fg_surface* pSurface, fg_chart pHandle, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_render_chart(const fg_window pWindow, const fg_chart pChart, @@ -172,5 +172,5 @@ fg_err fg_render_chart(const fg_window pWindow, const fg_chart pChart, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/c/font.cpp b/src/api/c/font.cpp index 1fd3ef8f..da6775e0 100644 --- a/src/api/c/font.cpp +++ b/src/api/c/font.cpp @@ -19,7 +19,7 @@ fg_err fg_create_font(fg_font* pFont) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_font(fg_font pFont) @@ -29,7 +29,7 @@ fg_err fg_destroy_font(fg_font pFont) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_load_font_file(fg_font pFont, const char* const pFileFullPath) @@ -39,7 +39,7 @@ fg_err fg_load_font_file(fg_font pFont, const char* const pFileFullPath) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_load_system_font(fg_font pFont, const char* const pFontName) @@ -49,5 +49,5 @@ fg_err fg_load_system_font(fg_font pFont, const char* const pFontName) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/c/histogram.cpp b/src/api/c/histogram.cpp index 1d335e5d..40ed654a 100644 --- a/src/api/c/histogram.cpp +++ b/src/api/c/histogram.cpp @@ -20,7 +20,7 @@ fg_err fg_create_histogram(fg_histogram *pHistogram, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_histogram(fg_histogram pHistogram) @@ -30,7 +30,7 @@ fg_err fg_destroy_histogram(fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_histogram_color(fg_histogram pHistogram, @@ -42,7 +42,7 @@ fg_err fg_set_histogram_color(fg_histogram pHistogram, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_histogram_legend(fg_histogram pHistogram, const char* pLegend) @@ -52,7 +52,7 @@ fg_err fg_set_histogram_legend(fg_histogram pHistogram, const char* pLegend) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_histogram_vbo(uint* pOut, const fg_histogram pHistogram) @@ -62,7 +62,7 @@ fg_err fg_get_histogram_vbo(uint* pOut, const fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_histogram_cbo(uint* pOut, const fg_histogram pHistogram) @@ -72,7 +72,7 @@ fg_err fg_get_histogram_cbo(uint* pOut, const fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_histogram_abo(uint* pOut, const fg_histogram pHistogram) @@ -82,7 +82,7 @@ fg_err fg_get_histogram_abo(uint* pOut, const fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_histogram_vbo_size(uint* pOut, const fg_histogram pHistogram) @@ -92,7 +92,7 @@ fg_err fg_get_histogram_vbo_size(uint* pOut, const fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_histogram_cbo_size(uint* pOut, const fg_histogram pHistogram) @@ -102,7 +102,7 @@ fg_err fg_get_histogram_cbo_size(uint* pOut, const fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_histogram_abo_size(uint* pOut, const fg_histogram pHistogram) @@ -112,5 +112,5 @@ fg_err fg_get_histogram_abo_size(uint* pOut, const fg_histogram pHistogram) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/c/image.cpp b/src/api/c/image.cpp index 37aa383a..b8f4bfa2 100644 --- a/src/api/c/image.cpp +++ b/src/api/c/image.cpp @@ -27,7 +27,7 @@ fg_err fg_create_image(fg_image* pImage, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_image(fg_image pImage) @@ -37,7 +37,7 @@ fg_err fg_destroy_image(fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_image_alpha(fg_image pImage, const float pAlpha) @@ -47,7 +47,7 @@ fg_err fg_set_image_alpha(fg_image pImage, const float pAlpha) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_image_aspect_ratio(fg_image pImage, const bool pKeepRatio) @@ -57,7 +57,7 @@ fg_err fg_set_image_aspect_ratio(fg_image pImage, const bool pKeepRatio) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_image_width(uint *pOut, const fg_image pImage) @@ -67,7 +67,7 @@ fg_err fg_get_image_width(uint *pOut, const fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_image_height(uint *pOut, const fg_image pImage) @@ -77,7 +77,7 @@ fg_err fg_get_image_height(uint *pOut, const fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_image_pixelformat(fg_channel_format* pOut, const fg_image pImage) @@ -87,7 +87,7 @@ fg_err fg_get_image_pixelformat(fg_channel_format* pOut, const fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_image_type(fg_dtype* pOut, const fg_image pImage) @@ -97,7 +97,7 @@ fg_err fg_get_image_type(fg_dtype* pOut, const fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_image_pbo(uint* pOut, const fg_image pImage) @@ -107,7 +107,7 @@ fg_err fg_get_image_pbo(uint* pOut, const fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_image_pbo_size(uint* pOut, const fg_image pImage) @@ -117,7 +117,7 @@ fg_err fg_get_image_pbo_size(uint* pOut, const fg_image pImage) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_render_image(const fg_window pWindow, @@ -132,5 +132,5 @@ fg_err fg_render_image(const fg_window pWindow, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/c/plot.cpp b/src/api/c/plot.cpp index bae079b1..14f60b87 100644 --- a/src/api/c/plot.cpp +++ b/src/api/c/plot.cpp @@ -23,7 +23,7 @@ fg_err fg_create_plot(fg_plot *pPlot, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_plot(fg_plot pPlot) @@ -33,7 +33,7 @@ fg_err fg_destroy_plot(fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_plot_color(fg_plot pPlot, @@ -45,7 +45,7 @@ fg_err fg_set_plot_color(fg_plot pPlot, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_plot_legend(fg_plot pPlot, const char* pLegend) @@ -55,7 +55,7 @@ fg_err fg_set_plot_legend(fg_plot pPlot, const char* pLegend) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_plot_marker_size(fg_plot pPlot, const float pMarkerSize) @@ -65,7 +65,7 @@ fg_err fg_set_plot_marker_size(fg_plot pPlot, const float pMarkerSize) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_vbo(uint* pOut, const fg_plot pPlot) @@ -75,7 +75,7 @@ fg_err fg_get_plot_vbo(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_cbo(uint* pOut, const fg_plot pPlot) @@ -85,7 +85,7 @@ fg_err fg_get_plot_cbo(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_abo(uint* pOut, const fg_plot pPlot) @@ -95,7 +95,7 @@ fg_err fg_get_plot_abo(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_mbo(uint* pOut, const fg_plot pPlot) @@ -105,7 +105,7 @@ fg_err fg_get_plot_mbo(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_vbo_size(uint* pOut, const fg_plot pPlot) @@ -115,7 +115,7 @@ fg_err fg_get_plot_vbo_size(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_cbo_size(uint* pOut, const fg_plot pPlot) @@ -125,7 +125,7 @@ fg_err fg_get_plot_cbo_size(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_abo_size(uint* pOut, const fg_plot pPlot) @@ -135,7 +135,7 @@ fg_err fg_get_plot_abo_size(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_plot_mbo_size(uint* pOut, const fg_plot pPlot) @@ -145,5 +145,5 @@ fg_err fg_get_plot_mbo_size(uint* pOut, const fg_plot pPlot) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/c/surface.cpp b/src/api/c/surface.cpp index 88655e08..58c557f6 100644 --- a/src/api/c/surface.cpp +++ b/src/api/c/surface.cpp @@ -23,7 +23,7 @@ fg_err fg_create_surface(fg_surface *pSurface, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_surface(fg_surface pSurface) @@ -33,7 +33,7 @@ fg_err fg_destroy_surface(fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_surface_color(fg_surface pSurface, @@ -45,7 +45,7 @@ fg_err fg_set_surface_color(fg_surface pSurface, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_surface_legend(fg_surface pSurface, const char* pLegend) @@ -55,7 +55,7 @@ fg_err fg_set_surface_legend(fg_surface pSurface, const char* pLegend) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_surface_vbo(uint* pOut, const fg_surface pSurface) @@ -65,7 +65,7 @@ fg_err fg_get_surface_vbo(uint* pOut, const fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_surface_cbo(uint* pOut, const fg_surface pSurface) @@ -75,7 +75,7 @@ fg_err fg_get_surface_cbo(uint* pOut, const fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_surface_abo(uint* pOut, const fg_surface pSurface) @@ -85,7 +85,7 @@ fg_err fg_get_surface_abo(uint* pOut, const fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_surface_vbo_size(uint* pOut, const fg_surface pSurface) @@ -95,7 +95,7 @@ fg_err fg_get_surface_vbo_size(uint* pOut, const fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_surface_cbo_size(uint* pOut, const fg_surface pSurface) @@ -105,7 +105,7 @@ fg_err fg_get_surface_cbo_size(uint* pOut, const fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_surface_abo_size(uint* pOut, const fg_surface pSurface) @@ -115,5 +115,5 @@ fg_err fg_get_surface_abo_size(uint* pOut, const fg_surface pSurface) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/c/window.cpp b/src/api/c/window.cpp index 810713f1..81274f7d 100644 --- a/src/api/c/window.cpp +++ b/src/api/c/window.cpp @@ -31,7 +31,7 @@ fg_err fg_create_window(fg_window *pWindow, } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_destroy_window(fg_window pWindow) @@ -41,7 +41,7 @@ fg_err fg_destroy_window(fg_window pWindow) } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_window_font(fg_window pWindow, fg_font pFont) @@ -50,7 +50,7 @@ fg_err fg_set_window_font(fg_window pWindow, fg_font pFont) getWindow(pWindow)->setFont(getFont(pFont)); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_window_title(fg_window pWindow, const char* pTitle) @@ -59,7 +59,7 @@ fg_err fg_set_window_title(fg_window pWindow, const char* pTitle) getWindow(pWindow)->setTitle(pTitle); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_window_position(fg_window pWindow, const int pX, const int pY) @@ -68,7 +68,7 @@ fg_err fg_set_window_position(fg_window pWindow, const int pX, const int pY) getWindow(pWindow)->setPos(pX, pY); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_window_size(fg_window pWindow, const uint pWidth, const uint pHeight) @@ -77,7 +77,7 @@ fg_err fg_set_window_size(fg_window pWindow, const uint pWidth, const uint pHeig getWindow(pWindow)->setSize(pWidth, pHeight); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_set_window_colormap(fg_window pWindow, const fg_color_map pColorMap) @@ -86,7 +86,7 @@ fg_err fg_set_window_colormap(fg_window pWindow, const fg_color_map pColorMap) getWindow(pWindow)->setColorMap(pColorMap); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_window_context_handle(long long *pContext, const fg_window pWindow) @@ -95,7 +95,7 @@ fg_err fg_get_window_context_handle(long long *pContext, const fg_window pWindow *pContext = getWindow(pWindow)->context(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_window_display_handle(long long *pDisplay, const fg_window pWindow) @@ -104,7 +104,7 @@ fg_err fg_get_window_display_handle(long long *pDisplay, const fg_window pWindow *pDisplay = getWindow(pWindow)->display(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_window_width(int *pWidth, const fg_window pWindow) @@ -113,7 +113,7 @@ fg_err fg_get_window_width(int *pWidth, const fg_window pWindow) *pWidth = getWindow(pWindow)->width(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_get_window_height(int *pHeight, const fg_window pWindow) @@ -122,7 +122,7 @@ fg_err fg_get_window_height(int *pHeight, const fg_window pWindow) *pHeight = getWindow(pWindow)->height(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_make_window_current(const fg_window pWindow) @@ -131,7 +131,7 @@ fg_err fg_make_window_current(const fg_window pWindow) getWindow(pWindow)->makeCurrent(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_hide_window(const fg_window pWindow) @@ -140,7 +140,7 @@ fg_err fg_hide_window(const fg_window pWindow) getWindow(pWindow)->hide(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_show_window(const fg_window pWindow) @@ -149,7 +149,7 @@ fg_err fg_show_window(const fg_window pWindow) getWindow(pWindow)->show(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_close_window(bool* pIsClosed, const fg_window pWindow) @@ -158,7 +158,7 @@ fg_err fg_close_window(bool* pIsClosed, const fg_window pWindow) *pIsClosed = getWindow(pWindow)->close(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_draw_image(const fg_window pWindow, const fg_image pImage, const bool pKeepAspectRatio) @@ -167,7 +167,7 @@ fg_err fg_draw_image(const fg_window pWindow, const fg_image pImage, const bool getWindow(pWindow)->draw(getImage(pImage), pKeepAspectRatio); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_draw_chart(const fg_window pWindow, const fg_chart pChart) @@ -176,7 +176,7 @@ fg_err fg_draw_chart(const fg_window pWindow, const fg_chart pChart) getWindow(pWindow)->draw(getChart(pChart)); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_setup_window_layout(int pRows, int pCols, fg_window pWindow) @@ -185,7 +185,7 @@ fg_err fg_setup_window_layout(int pRows, int pCols, fg_window pWindow) getWindow(pWindow)->grid(pRows, pCols); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_draw_image_to_cell(const fg_window pWindow, int pColId, int pRowId, @@ -195,7 +195,7 @@ fg_err fg_draw_image_to_cell(const fg_window pWindow, int pColId, int pRowId, getWindow(pWindow)->draw(pColId, pRowId, getImage(pImage), pTitle, pKeepAspectRatio); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_draw_chart_to_cell(const fg_window pWindow, int pColId, int pRowId, @@ -205,7 +205,7 @@ fg_err fg_draw_chart_to_cell(const fg_window pWindow, int pColId, int pRowId, getWindow(pWindow)->draw(pColId, pRowId, getChart(pChart), pTitle); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_swap_window_buffers(const fg_window pWindow) @@ -214,7 +214,7 @@ fg_err fg_swap_window_buffers(const fg_window pWindow) getWindow(pWindow)->swapBuffers(); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } fg_err fg_save_window_framebuffer(const char* pFullPath, const fg_window pWindow) @@ -223,5 +223,5 @@ fg_err fg_save_window_framebuffer(const char* pFullPath, const fg_window pWindow getWindow(pWindow)->saveFrameBuffer(pFullPath); } CATCHALL - return FG_SUCCESS; + return FG_ERR_NONE; } diff --git a/src/api/cpp/chart.cpp b/src/api/cpp/chart.cpp index 653025d0..ad96f784 100644 --- a/src/api/cpp/chart.cpp +++ b/src/api/cpp/chart.cpp @@ -92,7 +92,7 @@ Histogram Chart::histogram(const uint pNBins, const dtype pDataType) common::Chart* chrt = getChart(mValue); ChartType ctype = chrt->chartType(); - if (ctype == FG_2D) { + if (ctype == FG_CHART_2D) { Histogram retVal(pNBins, pDataType); chrt->addRenderable(getHistogram(retVal.get())->impl()); return retVal; @@ -108,12 +108,12 @@ Plot Chart::plot(const uint pNumPoints, const dtype pDataType, common::Chart* chrt = getChart(mValue); ChartType ctype = chrt->chartType(); - if (ctype == FG_2D) { - Plot retVal(pNumPoints, pDataType, FG_2D, pPlotType, pMarkerType); + if (ctype == FG_CHART_2D) { + Plot retVal(pNumPoints, pDataType, FG_CHART_2D, pPlotType, pMarkerType); chrt->addRenderable(getPlot(retVal.get())->impl()); return retVal; } else { - Plot retVal(pNumPoints, pDataType, FG_3D, pPlotType, pMarkerType); + Plot retVal(pNumPoints, pDataType, FG_CHART_3D, pPlotType, pMarkerType); chrt->addRenderable(getPlot(retVal.get())->impl()); return retVal; } @@ -125,7 +125,7 @@ Surface Chart::surface(const uint pNumXPoints, const uint pNumYPoints, const dty common::Chart* chrt = getChart(mValue); ChartType ctype = chrt->chartType(); - if (ctype == FG_3D) { + if (ctype == FG_CHART_3D) { Surface retVal(pNumXPoints, pNumYPoints, pDataType, pPlotType, pMarkerType); getChart(mValue)->addRenderable(getSurface(retVal.get())->impl()); return retVal; diff --git a/src/backend/Chart.hpp b/src/backend/Chart.hpp index ec07ea64..b249bc0c 100644 --- a/src/backend/Chart.hpp +++ b/src/backend/Chart.hpp @@ -29,9 +29,9 @@ class Chart { public: Chart(const fg::ChartType cType) : mChartType(cType) { - if (cType == FG_2D) { + if (cType == FG_CHART_2D) { mChart = std::make_shared(); - } else if (cType == FG_3D) { + } else if (cType == FG_CHART_3D) { mChart = std::make_shared(); } else { throw fg::ArgumentError("Chart::Chart", diff --git a/src/backend/chart_renderables.hpp b/src/backend/chart_renderables.hpp index 70573f00..aedeaa7e 100644 --- a/src/backend/chart_renderables.hpp +++ b/src/backend/chart_renderables.hpp @@ -38,7 +38,7 @@ class Plot : public ChartRenderableBase { Plot(const uint pNumPoints, const fg::dtype pDataType, const fg::PlotType pPlotType, const fg::MarkerType pMarkerType, const fg::ChartType pChartType) { - if (pChartType == FG_2D) { + if (pChartType == FG_CHART_2D) { mShrdPtr = std::make_shared< detail::plot2d_impl >(pNumPoints, pDataType, pPlotType, pMarkerType); } else { @@ -68,13 +68,13 @@ class Plot : public ChartRenderableBase { class Surface : public ChartRenderableBase { public: Surface(const uint pNumXPoints, const uint pNumYPoints, - const fg::dtype pDataType, const fg::PlotType pPlotType=FG_SURFACE, - const fg::MarkerType pMarkerType=FG_NONE) { + const fg::dtype pDataType, const fg::PlotType pPlotType=FG_PLOT_SURFACE, + const fg::MarkerType pMarkerType=FG_MARKER_NONE) { switch(pPlotType){ - case(FG_SURFACE): + case(FG_PLOT_SURFACE): mShrdPtr = std::make_shared(pNumXPoints, pNumYPoints, pDataType, pMarkerType); break; - case(FG_SCATTER): + case(FG_PLOT_SCATTER): mShrdPtr = std::make_shared(pNumXPoints, pNumYPoints, pDataType, pMarkerType); break; default: diff --git a/src/backend/opengl/plot.cpp b/src/backend/opengl/plot.cpp index 9748db24..c1c78193 100644 --- a/src/backend/opengl/plot.cpp +++ b/src/backend/opengl/plot.cpp @@ -213,7 +213,7 @@ void plot_impl::render(const int pWindowId, glm::mat4 mvp(1.0); this->computeTransformMat(mvp, pTransform, pX, pY, pVPW, pVPH); - if (mPlotType == FG_LINE) { + if (mPlotType == FG_PLOT_LINE) { glUseProgram(mPlotProgram); this->bindDimSpecificUniforms(); @@ -228,7 +228,7 @@ void plot_impl::render(const int pWindowId, glUseProgram(0); } - if (mMarkerType != FG_NONE) { + if (mMarkerType != FG_MARKER_NONE) { glEnable(GL_PROGRAM_POINT_SIZE); glUseProgram(mMarkerProgram); diff --git a/src/backend/opengl/surface.cpp b/src/backend/opengl/surface.cpp index e92ae24c..7597a25c 100644 --- a/src/backend/opengl/surface.cpp +++ b/src/backend/opengl/surface.cpp @@ -125,7 +125,7 @@ void surface_impl::renderGraph(const int pWindowId, const glm::mat4& transform) unbindResources(); glUseProgram(0); - if(mMarkerType != FG_NONE) { + if(mMarkerType != FG_MARKER_NONE) { glEnable(GL_PROGRAM_POINT_SIZE); glUseProgram(mMarkerProgram); @@ -256,7 +256,7 @@ void surface_impl::render(const int pWindowId, void scatter3_impl::renderGraph(const int pWindowId, const glm::mat4& transform) { - if(mMarkerType != FG_NONE) { + if(mMarkerType != FG_MARKER_NONE) { glEnable(GL_PROGRAM_POINT_SIZE); glUseProgram(mMarkerProgram); diff --git a/src/backend/opengl/surface.hpp b/src/backend/opengl/surface.hpp index bb0c901a..fde99bb0 100644 --- a/src/backend/opengl/surface.hpp +++ b/src/backend/opengl/surface.hpp @@ -84,7 +84,7 @@ class scatter3_impl : public surface_impl { public: scatter3_impl(const uint pNumXPoints, const uint pNumYPoints, - const fg::dtype pDataType, const fg::MarkerType pMarkerType=FG_NONE) + const fg::dtype pDataType, const fg::MarkerType pMarkerType=FG_MARKER_NONE) : surface_impl(pNumXPoints, pNumYPoints, pDataType, pMarkerType) {} }; diff --git a/src/backend/opengl/window.cpp b/src/backend/opengl/window.cpp index f446f22d..68857555 100644 --- a/src/backend/opengl/window.cpp +++ b/src/backend/opengl/window.cpp @@ -204,31 +204,31 @@ void window_impl::setSize(unsigned pW, unsigned pH) void window_impl::setColorMap(fg::ColorMap cmap) { switch(cmap) { - case FG_DEFAULT_MAP: + case FG_COLOR_MAP_DEFAULT: mColorMapUBO = mCMap->defaultMap(); mUBOSize = mCMap->defaultLen(); break; - case FG_SPECTRUM_MAP: + case FG_COLOR_MAP_SPECTRUM: mColorMapUBO = mCMap->spectrum(); mUBOSize = mCMap->spectrumLen(); break; - case FG_COLORS_MAP: + case FG_COLOR_MAP_COLORS: mColorMapUBO = mCMap->colors(); mUBOSize = mCMap->colorsLen(); break; - case FG_RED_MAP: + case FG_COLOR_MAP_RED: mColorMapUBO = mCMap->red(); mUBOSize = mCMap->redLen(); break; - case FG_MOOD_MAP: + case FG_COLOR_MAP_MOOD: mColorMapUBO = mCMap->mood(); mUBOSize = mCMap->moodLen(); break; - case FG_HEAT_MAP: + case FG_COLOR_MAP_HEAT: mColorMapUBO = mCMap->heat(); mUBOSize = mCMap->heatLen(); break; - case FG_BLUE_MAP: + case FG_COLOR_MAP_BLUE: mColorMapUBO = mCMap->blue(); mUBOSize = mCMap->blueLen(); break;