Go to the documentation of this file.
19 #ifndef GNASH_RENDER_HANDLER_OGL_H
20 #define GNASH_RENDER_HANDLER_OGL_H
22 #if defined(NOT_SGI_GL) || defined(__APPLE_CC__)
27 #include <OpenGL/gl.h>
28 #include <OpenGL/glu.h>
29 #include <OpenGL/glext.h>
30 # if defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465)
31 # define GLUCALLBACKTYPE GLvoid (*)()
33 # define GLUCALLBACKTYPE GLvoid (*)(...)
36 # define GLUCALLBACKTYPE void (*)()
39 # define GL_CLAMP_TO_EDGE 0x812F
42 # ifdef OSMESA_TESTING
43 # include <GL/osmesa.h>
44 # endif // OSMESA_TESTING
83 typedef std::map<const Path*, std::vector<oglVertex> >
PathPointMap;
93 void feed(std::vector<oglVertex>& vertices);
105 static void combine(GLdouble coords [3],
void *vertex_data[4],
106 GLfloat weight[4],
void **outData,
void* userdata);
111 std::vector<GLdouble*> _vertices;
112 GLUtesselator* _tessobj;
121 refs.push_back(&new_path);
123 shape.push_back(refs);
129 refs.push_back(&add_path);
135 PathRefs new_refs(pathrefs.begin(), pathrefs.end());
137 shape.push_back(new_refs);
141 const std::vector<PathRefs>&
get()
const
147 std::vector<PathRefs> shape;
oglVertex(double x, double y, double z=0.0)
Definition: Renderer_ogl.h:68
VGPath path
Definition: testr_gtk.cpp:84
@ R
Definition: GnashKey.h:130
@ l
Definition: GnashKey.h:158
@ RADIAL
Definition: FillStyle.h:162
static void error(GLenum error)
Definition: Renderer_ogl.cpp:513
A SolidFill containing one color.
Definition: FillStyle.h:247
void addPath(const Path &add_path)
Definition: Renderer_ogl.h:126
@ height
Definition: klash_part.cpp:329
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
std::vector< Path > PathVec
Definition: Renderer_cairo.h:35
void apply(const gnash::SWFMatrix &bitmap_matrix, bitmap_wrap_mode wrap_mode) const
Definition: Renderer_ogl.cpp:634
24-bit RGB bitmap
Definition: GnashImage.h:217
@ T
Definition: GnashKey.h:132
#define GLUCALLBACKTYPE
Definition: Renderer_ogl.h:36
const std::vector< PathRefs > & get() const
Definition: Renderer_ogl.h:141
void log_debug(StringType msg, Args... args)
Definition: log.h:301
std::int32_t y
Definition: BitmapData_as.cpp:435
void newPath(const Path &new_path)
Definition: Renderer_ogl.h:118
@ i
Definition: GnashKey.h:155
#define LOG_ONCE(x)
Definition: log.h:49
A basic RGBA type.
Definition: RGBA.h:36
value_type * iterator
Definition: GnashImage.h:83
bitmap_wrap_mode
Set line and fill styles for mesh & line_strip rendering.
Definition: Renderer_gles1.h:107
std::int32_t pixelsToTwips(double a)
Definition: GnashNumeric.h:144
#define _(String)
Definition: log.h:44
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
void feed(std::vector< oglVertex > &vertices)
Definition: Renderer_ogl.cpp:478
void endContour()
Definition: Renderer_ogl.cpp:488
Base class for different types of bitmaps.
Definition: GnashImage.h:78
void rememberVertex(GLdouble *v)
Definition: Renderer_ogl.cpp:506
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
Base class for render handlers.
Definition: Renderer.h:189
@ m
Definition: GnashKey.h:159
std::int32_t second
Definition: Date_as.cpp:93
@ n
Definition: GnashKey.h:160
@ TILED
Definition: FillStyle.h:87
double twipsToPixels(int i)
Definition: GnashNumeric.h:97
void log_error(StringType msg, Args... args)
Definition: log.h:283
Definition: Renderer_ogl.h:67
void addPathRefs(const PathRefs &pathrefs)
Definition: Renderer_ogl.h:132
@ GNASH_TEXTURE_VAAPI
Definition: GnashTexture.h:30
void tesselate()
Definition: Renderer_ogl.cpp:494
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
const VGfloat color[4]
Definition: testr_gtk.cpp:82
@ r
Definition: GnashKey.h:164
T lerp(T a, T b, T f)
Definition: GnashNumeric.h:85
VGPaint fill
Definition: testr_gtk.cpp:86
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
@ a
Definition: GnashKey.h:147
geometry::SnappingRanges2d< std::int32_t > InvalidatedRanges
Standard snapping 2d ranges type for invalidated bounds calculation
Definition: snappingrange.h:655
A GradientFill.
Definition: FillStyle.h:154
A subset of a shape, a series of edges sharing a single set of styles.
Definition: Geometry.h:167
@ h
Definition: GnashKey.h:154
@ z
Definition: GnashKey.h:172
@ p
Definition: GnashKey.h:162
Tesselator()
Definition: Renderer_ogl.cpp:435
@ C
Definition: GnashKey.h:115
@ q
Definition: GnashKey.h:163
geometry::Point2d point
Definition: Point2d.h:143
@ _1
Definition: GnashKey.h:95
GLdouble _x
Definition: Renderer_ogl.h:78
~bitmap_info_ogl()
Definition: Renderer_ogl.cpp:560
Definition: SWFMatrix.h:54
2D Point class
Definition: Point2d.h:39
Definition: Renderer_ogl.h:86
oglVertex(const point &p)
Definition: Renderer_ogl.h:73
GLdouble _y
Definition: Renderer_ogl.h:79
@ j
Definition: GnashKey.h:156
std::vector< Path > PathVec
Definition: Renderer_ogl.cpp:290
@ GNASH_IMAGE_CPU
Definition: GnashImage.h:56
~Tesselator()
Definition: Renderer_ogl.cpp:461
Definition: Renderer_ogl.h:116
@ f
Definition: GnashKey.h:152
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
@ LINEAR
Definition: FillStyle.h:161
A BitmapFill.
Definition: FillStyle.h:71
@ c
Definition: GnashKey.h:149
@ TYPE_RGB
Definition: GnashImage.h:49
#define GL_LINE_WIDTH_RANGE
Definition: render_handler_gles.h:55
std::map< const Path *, std::vector< oglVertex > > PathPointMap
Definition: Renderer_gles1.h:69
std::int32_t distance(const Point2d &p) const
Return distance between this and the given point.
Definition: Point2d.h:118
#define DSOEXPORT
Definition: dsodefs.h:55
Renderer * create_handler(const char *)
Definition: Renderer_gles1.cpp:315
point middle(const point &a, const point &b)
Definition: Renderer_ogl.cpp:350
Renderer * create_handler(bool init)
Definition: Renderer_ogl.cpp:1836
@ GNASH_IMAGE_GPU
Definition: GnashImage.h:57
std::vector< oglVertex > interpolate(const std::vector< Edge > &edges, const float &anchor_x, const float &anchor_y)
Definition: Renderer_ogl.cpp:409
Defines an edge with a control point and an anchor point.
Definition: Geometry.h:45
void transform(const SWFMatrix &mat)
Transform all path coordinates according to the given SWFMatrix.
Definition: Geometry.h:443
@ width
Definition: klash_part.cpp:329
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
@ u
Definition: GnashKey.h:167
std::map< const Path *, std::vector< oglVertex > > PathPointMap
Definition: Renderer_ogl.h:83
A CachedBitmap is created by the renderer in a format of its choosing.
Definition: CachedBitmap.h:38
std::int32_t x
Definition: BitmapData_as.cpp:434
GLdouble _z
Definition: Renderer_ogl.h:80
@ b
Definition: GnashKey.h:148
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
void beginContour()
Definition: Renderer_ogl.cpp:472
static void combine(GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **outData, void *userdata)
Definition: Renderer_ogl.cpp:520
@ TYPE_RGBA
Definition: GnashImage.h:50
void beginPolygon()
Definition: Renderer_ogl.cpp:467
std::vector< const Path * > PathPtrVec
Definition: Renderer_cairo.h:36
std::vector< const Path * > PathRefs
Definition: Renderer_ogl.h:65
bool isEven(const size_t &n)
Definition: Renderer_ogl.cpp:536
32-bit RGBA bitmap
Definition: GnashImage.h:236
@ A
Definition: GnashKey.h:113
@ WRAP_CLAMP
Definition: Renderer_gles1.h:109
void trace_curve(const point &startP, const point &controlP, const point &endP, std::vector< oglVertex > &coords)
Definition: Renderer_ogl.cpp:390