Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Red Ant

Help, can't make the tutorial work

This topic is 6307 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is kinda embarrassing but I can't even get the first part of the OpenGl tutorial on this site to work :o . I am not entirely new to OpenGl but thus far I have never attempted to couple Windows with OpenGl. This is where I'm running into trouble: if (!(hRC=wglCreateContext(hDC))) // Are We Able To Get A Rendering Context? { KillGLWindow(); // Reset The Display MessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION); return FALSE; // Return FALSE } I can't seem to get a rendering context. I tried using GetLastError() to find out why and it gave me error #2000 (ERROR_INVALID_PIXEL_FORMAT). Does anyone know what I can do to avoid this problem or what might be causing it. I use exactly the code provided in lesson 1 of the tutorial. Thanks in advance. Edited by - Red Ant on February 14, 2001 2:38:51 PM

Share this post


Link to post
Share on other sites
Advertisement
i had problem with nehes stuf too. I think that first tutorial is hard and mis leading. You should go find some windows programmin tutorials and some openGL tutorails seperatly and then combine them. Go to www.itknowledge.com and look for hte openGL super bible. Its great and it has a fairly good intro to combining windows and openGL. AFter doing that go back to nehes'' tutorials and start with lesson 2.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by simon_brown75

What have you put in your PIXELFORMATDESCRIPTOR? Have you specified the flag PFD_SUPPORT_OPENGL?

When you say tutorial 1, do you mean NeHe''s tutorial 1?



Yup to both questions.

Share this post


Link to post
Share on other sites
What language/compiler/OS are you working with?

Did you type the code in yourself from the tutorial or download the Visual C++ source file (http://nehe.gamedev.net/tutorials/vc/lesson01.zip)?

Also, this file contains the already compiled executable, so you could see if this gives the same error.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I use MS Visual C++ 6.0 with a vanilla Windows 98 for an OS. Yeah, I did type the code in myself. I will try your suggestion. Thanks for helping me .

Share this post


Link to post
Share on other sites
I use MS Visual C++ 6.0 with a vanilla Windows 98 for an OS. Yeah, I did type the code in myself. I will try your suggestion. Thanks for helping me .

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!