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 /source/blender
parent3d07c6c52decfdf34be3ff620a6bf60d4e6a0fbf (diff)
Reverted the changes (in revisions 17517-17519) for the antialiasing based on OpenGL accumulation buffer.
Diffstat (limited to 'source/blender')
-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
3 files changed, 3 insertions, 52 deletions
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
};