Thread: Not drawing to rendering context...

  1. #1
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790

    Not drawing to rendering context...

    ok, this is a new problem with my wrapper class for opengl initialization, nothing can get drawn to the rendering context.
    no compiler errors/warnings, Everything loads up fine, I can clear the background color fine, however I cannot draw anything to screen. I have included the project, as I cannot find out where it is at, even though all my initialization code etc. looks fine(yes, i did check for same names in functions this time )

    edit:

    havent implemented anything with the keyboard yet, so ALT+F4 is the only way to close it currently.
    Last edited by EvBladeRunnervE; 12-05-2003 at 04:05 PM.

  2. #2
    What are you using for rendering code?

  3. #3
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    What are you using for rendering code?
    Code:
    void Render()
    {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glLoadIdentity();
    
    glTranslatef(0.0f,0.0f,24.0f);
    glBegin(GL_TRIANGLES);
    glVertex3f(-1.0f,0.0f,0.0f);
    glVertex3f(0.0f,1.0f,0.0f);
    glVertex3f(1.0f,0.0f,0.0f);
    glEnd();
    
    
    SwapBuffers(g_EchGL.g_hdc);
    };

  4. #4
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    glTranslatef(0.0f,0.0f,24.0f);

    should be
    glTranslatef(0.0f,0.0f,-24.0f);

  5. #5
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    that works, i was under the impression though that gltranslatef worked in reverse, i.e. gltranslatef(6.0f,0.0f,24.0f) would move it 6 unites to the left and 24 inward. I really need to practice more, my current school schedule is killing my programming ability. not only is it killing my programming ability its almost killing me. I have almost committed suicide(chickened out cause i dont like the sight of my own blood) this past month trying to make sure I have a 4.0 GPA.
    Last edited by EvBladeRunnervE; 12-05-2003 at 04:56 PM.

  6. #6
    I figured that was your problem. I did the same thing one time and got frustrated, until I figured it out.

    edit: I remembered last year telling myself "Next year I'll hit the books and get a 4.0 GPA all throughout the year." I then realized why I have never kept a 4.0 GPA in high school, once the year started. I had a 3.5 last quarter, and I think I'll get like a 3.6 this time. Mid-terms should bring them both up though. The only reason my grades are as a low as they are is because I don't do homework. I've turned in a total of 10 assignments this quarter, and the quarter only has 2 more weeks.
    Last edited by frenchfry164; 12-05-2003 at 09:42 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. scene graph rendering techniques
    By ichijoji in forum Game Programming
    Replies: 7
    Last Post: 03-19-2006, 12:17 AM
  4. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  5. Device & Rendering Context
    By hannibar in forum Windows Programming
    Replies: 1
    Last Post: 12-16-2005, 05:28 AM