Jump to content
  • Advertisement

Archived

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

JoshG

OGL Not Initialising

This topic is 5965 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

Hello All, I have made a FEW adjustments to the NEHE tutorial Lesson #1 It opens a new window etc, BUT OpenGl does not wish to show anything in the window. I have let the DC be used by a Console will that affect it at all? In theory the Console should be shown in one state, and in the other state the DrawGLScene function is called. NOTHING HAPPENS! (except the console) Thanks --Josh

Share this post


Link to post
Share on other sites
Advertisement
No, they just have the same DC, in one state, the Console draws to the DC, and in the other State, OGL draws to the dc...In theory.

Share this post


Link to post
Share on other sites
NeHe''s tutor #1 is only drawind black screen ? is this what you get ? If so...that''s it ! If not...i don''t know...try next tutors and be more carefull with the changed...for example compile & run the program every times you change something and you will see if anything goes wrong...

Share this post


Link to post
Share on other sites
NeHe''s tutor #1 is only drawind black screen . is this what you get ? If so...that''s it ! If not...i don''t know...try next tutors and be more carefull with the changed...for example compile & run the program every times you change something and you will see if anything goes wrong...

Share this post


Link to post
Share on other sites
No, I don''t get a blackscreen, I don''t get anything drawn to the window, It becomes see-through.

If I got a black screen I would be thrilled!

Share this post


Link to post
Share on other sites
This is exactly what is happening to me! I am new to OpenGL programming, and after completing Nehe''s lesson 1 on Windows XP / MSVC++ 6, i get a window which has nothing in it, just whatever was in the back of the window (like if were see-through). The window does not repaint, either.

What could be the cause of such a problem?

regards,
riz

Share this post


Link to post
Share on other sites
heh, never mind =)

I just realized that i forgot to type in these functions when i was doing his tutorial:

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
}


sorry for not checking better earlier

riz

Share this post


Link to post
Share on other sites
Actually the problem that I had ended up being that I had (during my modifications) lost the line "SwapBuffers(hDC);" an incredibly important part of the program. The WIN32 errors that came were wrong, and were issued for no reason at all!

Hope that helps you!

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!