Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: GL Rendering Context

  1. #1
    Senior Member Regular Contributor
    Join Date
    May 2000
    Location
    London, UK
    Posts
    490

    GL Rendering Context

    If my program fails to create a GL Rendering context, what can I do to fix it?

    -Adrian

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: GL Rendering Context

    You have to make sure that the Pixelformat has been set correctly and that you rendering context exits too.

    if (!hDC =GetDC(hwnd))
    error;

    if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))
    error! This one means that your video card doesn't support the pixel format you asked. You'll have to change some parameters

    if(!SetPixelFormat(hDC,PixelFormat,&pfd))
    error again.

    Then if this ok, maybe it's the window fault.

    These are the things you have to be sure of:

    when you make the window class, you must have CS_OWNDC for the style.

    If that is all ok, well I must say I don't know, and let's hope somebody else has an answer.


    [This message has been edited by Gorg (edited 03-27-2000).]

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    ...
    Posts
    28

    Re: GL Rendering Context

    i've got problems with the RC when going fullscreen ( == program crashes!! )...
    all the tutorials from nehe and stuff can't create a RC..has it to do with win2000 ??

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: GL Rendering Context

    Oh no!.. that doesn't sound good!.. Have you tried on win9x too?.. And it works there?..

    Hopefully its a driver problem. Does the card you have have win2000 drivers?. Check that!

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    ...
    Posts
    28

    Re: GL Rendering Context

    hi,
    a few hours ago i visited a friend of mine,
    carrying a disk with openGL stuff in my pocket..
    he's got the same graphics card (ATI Rage pro) and same 'puter ,with win98...
    We couldn't get this stuff to work,too!
    It MUST have to do with the ATI crap...

  6. #6
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: GL Rendering Context

    Oh I see... Have you tried running other OpenGL apps?.. Like Quake or something?.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    ...
    Posts
    28

    Re: GL Rendering Context

    nope,i don't have quake or something...
    i also have NO time to code some openGL stuff.

    a little question: when i create a window (in Windows...) with the argument WS_POPUP(with no other params,like WS_SIZEBOX),
    am i fullscreen then? if i am,my own code works, if not,could you tell me how to do it?

    i think i will study some code now...

    holy_moly

  8. #8
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Aurora, Illinois, USA
    Posts
    192

    Re: GL Rendering Context

    hehe, i gots windows 2000, my ATI Rage IIc card does the nehe stuff fine (under 98 partition)... I haven't tried it under 2k... I don't go on 2k much, becuase I have a cheap korean sound card, which refuses to make 2000 drivers.
    Navreet Gill [img]/forum/images/%%GRAEMLIN_URL%%/smile.gif[/img]

  9. #9
    Guest

    Re: GL Rendering Context

    I have a voodoo 2 and an ATI Rage IIc, and I seem to be having a similar problem.

    When I try to run Nehe's first windows tutorial fullscreen, it dies on
    hRC=wglCreateContext(hDC).
    However, the program works fine when I run it in a normal window.
    If I put
    PixelFormat=ChoosePixelFormat(hDC,&pfd)
    before
    hRC=wglCreateContext(hDC).
    then the program dies while trying to get the PixelFormat.

    If Gorg is right, then I should mess with my pdf settings in hopes of finding a setup that likes my video cards. But so far I haven't been able to find a working configuration.

    Any advice?

  10. #10
    Guest

    Re: GL Rendering Context

    Hrm, I again tried moving around chunks of the NeHe code, and now I successfully get through the pfd error checking stuff without any problems. But it still fails when I try hRC=wglCreateContext(hDC).
    So now I really have no idea were the problem is.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 07-23-2018, 10:14 PM
  2. Copying rendering context
    By capedica in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 05-27-2005, 05:28 AM
  3. many rendering context
    By psp in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 10-25-2004, 11:06 AM
  4. Rendering context in VC++
    By NOAH IV in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-04-2002, 04:11 AM
  5. Can't get Rendering Context
    By mike in forum OpenGL: Linux
    Replies: 0
    Last Post: 07-12-2000, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean