[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17718] branches/soc-2008-mxcurioni: Reverted the changes (in revisions 17517-17519) for the antialiasing based on OpenGL accumulation buffer.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Thu Dec 4 23:47:26 CET 2008
Revision: 17718
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17718
Author: kjym3
Date: 2008-12-04 23:47:26 +0100 (Thu, 04 Dec 2008)
Log Message:
-----------
Reverted the changes (in revisions 17517-17519) for the antialiasing based on OpenGL accumulation buffer.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp
branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp 2008-12-04 20:34:37 UTC (rev 17717)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp 2008-12-04 22:47:26 UTC (rev 17718)
@@ -46,34 +46,22 @@
const GHOST_TInt32 GHOST_WindowCarbon::s_sizeRectSize = 16;
#endif //GHOST_DRAW_CARBON_GUTTER
-static const GLint sPreferredFormatWindow[16] = {
+static const GLint sPreferredFormatWindow[8] = {
AGL_RGBA,
AGL_DOUBLEBUFFER,
AGL_ACCELERATED,
AGL_DEPTH_SIZE, 32,
AGL_AUX_BUFFERS, 1,
-#if 1 // FRS_antialiasing
-AGL_ACCUM_RED_SIZE, 16,
-AGL_ACCUM_GREEN_SIZE, 16,
-AGL_ACCUM_BLUE_SIZE, 16,
-AGL_ACCUM_ALPHA_SIZE, 16,
-#endif
AGL_NONE,
};
-static const GLint sPreferredFormatFullScreen[17] = {
+static const GLint sPreferredFormatFullScreen[9] = {
AGL_RGBA,
AGL_DOUBLEBUFFER,
AGL_ACCELERATED,
AGL_FULLSCREEN,
AGL_DEPTH_SIZE, 32,
AGL_AUX_BUFFERS, 1,
-#if 1 // FRS_antialiasing
-AGL_ACCUM_RED_SIZE, 16,
-AGL_ACCUM_GREEN_SIZE, 16,
-AGL_ACCUM_BLUE_SIZE, 16,
-AGL_ACCUM_ALPHA_SIZE, 16,
-#endif
AGL_NONE,
};
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp 2008-12-04 20:34:37 UTC (rev 17717)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp 2008-12-04 22:47:26 UTC (rev 17718)
@@ -84,11 +84,7 @@
0, 0, 0, 0, 0, 0, /* color bits (ignored) */
0, /* no alpha buffer */
0, /* alpha bits (ignored) */
-#if 1 // FRS_antialiasing
- 1, /* accumulation buffer */
-#else
0, /* no accumulation buffer */
-#endif
0, 0, 0, 0, /* accum bits (ignored) */
32, /* depth buffer */
0, /* no stencil buffer */
@@ -495,10 +491,6 @@
// For debugging only: retrieve the pixel format chosen
PIXELFORMATDESCRIPTOR preferredFormat;
::DescribePixelFormat(m_hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &preferredFormat);
-#if 1 // FRS_antialiasing
- if (preferredFormat.cAccumBits > 0)
- printf("Accumulation buffer enabled\n");
-#endif
// Create the context
m_hGlRc = ::wglCreateContext(m_hDC);
if (m_hGlRc) {
@@ -837,9 +829,6 @@
!(pfd.dwFlags & PFD_DRAW_TO_WINDOW) ||
!(pfd.dwFlags & PFD_DOUBLEBUFFER) || /* Blender _needs_ this */
( pfd.cDepthBits <= 8 ) ||
-#if 1 // FRS_antialiasing
- !pfd.cAccumBits || /* for antialiasing in Freestyle */
-#endif
!(pfd.iPixelType == PFD_TYPE_RGBA) )
return 0;
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp 2008-12-04 20:34:37 UTC (rev 17717)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp 2008-12-04 22:47:26 UTC (rev 17718)
@@ -168,12 +168,6 @@
attributes[i++] = GLX_BLUE_SIZE; attributes[i++] = 1;
attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1;
attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1;
-#if 1 // FRS_antialiasing
- attributes[i++] = GLX_ACCUM_RED_SIZE; attributes[i++] = 1;
- attributes[i++] = GLX_ACCUM_GREEN_SIZE; attributes[i++] = 1;
- attributes[i++] = GLX_ACCUM_BLUE_SIZE; attributes[i++] = 1;
- attributes[i++] = GLX_ACCUM_ALPHA_SIZE; attributes[i++] = 1;
-#endif
attributes[i] = None;
m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), attributes);
Modified: branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h 2008-12-04 20:34:37 UTC (rev 17717)
+++ branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h 2008-12-04 22:47:26 UTC (rev 17718)
@@ -33,8 +33,8 @@
#define BLI_JITTER_H
extern void BLI_initjit(float *jitarr, int num);
-extern void BLI_jitterate1(float *jit1, float *jit2, int num, float _rad1);
-extern void BLI_jitterate2(float *jit1, float *jit2, int num, float _rad2);
+extern void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
+extern void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
#endif
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp 2008-12-04 20:34:37 UTC (rev 17717)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp 2008-12-04 22:47:26 UTC (rev 17718)
@@ -40,13 +40,8 @@
extern "C" {
#include "BLI_blenlib.h"
-#include "BLI_jitter.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-#if 1 // FRS_antialiasing
-#include "BKE_global.h"
-#include "DNA_scene_types.h"
-#endif
}
// glut.h must be included last to avoid a conflict with stdlib.h on vc .net 2003 and 2005
@@ -401,23 +396,6 @@
glPopAttrib();
}
-#if 1 // FRS_antialiasing
-
-void AppGLWidget::init_jit(int osa)
-{
- static float cache[32][2]; /* simple caching */
- static int lastjit= 0;
-
- if(lastjit != osa) {
- memset(cache, 0, sizeof(cache));
- BLI_initjit(cache[0], osa);
- }
- lastjit= osa;
- memcpy(jit, cache, sizeof(jit));
-}
-
-#endif
-
void AppGLWidget::Draw2DScene(SceneVisitor *iRenderer)
{
static bool first = 1;
@@ -452,30 +430,7 @@
canvas->init();
first = false;
}
-#if 1 // FRS_antialiasing
- if (!(G.scene->r.mode & R_OSA)) {
-#endif
- canvas->Render(canvas->renderer());
-#if 1 // FRS_antialiasing
- } else {
- init_jit(G.scene->r.osa);
- GLint viewport[4];
- glGetIntegerv(GL_VIEWPORT, viewport);
- glClear(GL_ACCUM_BUFFER_BIT);
- for (int jitter = 0; jitter < G.scene->r.osa; jitter++) {
- cout << "Antialiasing " << jitter+1 << "/" << G.scene->r.osa << endl;
- glClear(GL_COLOR_BUFFER_BIT);
- glPushMatrix();
- glTranslatef(jit[jitter][0]*(viewport[2]+viewport[3])/viewport[2],
- jit[jitter][1]*(viewport[2]+viewport[3])/viewport[3], 0.0);
- canvas->Render(canvas->renderer());
- glPopMatrix();
- glAccum(GL_ACCUM, 1.0/G.scene->r.osa);
- }
- glAccum(GL_RETURN, 1.0);
- }
-#endif
-
+ canvas->Render(canvas->renderer());
}
glLoadIdentity();
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h 2008-12-04 20:34:37 UTC (rev 17717)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h 2008-12-04 22:47:26 UTC (rev 17718)
@@ -517,11 +517,7 @@
bool _record;
-#if 1 // FRS_antialiasing
- float jit[32][2];
- void init_jit(int osa);
-#endif
};
More information about the Bf-blender-cvs
mailing list