Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


accum buffer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Calypso   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 October 2001 - 04:27 PM

First, I was reading through the chapter on buffers in "OpenGL Game Programming" by Hawkins and Astle, and got past the part where he talked about the accumulation buffer. He gave a quick example of how to use it for motion blur, and I tried to put this into effect on Nehe Lesson 6. Here''s the code: int DrawGLScene(GLvoid) // Here''s Where We Do All The Drawing { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT); // Clear The Screen And The Depth Buffer glLoadIdentity(); // Reset The View glTranslatef(0.0f,0.0f,-5.0f); DrawCube(); glAccum(GL_LOAD,0.7); for(idx=1;idx<5;idx++) { glRotatef(objectAngle - (float)idx,0.0,1.0,0.0); DrawCube(); glAccum(GL_ACCUM,0.2); } glAccum(GL_RETURN,1.0); return TRUE; // Keep Going } Now, it just creates a slightly blurred, discolored cube that doesn''t move and slows down the program. Any idea on how to get it actually moving with the motion blur? Second, I was compiling some of the programs from the Nvidia OpenGL sdk, and I get this linker error: error LNK2019: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ) referenced in function "private: bool __thiscall std::basic_string,class std::allocator >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z) What library am I forgetting to link? Thanks

Sponsor:

#2 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 03 October 2001 - 04:36 PM

I don''t know much about accumulation buffers except that they are software so don''t expect any speed in your app.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

#3 Calypso   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 October 2001 - 05:00 PM

Yeah, I just wanted to see if I could pull off that motion blur with it. There''s probably a faster way to do it, but I just want to get it working with the accum buffer.

#4 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 04 October 2001 - 08:27 AM

Where are you moving the cube? Maybe you should render a couple frames into the accumulation buffer in each DrawGLScene. Right now you don''t have any translating or rotating based on user input.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS