• 01-18-2003
Silvercord
When you say something like "It can be clipped to the top of the screen" what does this mean? Lets just say we're talking about ohh a windows bitmap file or something.
• 01-18-2003
MrWizard
Well lets assume your screen is 800x600 ok? You have a bitmap thats 100x100 ( all in pixels ). Lets say you start your bitmap off at 600 or something near the bottom of the screen. Then every frame when you call Blt to draw it to the window, you subtract a pixel from the top. Well this bitmap will be moving upwards right? What happens when the top of the bitmap is -1? Thats out of bounds and Blt will fail. This will make the bitmap disappear at the top of the screen. You clip so that it gives the illusion of sliding completely off of the window. Basically, you see how much past the top it is ( in this case 1 pixel ) then you just add a pixel to the bitmap's top so that it doesn't show the top line of the bmp and it'll give the illusion of smoothly going off of the screen. Thats one example of 2D clipping.
• 01-18-2003
Silvercord
Just a couple of questions: is it true that Y is actually downwards in the windows screen coordinates? I remember doing a console application a while ago using setconsolepos functions (or something) and increasing the y made the characters move DOWN. Or maybe I was standing on my head and forgot to realize it :confused:
• 01-18-2003
Jeremy G
Standerdized
The standardized cartesian(at least i think its cartesian, my math is rusty) co-ordinate system is adapted to the screen as:

0-------------------------------------------+X
|
|
|
|
|
|
|
|
|
|
|
|
+
Y

( Zero being top left corner )
• 01-19-2003
RoD
don't forget the Z axis.....and yes you are correct about the name of the coord system.
• 01-19-2003
Jeremy G
Then I do believe it is:
0--------------------------------------------------+X
|\
|..\
|....\
|......\
|........\
|.........+
|...........Z( Z: buffer [d3d]) ?
|
|
|
|
|
|
|
+
y

I think its the depth buffer your talking about, either way, z is positive INTO the screen.
• 01-19-2003
RoD
yes i am referring to the depth buffer.
• 01-19-2003
MrWizard
Quote:

Originally posted by dbgt goten
either way, z is positive INTO the screen.
Um, actually it depends on if you setup your application to use a Left-Handed or Right-Handed coordinate system. Its completely arbitrary and up to personal preference. I always use Left-Handed myself because that is the Direct3D default. The OpenGL default is Right-Handed if I remember correctly. The difference in coordinate systems is which way the positive Z-Axis points.
• 01-20-2003
RoD
By default in opengl the Z axis is positive into the screen.
• 01-20-2003
dynamic_cast
Ive always read that OpenGL uses a right handed system...which would be positive out of the screen.
• 01-20-2003
RoD
i typo'd, its positive out.