Thread: Question

  1. #1
    Banned
    Join Date
    Oct 2004
    Posts
    250

    Question

    i got a question there is alot of syntax to learn in OpenGL and D3D should i try to memorize all of it or keep a database of all the functions and search for them when i need ?

  2. #2
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    memorize

  3. #3
    Banned
    Join Date
    Oct 2004
    Posts
    250
    i better start now then does anyone know if there is something wrong with this code? im getting realy bad framerates with nothing drawn i just cant work it out
    here is what i am using to find the framerate
    Code:
    static float lastTime = 0.0f;
       static float framesPerSecond = 0.0f;
       static char FrameRate[50] = {0};
    
       float CurrentTime = GetTickCount() * 0.001f;
       ++framesPerSecond;
    
       if(CurrentTime - lastTime > 1.0f)
       { 
    	   lastTime = CurrentTime;
    	   sprintf(FrameRate,"FrameRate : %d",int(framesPerSecond));
           framesPerSecond = 0;
       }
       glDrawText(10,10,FrameRate);

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    There is nothing wrong with the code. Its the same code I use which I got from gametutorials.com

    What frame rate are you getting?
    I dont think glDrawText() is a standard function so maybe something is going wrong in there.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM