Jump to content
  • Advertisement

guepe

Member
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

122 Neutral

About guepe

  • Rank
    Newbie
  1. guepe

    Whats wrong here?

    i don't know how you are learning c, but if you want a good tut, here is a link (of course you can learn faster than written here !) http://newdata.box.sk/bx/c/ How in this forum do you write links???? [url][/url] doesn't work...
  2. guepe

    Whats wrong here?

    the first error is the problem (i think) return0 is unknown... but return 0 is known by the compiler you forget the space !!! ;-)
  3. thanks a lot !!! it's working, i have just a small bug but i think i'll manage with it ;-) yaouuhh it's working !!!!!!!! you're my hero ;-)
  4. i managed to print "something" at the screen with that code (all vars. are int_64) do { if(active && !DrawGLScene()) done = true; QueryPerformanceCounter((LARGE_INTEGER*)&fin); //capture le timer apres dessin delta_time = (fin.QuadPart-debut.QuadPart); }while(delta_time==0); if i print delta_time "as is" i have 249/250 ... but i have to divide it by freq, initialised by a QueryPerformanceFrequency, and it simply return 0... even if i multiply delta_time by 1000000000 (!) What can i do??? i really need that stuff... thx.
  5. Quote:LARGE_INTEGER The LARGE_INTEGER structure is used to represent a 64-bit signed integer value. typedef union _LARGE_INTEGER { struct { DWORD LowPart; LONG HighPart; }; LONGLONG QuadPart; } LARGE_INTEGER; Members LowPart Specifies the low-order 32 bits. HighPart Specifies the high-order 32 bits. QuadPart Specifies a 64-bit signed integer. Remarks The LARGE_INTEGER structure is actually a union. If your compiler has built-in support for 64-bit integers, use the QuadPart member to store the 64-bit integer. Otherwise, use the LowPart and HighPart members to store the 64-bit integer. great.... I tried to declare my vars. in __int64.. works fine with that code : QueryPerformanceCounter((LARGE_INTEGER*)&debut); //capture le timer avant dessin do { if(active && !DrawGLScene()) done = true; QueryPerformanceCounter((LARGE_INTEGER*)&fin); //capture le timer apres dessin }while((fin-debut)*1.0/freq==0.0); but i can't store the result of that operation : (fin-debut)*1.0/freq, because if it's declared as a float, it simply doesn't mean anything (a float is too short for it, so i have a negative numbre :-( ), so i can't determine the fps, the time time that pass painting the frame... :-( any idea? thanks a lot !
  6. But if i define fin, debut, freq to LARGE_INTEGER, i can't do the operation : fin-debut, because : error C2676: binary '-' : 'union _LARGE_INTEGER' does not define this operator or a conversion to a type acceptable to the predefined operator how can i handle the results of QueryPerformanceCounter and QueryPerformanceFrequency? [edit] i've corrected a line that wasn't good : QueryPerformanceCounter((LARGE_INTEGER*)&debut); //capture le timer avant dessin do { if(active && !DrawGLScene()) done = true; QueryPerformanceCounter((LARGE_INTEGER*)&fin); //capture le timer apres dessin delta_time = (fin-debut)/freq; //changed that line }while(delta_time==0.0f); fps=delta_time;
  7. I'm trying to set up a timer in my app, here is the declaration of const. : double debut, fin,freq; //for timer : start, end, frequency... float delta_time; //delta in sec. between start/end another const. is fps, a float. and here is how i implemented the timer : QueryPerformanceCounter((LARGE_INTEGER*)&debut); //capture the timer before drawing do { if(active && !DrawGLScene()) done = true; QueryPerformanceCounter((LARGE_INTEGER*)&fin); //capture the timer after drawing delta_time = (fin-debut)/QueryPerformanceFrequency((LARGE_INTEGER*)&freq); }while(delta_time==0); fps=1/delta_time; it compiles with a warning : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data in fact, the app freeze and stay in the infinite in the do..while loop... i suppose it's a type problem - see warning - but i don't know what to do : i tried many things, but at the best the fps is a small 0
  8. Yes i use MSVC++ (sorry if it wasn't clear)... In fact, OpenIL is a library for open/save pictures : see http://openil.sourceforge.net/ arf, for visual c++, the link is not exactly WITH the others !!! ;-) i'm really soryy bothering you with such a small pb ;-) lol, i have to change my eyes ;-) Thanks for everything !!! see you...
  9. Hello guys !! I'm new to this forum, but i code for 3-4 years... more recently, i wrote a small app in c++, and found it wonderful.. so i'm trying to code opengl app... And after reading many tuts, code etc... i wrote some code but : after reading lesson10 in Nehe's website, i downloaded the code of VisualC++/OpenIL source code and just tried to run the .exe in the zip file... Error, it need OpenIL.dll I downloaded the end user openIL lib (and the dev too, but it's not needed for the exe founded in the nehe's zip) and found some dll in it... But no OpenIL.dll !!! In fact, if i rename a dll to openIL.dll, it doesn't work (they are needed too) but i can't find any OpenIL.dll file !! What can i do guys?? PS : if my english is not understandable, tell me so, i'll re-write my post :-(... thanks a lot!!! [edit] i tried to compil the project... i put the il source in include/il, the build works but when linking : lesson10.obj : error LNK2001: unresolved external symbol __imp__ilDeleteImages@8 lesson10.obj : error LNK2001: unresolved external symbol __imp__ilutGLBuildMipmaps@0 lesson10.obj : error LNK2001: unresolved external symbol __imp__ilutGLTexImage@4 lesson10.obj : error LNK2001: unresolved external symbol __imp__ilLoadImage@4 lesson10.obj : error LNK2001: unresolved external symbol __imp__ilBindImage@4 lesson10.obj : error LNK2001: unresolved external symbol __imp__ilGenImages@8 Debug/lesson10.exe : fatal error LNK1120: 6 unresolved externals Error executing link.exe. lesson10.exe - 7 error(s), 0 warning(s) bouh :-( what am i doing wrong? Here is lib i have in my project settings/link opengl32.lib glu32.lib glaux.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib [Edited by - guepe on August 4, 2005 4:43:03 AM]
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!