Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2008-12-05 01:47:26 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2008-12-05 01:47:26 +0300
commit4ae12f3af508c0efe9ab72755fd9bd434ef90b8a (patch)
tree833298a6288e0918235ef0821b19363e98fcfac3
parent3d07c6c52decfdf34be3ff620a6bf60d4e6a0fbf (diff)
Reverted the changes (in revisions 17517-17519) for the antialiasing based on OpenGL accumulation buffer.
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.cpp16
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp11
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp6
-rw-r--r--source/blender/blenlib/BLI_jitter.h4
-rwxr-xr-xsource/blender/freestyle/intern/app_blender/AppGLWidget.cpp47
-rwxr-xr-xsource/blender/freestyle/intern/app_blender/AppGLWidget.h4
6 files changed, 5 insertions, 83 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp
index 94d1657a68c..9ae9e283b69 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.cpp
+++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp
@@ -46,34 +46,22 @@ AGLContext GHOST_WindowCarbon::s_firstaglCtx = NULL;
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,
};
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index f7e017305bb..6a06f4d715a 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -84,11 +84,7 @@ static PIXELFORMATDESCRIPTOR sPreferredFormat = {
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 @@ GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextTyp
// 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 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
!(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;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index e5d865f0254..73d61a30977 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -168,12 +168,6 @@ GHOST_WindowX11(
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);
diff --git a/source/blender/blenlib/BLI_jitter.h b/source/blender/blenlib/BLI_jitter.h
index 0f1278ac5d7..1cd4880d0b7 100644
--- a/source/blender/blenlib/BLI_jitter.h
+++ b/source/blender/blenlib/BLI_jitter.h
@@ -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
diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
index 4181d653d7c..e0ab9b439d5 100755
--- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
+++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp
@@ -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 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer)
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 @@ void AppGLWidget::Draw2DScene(SceneVisitor *iRenderer)
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();
diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h
index 5a4988d9158..17319ce356f 100755
--- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h
+++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h
@@ -517,11 +517,7 @@ protected:
bool _record;
-#if 1 // FRS_antialiasing
- float jit[32][2];
- void init_jit(int osa);
-#endif
};