Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/include


Modified Files:
        evas_common.h evas_gl_common.h 


Log Message:


open gl is fulyl functional now - it coudl defnitely do with optimizations
with texture upload. it does NOt check error returns anywhere from gl... this
may mean issues with LOTs of images, LARGE images etc. need to fix that later

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_common.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_common.h       4 Sep 2003 07:40:34 -0000       1.10
+++ evas_common.h       9 Sep 2003 05:51:03 -0000       1.11
@@ -239,30 +239,38 @@
 struct _RGBA_Draw_Context
 {
    struct {
-      int    use : 1;
+      char   use : 1;
       DATA8  r[256], g[256], b[256], a[256];
    } mod;
    struct {
-      int    use : 1;
+      char   use : 1;
       DATA32 col;
    } mul;
    struct {
       DATA32 col;
    } col;
    struct {
-      int    use : 1;
+      char   use : 1;
       int    x, y, w, h;
    } clip;
    struct {
      Cutout_Rect *rects; 
    } cutout;
+   struct {
+      struct {
+        void *(*gl_new)  (void *data, RGBA_Font_Glyph *fg);
+        void  (*gl_free) (void *ext_dat);
+        void  (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, 
int x, int y);
+      } func;
+      void *data;
+   } font_ext;
 };
 
 struct _RGBA_Surface
 {
    int     w, h;
    DATA32 *data;
-   int     no_free : 1;
+   char    no_free : 1;
 };
 
 struct _RGBA_Image
@@ -326,8 +334,10 @@
 
 struct _RGBA_Font_Glyph
 { 
-   FT_Glyph       glyph;
-   FT_BitmapGlyph glyph_out;
+   FT_Glyph        glyph;
+   FT_BitmapGlyph  glyph_out;
+   void           *ext_dat;
+   void           (*ext_dat_free) (void *ext_dat);
 };
 
 struct _Tilebuf
@@ -817,6 +827,11 @@
 
 RGBA_Draw_Context *evas_common_draw_context_new               (void);
 void               evas_common_draw_context_free              (RGBA_Draw_Context *dc);
+void               evas_common_draw_context_font_ext_set      (RGBA_Draw_Context *dc,
+                                                        void *data,
+                                                        void *(*gl_new)  (void *data, 
RGBA_Font_Glyph *fg),
+                                                        void  (*gl_free) (void 
*ext_dat),
+                                                        void  (*gl_draw) (void *data, 
void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y));
 void               evas_common_draw_context_clip_clip         (RGBA_Draw_Context *dc, 
int x, int y, int w, int h);
 void               evas_common_draw_context_set_clip          (RGBA_Draw_Context *dc, 
int x, int y, int w, int h);
 void               evas_common_draw_context_unset_clip        (RGBA_Draw_Context *dc);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_gl_common.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_gl_common.h    7 Sep 2003 11:24:48 -0000       1.4
+++ evas_gl_common.h    9 Sep 2003 05:51:03 -0000       1.5
@@ -1,9 +1,6 @@
 #ifndef EVAS_GL_COMMON_H
 #define EVAS_GL_COMMON_H
 
-//#define RADEON_HACK
-#define NVIDIA_HACK
-
 #include "evas_common.h"
 #include "config.h"
 
@@ -23,13 +20,16 @@
 #include <X11/Xatom.h>
 #include <X11/Xutil.h>
 
-typedef struct _Evas_GL_Context        Evas_GL_Context;
-typedef struct _Evas_GL_Texture        Evas_GL_Texture;
-typedef struct _Evas_GL_Image          Evas_GL_Image;
-typedef struct _Evas_GL_Polygon        Evas_GL_Polygon;
-typedef struct _Evas_GL_Polygon_Point  Evas_GL_Polygon_Point;
-typedef struct _Evas_GL_Gradient       Evas_GL_Gradient;
-  
+typedef struct _Evas_GL_Context                      Evas_GL_Context;
+typedef struct _Evas_GL_Texture                      Evas_GL_Texture;
+typedef struct _Evas_GL_Image                        Evas_GL_Image;
+typedef struct _Evas_GL_Polygon                      Evas_GL_Polygon;
+typedef struct _Evas_GL_Polygon_Point                Evas_GL_Polygon_Point;
+typedef struct _Evas_GL_Gradient                     Evas_GL_Gradient;
+typedef struct _Evas_GL_Font_Texture                 Evas_GL_Font_Texture;
+typedef struct _Evas_GL_Font_Texture_Pool            Evas_GL_Font_Texture_Pool;
+typedef struct _Evas_GL_Font_Texture_Pool_Allocation 
Evas_GL_Font_Texture_Pool_Allocation;
+
 struct _Evas_GL_Context
 {
    int             w, h;
@@ -63,7 +63,9 @@
    GLenum          read_buf;
    GLenum          write_buf;
    
-   Evas_GL_Texture *texture;
+   Evas_GL_Texture      *texture;
+   GLuint                font_texture;
+   char                  font_texture_not_power_of_two : 1;
    
    int             max_texture_depth;
    int             max_texture_size;
@@ -71,6 +73,7 @@
    int             references;
    
    Evas_List      *images;
+   Evas_List      *tex_pool;
 };
 
 struct _Evas_GL_Texture
