Original Post
So, I and I just decided to learn reflection, via openGL's powerful stencil buffer functionality.
B4 u leave, check out the issue i have bottom the post, and download my little reflection test! controls are on screen:
http://www.mediafire.com/?j6gccss6b65m6m2
So I code and code, and still, object was not reflecting. And when i say code and code, I meant frustratingly recoded reflection code over and over, and still to no avail. I checked and checked, until i realise something; the pixel format descriptor's stencil value wasn't set to 1!!!!!
my 'nicely' reflected boxxer car from my Ghetto project:

Uploaded with ImageShack.us

Uploaded with ImageShack.us

Uploaded with ImageShack.us
damage is being applied:

Uploaded with ImageShack.us

Uploaded with ImageShack.us
Anyway, solved that issue. And I noticed that objects reflected on are drawn differently than normal.
BUT I HAVE AN ISSUE!!!
We all know the reflection equation ( eg. ref_eq [ ] = { 0.0f, -1.0f, 0.0f, 0.0f } ) is used to remove artifacts, ( odd imaging results ) when applied with glClipPlane ( ) in stencil reflection process.
I know that in order to reflect accross x axis, the equation would change such that only the x coord would be -1, others 0, ...and the reflected object would be scaled such that also the x coord would be -1, others 1. I know that the target ( eg. floor being reflected on ) could be rotated, but I rotated, adjusted the reflection 'equation' and the scale function, yet still no result!!!!! Help I nuh, help I please!!!!
[Edited by - GMA965_X3100 on December 31, 2010 2:55:30 AM]
B4 u leave, check out the issue i have bottom the post, and download my little reflection test! controls are on screen:
http://www.mediafire.com/?j6gccss6b65m6m2
So I code and code, and still, object was not reflecting. And when i say code and code, I meant frustratingly recoded reflection code over and over, and still to no avail. I checked and checked, until i realise something; the pixel format descriptor's stencil value wasn't set to 1!!!!!
my 'nicely' reflected boxxer car from my Ghetto project:

Uploaded with ImageShack.us

Uploaded with ImageShack.us

Uploaded with ImageShack.us
damage is being applied:

Uploaded with ImageShack.us

Uploaded with ImageShack.us
Anyway, solved that issue. And I noticed that objects reflected on are drawn differently than normal.
BUT I HAVE AN ISSUE!!!
We all know the reflection equation ( eg. ref_eq [ ] = { 0.0f, -1.0f, 0.0f, 0.0f } ) is used to remove artifacts, ( odd imaging results ) when applied with glClipPlane ( ) in stencil reflection process.
I know that in order to reflect accross x axis, the equation would change such that only the x coord would be -1, others 0, ...and the reflected object would be scaled such that also the x coord would be -1, others 1. I know that the target ( eg. floor being reflected on ) could be rotated, but I rotated, adjusted the reflection 'equation' and the scale function, yet still no result!!!!! Help I nuh, help I please!!!!
[Edited by - GMA965_X3100 on December 31, 2010 2:55:30 AM]