#include<windows.h>
#include<gl/glut.h>
void RenderScene()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0,0,0);
glPointSize(5);
glBegin(GL_POINTS);
glVertex3f(0.0f,-70.0f,0.0f);
glEnd();
glFlush();
}
void SetMyScene()
{
glClearColor(1,1,1,1);
}
void Reshape(GLsizei w,GLsizei h)
{
if(h==0)
h=1;
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLfloat ar=(GLfloat)w/(GLfloat)h;
if(w<=h)
glOrtho(-100,100,100/ar,-100/ar,1,-1);
else
glOrtho(-100*ar,100*ar,100,-100,1,-1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE| GLUT_RGB);
glutCreateWindow("Bounce");
glutDisplayFunc(RenderScene);
glutReshapeFunc(Reshape);
SetMyScene();
glutMainLoop();
return 0;
}
strange coordinates!!!
Quote:
manpage of glOrtho
void glOrtho( GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble zNear,
GLdouble zFar )
PARAMETERS
left, right Specify the coordinates for the left and right vertical
clipping planes.
bottom, top Specify the coordinates for the bottom and top horizontal
clipping planes.
zNear, zFar Specify the distances to the nearer and farther depth clip-
ping planes. These values are negative if the plane is to
be behind the viewer.
...
then you'll see that you set "bottom" to positive and "top" to negative values. That's wrong and causes a vertical mirroring of the display.
Furthur, inspect your zNear and zFar. You've chosen zFar to be behind the camera and zNear to be in front of the camera. That is presumbly also not what you want.
that really helped.
may be u shud revise that 'Explanation'...
its really strange... how come the name of the topic made u feel that i was crying or whining(dah!!!!!!!)
or u were jst trying to post that link anyway!!???
watever it is...i got my ans within 10 mins after i posted the topic ;) ...
so i am gonna name my topics as i find it useful and according to the forum rules.
Theres no need to post any external link to teach me how to post as this forum has its own rules.
Quote:
Original post by shakurshams
lol..thats funny!!!
may be u shud revise that 'Explanation'...
its really strange... how come the name of the topic made u feel that i was crying or whining(dah!!!!!!!)
or u were jst trying to post that link anyway!!???
watever it is...i got my ans within 10 mins after i posted the topic ;) ...
so i am gonna name my topics as i find it useful and according to the forum rules.
Theres no need to post any external link to teach me how to post as this forum has its own rules.
*sigh* Obviously, there is a need to teach you how to write. It was because of your excessive use of baby-speak:
plz -> please
!!!??? -> !?
!!!!!111one -> no no on topic names
!!!!!111one -> ! when trying to say something inside the post
(dah!!!!!!) -> what is that baby speak?
u = -> you
shud -> should
Those are, as you say, no rules, but more something we call "civilly", "politeness", "seriousness", or just "good manners". What exactly gives you the impression that "!!!!!!!!!!oneoneICanNotSpeakCorrectly" helps you in any way?
Or summarized in one phrase: If you are not a kiddie, don't write like a kiddie.
(and this is not intended to be an affront; actually I am trying to give a good advice; topics on gd.net sometimes get closed because of inpolite writing, like this one. Also, maybe you now Terry Pratchett, who wrote '"Multiple exclamation marks", he went on, shaking his head, "are a sure sign of a diseased mind."')
Quote:
topics on gd.net sometimes get closed because of inpolite writing
and
Quote:
Also, maybe you now Terry Pratchett, who wrote '"Multiple exclamation marks", he went on, shaking his head, "are a sure sign of a diseased mind."')
now you decide who is being impolite.
when i posted my topic, i think i was polite enough to get help and i got it.And to add more i also rated haegarr.
but suddenly you came with an offending attitude which i didn't like.
and as for 'plz','u','shud'...i really don't understand how they lack politeness, seriousness or etc.
and if they what would you say about this word you wrote :
Quote:
inpolite
don't you think it should be impolite.
i am not being kiddie or impolite.
and as long as exclamation mark is there i am going to use that.
remember you first get exclaimed(!) then you ask(?) and then you get the answer(.)
so it's good to be wondered(!).
you or anyone may call it a diseased mind but that's the way it works for me.
and yah!!! i saw your website and i really appreciate that.
and what i think is guys like you should encourage youngsters.Although i am not pretty sure why you posted that link..to prove something or not..
by the way i think you have seen throughout the post i have written 'you', 'should' etc. but i really disagree with you when it comes to the exclamation mark(!) issue.
TC
Quote:
Original post by shakurshams
and what i think is guys like you should encourage youngsters.
This is what I am trying. If you want to be respected, then begin with your writing. Abbreviations or gamer-speak are definitely not what is repected. If you look at the older guys, like ToohrVyk, Sneftel, Dmytry, or others, they all write in a clean and mature style. Imagine how their epic posts would be recognized if they lacked that much grammar like those gamer-speak posts. Also, (now look at this post) writing properly makes reading much easier and nicer, which is a Good Thing for both native and non-native english speakers.
It's a good thing that you get programming things right after posting here, heads up. And it's also great that you take into account user ratings. But if you also want to be respected, learn to write properly. That is why I gave you that link (that website is, btw, not mine, but rather it was written by one of the leading people of the open source movement, Eric S. Raymond, and he had reasons for writing that document). Ask yourself why your user rating is below 1000 (yes, I rated you down, but your rating is not and can't be solely caused by humble me).
And believe me, if you write properly, more people will pay attention to your posts.
Also, don't start a new line for each phrase. You do this when programming, but shouldn't do when writing texts. Put phrases that belong together into paragraphs.
And for the multiple exclamation marks: No, not I was insulting you, it was rather the very famous author Terry Pratchett whom I quoted. Because putting multiple exclamation marks in your phrase makes it effectively the equivalent of crying; but if you want to make your phrase an assertive statement, just put a single exclamation mark into it. That's the difference.
Example: Look at my post! vs. Look at my post!!!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.