@@ -79,12 +82,15 @@
    int              w, h;
    int              tw, th;
    int              uw, uh;
+   
    GLuint           texture;
+   
    char             smooth : 1;
    char             changed : 1;
    char             have_mipmaps : 1;
-   char             opt : 1;
    char             not_power_of_two : 1; 
+   char             opt : 1;
+   
    int              references;
 };
 
@@ -114,6 +120,32 @@
    Evas_GL_Texture *tex;
 };
 
+struct _Evas_GL_Font_Texture
+{
+   Evas_GL_Context                      *gc;
+   int                                   x, y, w, h;
+   int                                   aw, ah;
+   GLuint                                texture;   
+   Evas_GL_Font_Texture_Pool            *pool;
+   Evas_GL_Font_Texture_Pool_Allocation *alloc;
+};
+
+struct _Evas_GL_Font_Texture_Pool
+{
+   Evas_GL_Context *gc;
+   int              w, h;
+   GLuint           texture;
+   int              references;   
+   char             not_power_of_two : 1; 
+   Evas_List       *allocations;
+};
+
+struct _Evas_GL_Font_Texture_Pool_Allocation
+{
+   Evas_GL_Font_Texture_Pool *pool;
+   int x, y, w, h;
+};
+
 Evas_GL_Context  *evas_gl_common_context_new(void);
 void              evas_gl_common_context_free(Evas_GL_Context *gc);
 void              evas_gl_common_context_use(Evas_GL_Context *gc);
@@ -122,9 +154,11 @@
 void              evas_gl_common_context_blend_set(Evas_GL_Context *gc, int blend);
 void              evas_gl_common_context_dither_set(Evas_GL_Context *gc, int dither);
 void              evas_gl_common_context_texture_set(Evas_GL_Context *gc, 
Evas_GL_Texture *tex, int smooth, int w, int h);
+void              evas_gl_common_context_font_texture_set(Evas_GL_Context *gc, 
Evas_GL_Font_Texture *ft);
 void              evas_gl_common_context_clip_set(Evas_GL_Context *gc, int on, int x, 
int y, int w, int h);
 void              evas_gl_common_context_read_buf_set(Evas_GL_Context *gc, GLenum 
buf);
 void              evas_gl_common_context_write_buf_set(Evas_GL_Context *gc, GLenum 
buf);
+
 Evas_GL_Texture  *evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im, int 
smooth);
 void              evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im, 
int smooth);
 void              evas_gl_common_texture_free(Evas_GL_Texture *tex);
@@ -136,8 +170,10 @@
 Evas_GL_Image    *evas_gl_common_image_new(Evas_GL_Context *gc, int w, int h);
 void              evas_gl_common_image_free(Evas_GL_Image *im);
 void              evas_gl_common_image_dirty(Evas_GL_Image *im);    
+
 Evas_GL_Polygon  *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
 Evas_GL_Polygon  *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
+
 Evas_GL_Gradient *evas_gl_common_gradient_color_add(Evas_GL_Gradient *gr, int r, int 
g, int b, int a, int distance);
 Evas_GL_Gradient *evas_gl_common_gradient_colors_clear(Evas_GL_Gradient *gr);
     
@@ -149,7 +185,9 @@
 void              evas_gl_common_poly_draw(Evas_GL_Context *gc, RGBA_Draw_Context 
*dc, Evas_GL_Polygon *poly);
 void              evas_gl_common_gradient_draw(Evas_GL_Context *gc, RGBA_Draw_Context 
*dc, Evas_GL_Gradient *gr, int x, int y, int w, int h, double angle);
 
-
+Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph 
*fg);
+void                  evas_gl_font_texture_free(Evas_GL_Font_Texture *ft);
+void                  evas_gl_font_texture_draw(Evas_GL_Context *gc, void *surface, 
RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
 
 /* FIXME:
  * 




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to