gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog backend/render_handler_ogl.cpp


From: Markus Gothe
Subject: [Gnash-commit] gnash ChangeLog backend/render_handler_ogl.cpp
Date: Fri, 27 Oct 2006 13:45:25 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  06/10/27 13:45:25

Modified files:
        .              : ChangeLog 
        backend        : render_handler_ogl.cpp 

Log message:
        Revived code for OGL antialiasing, albeit #if 0 until I've got the time 
to work on this.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1415&r2=1.1416
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&r1=1.31&r2=1.32

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1415
retrieving revision 1.1416
diff -u -b -r1.1415 -r1.1416
--- ChangeLog   27 Oct 2006 12:31:11 -0000      1.1415
+++ ChangeLog   27 Oct 2006 13:45:24 -0000      1.1416
@@ -1,3 +1,8 @@
+2006-10-27 Markus Gothe <address@hidden>
+
+       * backend/render_handler_ogl.cpp: Revived code for OGL antialiasing,
+         albeit #if 0 until I've got the time to work on this.
+
 2006-10-27 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/Date.as: fixed testcase

Index: backend/render_handler_ogl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- backend/render_handler_ogl.cpp      18 Oct 2006 14:51:08 -0000      1.31
+++ backend/render_handler_ogl.cpp      27 Oct 2006 13:45:24 -0000      1.32
@@ -394,48 +394,48 @@
                    glEnd();
                }
 
-           // Old unused code.  Might get revived someday.
-// #if 0
-//         // See if we want to, and can, use multitexture
-//         // antialiasing.
-//         s_multitexture_antialias = false;
-//         if (m_enable_antialias)
-//             {
-//                 int tex_units = 0;
-//                 glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &tex_units);
-//                 if (tex_units >= 2)
-//                     {
-//                         s_multitexture_antialias = true;
-//                     }
+           // Markus: Implement anti-aliasing here...
+#if 0
+           // See if we want to, and can, use multitexture
+           // antialiasing.
+           s_multitexture_antialias = false;
+           if (m_enable_antialias)
+               {
+                   int tex_units = 0;
+                   glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &tex_units);
+                   if (tex_units >= 2)
+                       {
+                           s_multitexture_antialias = true;
+                       }
 
-//                 // Make sure we have an edge texture available.
-//                 if (s_multitexture_antialias == true
-//                     && s_edge_texture_id == 0)
-//                     {
-//                         // Very simple texture: 2 texels wide, 1 texel high.
-//                         // Both texels are white; left texel is all clear, 
right texel is all opaque.
-//                         unsigned char       edge_data[8] = { 255, 255, 255, 
0, 255, 255, 255, 255 };
-
-//                         ogl::active_texture(GL_TEXTURE1_ARB);
-//                         glEnable(GL_TEXTURE_2D);
-//                         glGenTextures(1, &s_edge_texture_id);
-//                         glBindTexture(GL_TEXTURE_2D, s_edge_texture_id);
-
-//                         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
-//                         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);
-//                         glTexParameteri(GL_TEXTURE_2D, 
GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-//                         glTexParameteri(GL_TEXTURE_2D, 
GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-//                         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 1, 0, 
GL_RGBA, GL_UNSIGNED_BYTE, edge_data);
-
-//                         glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, 
GL_MODULATE);        // @@ should we use a 1D texture???
-
-//                         glDisable(GL_TEXTURE_2D);
-//                         ogl::active_texture(GL_TEXTURE0_ARB);
-//                         glDisable(GL_TEXTURE_2D);
-//                     }
-//             }
-// #endif // 0
+                   // Make sure we have an edge texture available.
+                   if (s_multitexture_antialias == true
+                       && s_edge_texture_id == 0)
+                       {
+                           // Very simple texture: 2 texels wide, 1 texel high.
+                           // Both texels are white; left texel is all clear, 
right texel is all opaque.
+                           unsigned char       edge_data[8] = { 255, 255, 255, 
0, 255, 255, 255, 255 };
+
+                           ogl::active_texture(GL_TEXTURE1_ARB);
+                           glEnable(GL_TEXTURE_2D);
+                           glGenTextures(1, &s_edge_texture_id);
+                           glBindTexture(GL_TEXTURE_2D, s_edge_texture_id);
+
+                           glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
+                           glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);
+                           glTexParameteri(GL_TEXTURE_2D, 
GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+                           glTexParameteri(GL_TEXTURE_2D, 
GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+                           glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 1, 0, 
GL_RGBA, GL_UNSIGNED_BYTE, edge_data);
+
+                           glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, 
GL_MODULATE);        // @@ should we use a 1D texture???
+
+                           glDisable(GL_TEXTURE_2D);
+                           ogl::active_texture(GL_TEXTURE0_ARB);
+                           glDisable(GL_TEXTURE_2D);
+                       }
+               }
+#endif // 0
        }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]