23 #if !defined (octave_gl_render_h)
24 #define octave_gl_render_h 1
27 #define WIN32_LEAN_AND_MEAN
33 #elif defined HAVE_OPENGL_GL_H || defined HAVE_FRAMEWORK_OPENGL
34 #include <OpenGL/gl.h>
39 #elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
40 #include <OpenGL/glu.h>
43 #ifdef HAVE_GL_GLEXT_H
45 #elif defined HAVE_OPENGL_GLEXT_H || defined HAVE_FRAMEWORK_OPENGL
46 #include <OpenGL/glext.h>
52 #if defined (HAVE_OPENGL)
61 zmin (), zmax (), xZ1 (), xZ2 (), marker_id (), filled_marker_id (),
62 camera_pos (), camera_dir ()
72 virtual void draw (
const Matrix& hlist,
bool toplevel =
false)
76 for (
int i = len-1; i >= 0; i--)
85 virtual void set_viewport (
int w,
int h);
100 virtual void init_gl_context (
bool enhanced,
const Matrix& backgroundColor);
103 virtual void set_color (
const Matrix& c);
104 virtual void set_polygon_offset (
bool on,
float offset = 0.0
f);
105 virtual void set_linewidth (
float w);
106 virtual void set_linestyle (
const std::string& s,
bool stipple =
false);
107 virtual void set_clipbox (
double x1,
double x2,
double y1,
double y2,
108 double z1,
double z2);
109 virtual void set_clipping (
bool on);
112 virtual void init_marker (
const std::string& m,
double size,
float width);
113 virtual void end_marker (
void);
114 virtual void draw_marker (
double x,
double y,
double z,
117 virtual void text_to_pixels (
const std::string& txt,
120 int halign = 0,
int valign = 0,
121 double rotation = 0.0);
123 virtual Matrix render_text (
const std::string& txt,
124 double x,
double y,
double z,
125 int halign,
int valign,
double rotation = 0.0);
127 virtual void draw_pixels (GLsizei
w, GLsizei h, GLenum format,
128 GLenum
type,
const GLvoid *data);
130 virtual void render_grid (
const std::string& gridstyle,
const Matrix& ticks,
131 double lim1,
double lim2,
132 double p1,
double p1N,
double p2,
double p2N,
133 int xyz,
bool is_3D);
135 virtual void render_tickmarks (
const Matrix& ticks,
double lim1,
double lim2,
136 double p1,
double p1N,
double p2,
double p2N,
137 double dx,
double dy,
double dz,
138 int xyz,
bool doubleside);
140 virtual void render_ticktexts (
const Matrix& ticks,
142 double lim1,
double lim2,
143 double p1,
double p2,
144 int xyz,
int ha,
int va,
145 int& wmax,
int& hmax);
150 zmin (), zmax (), xZ1 (), xZ2 (), marker_id (), filled_marker_id (),
151 camera_pos (), camera_dir ()
166 octave_uint8 clip_code (
double x,
double y,
double z)
const
168 return ((x <
xmin ? 1 : 0)
169 | (x >
xmax ? 1 : 0) << 1
170 | (y < ymin ? 1 : 0) << 2
171 | (y > ymax ? 1 : 0) << 3
172 | (z < zmin ? 1 : 0) << 4
173 | (z > zmax ? 1 : 0) << 5
177 unsigned int make_marker_list (
const std::string& m,
double size,
205 unsigned int marker_id, filled_marker_id;
216 class patch_tesselator;
Complex xmax(const Complex &x, const Complex &y)
Complex xmin(const Complex &x, const Complex &y)
F77_RET_T const double const double * f
std::complex< double > w(std::complex< double > z, double relerr=0)
size_t size(T const (&)[z])
static bool is_nan_or_inf(const octave_value &val)
octave_idx_type length(void) const
Number of elements in the array.
static graphics_object get_object(double val)
void xform(ColumnVector &v, const Matrix &m)
F77_RET_T const double * x