TotalVidMem() on Windows 10.
Blitz3D Forums/Blitz3D Programming/TotalVidMem() on Windows 10.
| ||
DrawText ("Total RAM : " + TotalVidMem(), 30, 60) returns an odd number. My PC. 4 G Ram. 1 G Graphics Card. Any suggestions ? How else can know how much memory the application concerned if this command does not work properly? |
| ||
The same problem: http://www.blitzbasic.com/Community/posts.php?topic=74880 My function to display unsigned integers is near the bottom: http://www.blitzbasic.com/Community/post.php?topic=74880&post=1199764 |
| ||
DrawText ("Total RAM : " + unsigned$(TotalVidMem()), 30, 60) Return: This is how I use this feature? As I convert this data in megabytes? |
| ||
This was answered higher up in the same thread. Here is an example.big = 2500 * 1024 * 1024 ; 2500 megasomethings Print Print big Print unsigned( big ) Print VideoMB( big ) WaitKey Function VideoMB( VidMem ) ; approximate number of megabytes. VidMem = VidMem / 2^20 If VidMem < 0 Then VidMem = VidMem + 2^12 ; 2^12 = 2^32 / 2^20 Return VidMem End Function |
| ||
big = TotalVidMem() * 1024 * 1024 ; 2500 megasomethings Print Print big Print unsigned( big ) Print VideoMB( big ) WaitKey Function VideoMB( VidMem ) ; approximate number of megabytes. VidMem = VidMem / 2^20 If VidMem < 0 Then VidMem = VidMem + 2^12 ; 2^12 = 2^32 / 2^20 Return VidMem End Function Function unsigned%( n ) If n >= 0 Then Return n Local digit, prefix digit = ( 10 + (6 + n) Mod 10 ) Mod 10 prefix = 429496729 + n / 10 - ( digit > 6 ) Return ( prefix ) + ( digit ) End Function Return: I'm a little confused, I have a video card of 1024 megawatts, 1 gig, e sto is what returns. The question is, where the value of the memory of 4 GB of system memory or graphics card is taken? I greatly appreciate the help and patience, I am ignorant of many things. |
| ||
This is embarrassing , now I find that my graphics card is 2 gigabytes. :) Thanks a lot for the help. :) |
| ||
My GFX is only 3GB, so you're not that far behind the low end. |
| ||
My GFX is only 3GB, so you're not that far behind the low end. I only have 1GB, and it still plays everything I want to.. |
| ||
Mine's not too bad either, seems to be handling what I need it to; but I know there's much more powerful stuff out there for the more finacially stable user. |