• Advertisement

Fella

Member
  • Content count

    36
  • Joined

  • Last visited

Community Reputation

102 Neutral

About Fella

  • Rank
    Member
  1. Iran: The Next Neocon Target

    Quote:Original post by Strider_Hiryu Quote:Original post by Fella USA is a superpower simply because it has the balls to protect her interest and if USA sees interest in war with Iran you can count on it that there will be war. .... Protecting one's 'interests' by stomping on the backs of others is by all means cruel, and selfish. A country that doesn't even make up 20% of the world's population, yet uses 33% or more of the world's resources, and we've got to protect our 'interests'? Actually you country is only about 5% of world's population. I did not say USA protecting her interest is a good thing I was merely stating a fact. I am against USA politics and I am absolutely against war. Growing up in a war-zone myself I understand what war is and never in my life time am I going to support it. Unfortunately the war between Iran and USA will inevitably going to happen in the near or far future. USA going into war with Iran will be the biggest mistake in the history of your young country but mistake or not it is something absolutely necessary for the USA to do. Iran is not one of the poor defenseless countries which you have invaded in the past 50 years. Iran is 4000 years old civilization and one lesson you learn in that time is to be patient. While your youth is watching Jerry Springer and Simpson’s Iran's youth is being trained into soldiers. Think 200-300 hundred years into future when Iran decides to start "protecting its interest". There are two things that binds all of Iran together .The first is faith the second is hatred towards USA and Israel. Your politicians know that very well rest assure. The last thing in your countries interest would be for Iran to develop nuclear weaponry on a scale that would allow them to launch effective attack. Iran does not fear self-destruction... I am all about peace & love man:) Thanks for downgrading me by the way:)
  2. OpenGL basic question

    Quote:Original post by Anonymous Poster glutLookAt(0.0f, 10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f). Why did you set the 'UP' vector as ( 0.0, 0.0, -1.0 ). Should it be (0.0, 1.0, 0.0)?
  3. Yep that was it. Thank you.
  4. Sorry I forgot to add glEnable(GL_TEXTURE_2D) while copying and pasting the code in forum. That is not the issue. Any other clues?
  5. I am trying to load a texture on a quad and if I do not use glGenTextures() in the following code it works fine while if do use glGenTextures() the texture does not get mapped on the quad and I just get a red quad. Why does it work if I remove the glGenTextures()? const int TEX_NUM = 1; // number of textures const int GROUND_TEX = 0; // ground texture GLuint textures[ TEX_NUM ]; // holds allocated names of texture objects const char* textureFileNames[ TEX_NUM ] = { "texture.tga" }; // initializes OpenGL state void setupRC() { glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); // set clearing color GLubyte* pLoadedTGA; // pointer to loaded TGA texture GLint width, height; // number of color components in the texture GLint internalFormat; // texture propreties GLenum format; // format of the texture ( RGB etc.) glEnable(GL_TEXTURE_2D); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glGenTextures( TEX_NUM, textures ); for ( int texObj = 0; texObj < TEX_NUM; texObj++ ) { glBindTexture( GL_TEXTURE_2D, textures[ texObj ] ); pLoadedTGA = gltLoadTGA( textureFileNames[ texObj ], &width, &height, &internalFormat, &format ); gluBuild2DMipmaps( GL_TEXTURE_2D, internalFormat, width, height, format, GL_UNSIGNED_BYTE, pLoadedTGA ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); free( pLoadedTGA ); } glEnable( GL_DEPTH_TEST ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 45.0f, 800/600, 1, 500 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); } void render() { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glPushMatrix(); glColor3fv( 1.0f, 0.0f, 0.0f ); glTranslatef( 0.0f, 0.0f, -30.0f ); glRotatef( 10.0f, 1.0f, 0.0f, 0.0f ); glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, GROUND_TEX ); glBegin( GL_QUADS ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( -2000.0f, 0.0f, 2000.0f ); glTexCoord2f( 1.0f, 0.0f ); glVertex3f( 2000.0f, 0.0f, 2000.0f ); glTexCoord2f( 1.0f, 1.0f ); glVertex3f( 2000.0f, 0.0f, -2000.0f); glTexCoord2f( 0.0f, 1.0f ); glVertex3f( -2000.0f, 0.0f, -2000.0f); glEnd(); glDisable( GL_TEXTURE_2D ); glPopMatrix(); glutSwapBuffers(); } [Edited by - Fella on April 30, 2006 7:24:16 AM]
  6. Iran: The Next Neocon Target

    USA is a superpower simply becouse it has the balls to protect her interest and if USA sees interest in war with Iran you can count on it that there will be war.
  7. I have put into a spreadsheet what browser and OS are people using while browsing gamedev.net by using the "who's online" feature of this forum. Here are the results: There was 128 users online at the time I took the snapshot. Windows XP: 103 Linux: 14 Mac OS X: 5 Windows 2000: 3 Windows 2003: 1 Windows 98: 1 Unknown: 1 Firefox: 71 IE6: 37 Opera: 9 Safari: 4 IE7: 3 Konqueror: 1 Mozilla 5.0: 1 Netscape 4: 1 Unknown: 1
  8. Programmer's Point of View on Life

    When I am with people I feel like I am watching some bad TV pupet show while listening to a broken record.
  9. In the following case it is not possible to separate declaration and definition into .h and .cpp file because TEX_NUM must have a value in order to declare textureFileNames[ TEX_NUM ] properly hence it is necessary to do the declaration and definition in the same .h file. extern const int TEX_NUM; extern const char* textureFileNames[ TEX_NUM ]; But if I go ahead and declare and define in the same header like so... extern const int TEX_NUM = 1; extern const char* textureFileNames[ TEX_NUM ]; ... i get the already defined in *.obj linker error. What am I missing here?
  10. It is strange. I have whole bunch of const declared and initialized in the header file. Many of them I did not even declare as external and it works fine while for some of those which I have declared as extern I get this linking error when declaring and initializing the constants. When I do it as deathkrush said it works fine but I thought it is recommended to declare and initialize the constants in the header.
  11. In my header file I hava a constant declared like this: extern const char* textureFileNames[ NUM_OF_TEXUTRES ] = { "texture.tga" }; This header is included in many .cpp files. Even though I have declared it as extern I still get the error 'LNK2005: "char const * * textureFileNames" (?textureFileNames@@3PAPBDA) already defined in stdafx.obj' whenever I try to use textureFileNames. Do I have to initialize it in a seperate .cpp file even though it is a constant?
  12. OpenGL basic question

    Got it thanks!
  13. OpenGL basic question

    Sorry there was a typo - setupRC does get called in main(). After putting gluLookAt(0.0f, 10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f) in the code now the whole screen is filled with red color. This means the ground is getting rendered but why can not I see it when using the above code?
  14. OpenGL basic question

    I am trying to draw a single big rectangle representing ground. The following code displays nothing. I have tried translating the ground forward and backwards the z axis but still the ground does not get displayed. Can anybody help? void drawGround(){ glBegin( GL_QUADS ); glVertex3f( -200.0f, 0.0f, 200.0f ); glVertex3f( 200.0f, 0.0f, 200.0f ); glVertex3f( 200.0f, 0.0f, -200.0f); glVertex3f( -200.0f, 0.0f, -200.0f); glEnd(); } void setupRC(){ glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); glEnable( GL_DEPTH_TEST ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 45.0f, width/height, 1, 500 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); } void render(){ glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glColor3f( 1.0f, 0.0f, 0.0f ); drawGround(); glutSwapBuffers(); } int main( int argc, char* argv[] ){ glutInit( &argc, argv ); glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ); glutInitWindowSize( width, height ); glutCreateWindow("test"); glutDisplayFunc( render ); glutIdleFunc( render ); setupRC(); glutMainLoop(); return 0; }
  15. Does anybody know any good tutorials on the topic of developing CAD applications?
  • Advertisement