offset to center wall
git-svn-id: svn://anubis/dwscr/trunk@93 5bef9df8-b654-44bb-925b-0ff18baa8f8c
This commit is contained in:
parent
126b75fb56
commit
6e86df5482
@ -12,6 +12,8 @@
|
||||
using namespace std;
|
||||
|
||||
#define SIZE 5
|
||||
#define STRIDE_MULTIPLIER 1.0;
|
||||
#define ZOOM 10.0
|
||||
|
||||
/* construct screensaver mode and do some basic OpenGL setup */
|
||||
LightBounce::LightBounce(SSMain * _SSMain) : SSMode(_SSMain)
|
||||
@ -27,13 +29,13 @@ LightBounce::LightBounce(SSMain * _SSMain) : SSMode(_SSMain)
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
LogoBox tmp;
|
||||
float box_stride = tmp.getWidth() * 1.2;
|
||||
float box_stride = tmp.getWidth() * STRIDE_MULTIPLIER;
|
||||
float half_size = SIZE * box_stride / 2.0;
|
||||
float y = -half_size;
|
||||
float y = -half_size + box_stride / 2.0;
|
||||
int rot = false;
|
||||
for (int i = 0; i < SIZE; i++)
|
||||
{
|
||||
float x = -half_size;
|
||||
float x = -half_size + box_stride / 2.0;
|
||||
for (int j = 0; j < SIZE; j++)
|
||||
{
|
||||
LightBounce_Box * box = new LightBounce_Box;
|
||||
@ -64,7 +66,7 @@ void LightBounce::update()
|
||||
{
|
||||
glViewport(i*width/numMonitors, 0, width/numMonitors, height);
|
||||
glLoadIdentity();
|
||||
gluLookAt(0, 0, SIZE * 5.0, 0, 0, 0, 0, 1, 0);
|
||||
gluLookAt(0, 0, SIZE * ZOOM, 0, 0, 0, 0, 1, 0);
|
||||
glRotatef(m_elapsed/33.0f, 0, 1, 0);
|
||||
int sz = m_boxes.size();
|
||||
for (int i = 0; i < sz; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user