why are some openGL functions not working?

This is a discussion on why are some openGL functions not working? within the C++ Programming forums, part of the General Programming Boards category; I recently started learning OpenGL but my computer (windows vista) or my compiler (Dev) is not likeing the NULL function ...

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

    why are some openGL functions not working?

    I recently started learning OpenGL but my computer (windows vista) or my compiler (Dev) is not likeing the NULL function or something else here is the error message:

    [Warning] passing NULL used for non-pointer converting 1 of `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'

    also there are two other errors maybe they are the problem:

    gl/glaux.h: No such file or directory.

    In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)':

    what can I do to fix this/these?

  2. #2
    Registered User Swarvy's Avatar
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    195
    Why did you post this in the C++ section? OpenGL is written exclusively in C and if anything it should be in the 'game programming' section. Oh well, no real harm done.

    The first one is only a warning rather than a compiler error but you should look at where you use the CreateWindow() function in your code to solve that problem. Unless you post some of your code I can't really help you with that one.

    As for your other problem, do you even have the glaux library installed on your computer? If not, you could download it using the Dev-c++ (I am assuming by 'Dev' you mean Dev-C++) package downloader (look at the menu options, I'm sure you will find it). Or alternatively you could just download the library using a web browser and put it in the appropriate directory yourself.

    P.S. The errors you are getting have nothing to do with OpenGL functions. Your title is a bit misleading.
    Last edited by Swarvy; 11-07-2010 at 07:58 PM.

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,620
    Quote Originally Posted by Swarvy View Post
    Why did you post this in the C++ section? OpenGL is written exclusively in C and if anything it should be in the 'game programming' section.
    What do you mean by that? OpenGL is written exclusively in C in order to be used by both C and C++. OpenGL is a graphics library, not a game one, and "C++Matt" posted nothing that has to do with game programming. No offense, but you should take a course or two on OpenGL.
    Devoted my life to programming...

  4. #4
    Registered User Swarvy's Avatar
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    195
    Quote Originally Posted by Sipher View Post
    What do you mean by that? OpenGL is written exclusively in C in order to be used by both C and C++. OpenGL is a graphics library, not a game one, and "C++Matt" posted nothing that has to do with game programming. No offense, but you should take a course or two on OpenGL.
    True that OpenGL is a graphics library and has many other uses (not just for making games), but what I meant in my previous post was that problems relating to OpenGL on this forum are more often than not related in some way to game programming. Although, yes, you are right that OpenGL can be used in many non-game applications. That being said, I think this is a mute point in light of the question since his problems are not really related to any OpenGL functions. The only function related problem in the post was to do with the windows API and even then, it wasn't an error, just a warning.

    I agree that OpenGL was written in C to allow it to be used in a C++ context. The reason why I said this may not be suitable for the C++ section was because there was no indication of C++ in his original post.
    Last edited by Swarvy; 11-08-2010 at 08:46 PM.

  5. #5
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,620
    First of all, sorry for being a little rude earlier. Nevertheless, i agree with you that what he posted have almost nothing to do with C++ and OpenGL. Now really, the only relation to OpenGL is the glaux header!!! This question suites more to the Windows Section.
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help working with functions, structures, and arrays
    By leway in forum C Programming
    Replies: 3
    Last Post: 05-09-2010, 05:24 PM
  2. Working with functions
    By themsaman in forum C Programming
    Replies: 16
    Last Post: 03-18-2010, 12:25 PM
  3. Replies: 0
    Last Post: 07-26-2007, 09:55 AM
  4. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 05:58 PM
  5. MISC questions about OpenGL
    By Silvercord in forum Game Programming
    Replies: 12
    Last Post: 01-25-2003, 03:20 PM

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