OpenGl and C

This is a discussion on OpenGl and C within the Game Programming forums, part of the General Programming Boards category; I'm not really familiar with OpenGL but I m curious if OpenGl can be used with only C, without C++?...

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    10

    Question OpenGl and C

    I'm not really familiar with OpenGL but I m curious if OpenGl can be used with only C, without C++?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,451
    Yes.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,616
    Quote Originally Posted by Salem View Post
    Yes.
    Right to the center of the question, eh?
    Devoted my life to programming...

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,451
    > Right to the center of the question, eh?
    Yes.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,616
    Quote Originally Posted by Salem View Post
    > Right to the center of the question, eh?
    Yes.
    No comments? Nothing you want to express?
    Devoted my life to programming...

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    10
    Thanks a lot for the reply. Sorry but I will have to bother you with another question: I have started learning OpenGL on OpenGL Video Tutorial - Home but I came to the section for textures and there the image is loaded into a class(c++) and is said that that's the format OpenGL "likes" the images. Is this true or can it be done some other way in c?

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,451
    The file formats have nothing to do with whether you use C or C++.

    Like I said, the whole API is C based.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #8
    Registered User
    Join Date
    Nov 2010
    Posts
    10
    I think you misunderstood me, but so did I misunderstood the tutorial. What I meant was the format into what you load the image( I mentioned the class). I misunderstood the tutorial and though that all images had to be loaded into a class, but the tutorial was reffering to an array of pixels which is than along with other parameters passed to a function that turns it into a texture.

    Sorry for not being clear enough.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21