Thread: Help!

  1. #1
    ^Bubi
    Join Date
    May 2005
    Location
    Finland
    Posts
    2

    Help!

    Does openGL need same kind of library plug-ins like direct X does?
    Does anyone use Direct X?
    I have just started programming.

    Sorry my bad english.

  2. #2
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    For OpenGL requires you to include the opengl32.lib and glu32.lib in your linker settings, and you need to include gl.h and glu.h, and optionally glaux.h in each file where you'll be using OGL functions.

    >>I have just started programming.<<
    Have you just starting programming in general, or just started game programming? If you just started in general, then I suggest learning C or C++ before diveing straight in to OpenGL or Direct3D.

    -psychopath
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  3. #3
    ^Bubi
    Join Date
    May 2005
    Location
    Finland
    Posts
    2

    Unhappy

    >>Have you just starting programming in general, or just started game programming? If you just started in general, then I suggest learning C or C++ before diveing straight in to OpenGL or Direct3D.<<

    Actually, I know little basics, but it's true that I first have to consentrate more to basics.
    But I'm going to do mainly game programming, so it's good to me to know those OpenGL and DirectX things.

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    glaux.h is evil. don't use it.

  5. #5
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    DirectX requires headers like d3d9.h as well as including libraries like d3d9.lib.

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    48

    glaux.h is evil?

    if glaux.h is evil, how do we get around it?
    No signature...

  7. #7

  8. #8
    Registered User
    Join Date
    Dec 2004
    Posts
    48

    Hm...

    And what is openil? lol

    Is it software, libraries, or is it replacements of some sort? Maybe it's something I didn't mention?
    No signature...

  9. #9
    ---
    Join Date
    May 2004
    Posts
    1,379
    It's an image loader library

  10. #10
    Registered User
    Join Date
    Dec 2004
    Posts
    48
    How do I get around glaux.h specifically then....Is there a way that I can just get the glaux lib? I can't find anywhere to get glaux, except for NeHe. Even then I can't get it to work.
    No signature...

  11. #11
    ---
    Join Date
    May 2004
    Posts
    1,379
    Quote Originally Posted by sand_man
    glaux.h is evil. don't use it.
    Seriously dont use it.

    OpenIL is so much easier to use.

  12. #12
    Registered User
    Join Date
    Dec 2004
    Posts
    48
    So how does it work....Instead of glaux.h I include something else? Is OpenIL is just another program that doesn't support glaux? I don't see how this is an alternative, much less how to use it.
    No signature...

  13. #13
    ---
    Join Date
    May 2004
    Posts
    1,379
    Code:
    GLuint texid[2];
    
    ilInit();
    
    glEnable(GL_TEXTURE_2D);
    texid[0] = ilutGLLoadImage("test.tga");   //Many file formats are supported
    texid[1] = ilutGLLoadImage("test2.bmp");  //
    
    //Texture 1
    glPushMatrix();
      glBindTexture(GL_TEXTURE_2D, texid[0]);
      glTranslatef(0.0f,0.0f,-50.0f);
      //Draw Here
    glPopMatrix();
    
    //Texture 2
    glPushMatrix();
      glBindTexture(GL_TEXTURE_2D, texid[1]);
      glTranslatef(0.0f,0.0f,-50.0f);
      //Draw Here
    glPopMatrix();
    
    glDeleteTextures(2,texid);
    There are other ways of loading textures but this is the easiest.
    You need to include il.h ilu.h and ilut.h
    Last edited by sand_man; 06-05-2005 at 05:14 PM.

  14. #14
    C maniac
    Join Date
    Aug 2004
    Location
    Cyberwarping to Middle Earth
    Posts
    154

    Question

    I think you're a bit off topic. I have tried DirectX, OpenGL, and Windows GDI. DirectX gave me memory leaks, OpenGL woudn't run on my computer, and GDI was way to slow, and besides, I also got memory leaks. Allegro or SDL are what I use now. Also, I don't think you should even START a 3D game until you've been programming for 3 years (i'm on my second) I have a very good 2D game i'm posting on the sticky soon, as soon as i've got the keyboard interrupt working better . . .


    KAWK

Popular pages Recent additions subscribe to a feed