Recent Posts

Pages: [1] 2 3 ... 10
1
Bug Reports / Re: Profiler broken?
« Last post by bigsofty on Today at 12:05 am »
Still no luck for me I'm afraid, I'm pretty sure I tried this earlier but I went though the steps again here just in case and still no "gmon.out". Hmm...

BTW there are a couple of Windows utils that will produce a profile graph based on gmon.out...

http://www.graphviz.org and https://github.com/jrfonseca/gprof2dot

You'll need to make sure python is install first though.

EDIT: OK, I got it working. The main problem was the project command line options. I chose Win64 as my target, so I added "-pg" to the linker and GCC for that platform(Each platform has its own set of command line options). BUT there seems to be a bug with the project options even if you choose Win64 the GLB compiler ONLY uses Win32 projects command line options. Changing the Win32 ones(even though I'm not compiling Win32) seemed to add the "-pg" to the compile process.

Thanks for your help Dreamerman.  :booze:
2
GLBasic - en / Re: Fullscreen fix
« Last post by dreamerman on Yesterday at 09:48 pm »
So You are rather looking for something like PRESCALER command? To get Your game scaled properly to all resolutions that user can choose.
There was also one system for that made by spacefractal
Or I'm getting something wrong - it's late :D
3
GLBasic - en / Re: Fullscreen fix
« Last post by MrPlow on Yesterday at 09:42 pm »
No fancy modes or 3D in use - or extern files.

1280 x 1024 is my destop and I have my project set to 1366 x 768 for common laptop full res settings.

As a test, I want to be able to resize to the 1280 x 1024 then re-position and rescale from 1366 to 1280 and center with a letterbox using createscreen sprite of 1366 x 768.

It seems the best alternative for me I think.


4
GLBasic - en / Re: Fullscreen fix
« Last post by dreamerman on Yesterday at 09:24 pm »
hm.. on what OS You have problems with SetScreen? Did You tried using SetScreen on basic project just ot test if some graphic functions like 3d is causing problems?
Personally I didn't encounter problems with SetScreen apart one - default res 720p game on some user laptop (WXGA display) - game window was wrongly positioned - wasn't centered (so he wasn't able to see bottom of it), but that can be bypassed by manual change in app cfg file.
5
GLBasic - en / Fullscreen fix
« Last post by MrPlow on Yesterday at 08:52 pm »
Hi

Just wondering if anyone has a solution for setting the fullscreen on GLB
So if a fullscreen fails then the screen window stretches to the desktop width and height...
tried with setscreen but not working for me.
6
Bug Reports / Re: Profiler broken?
« Last post by dreamerman on Yesterday at 10:18 am »
Just tried and -pg is working ok (tested on small project), comment strip command, add '-pg' in project options in cmp & link, compile your app normally (no profiler).
Run your app for some time, so You will have something to measure, end/exit it, now it should create 'gmon.out' file, create .bat file or launch cmd, assuming that You will launch gprof.exe from app directory command should like this:
"GLBasic_SDK\Compiler\platform\Win32\bin\gprof.exe" youapp.exe gmon.out > profiler.txt
And here you have it. Only thing that those result's are basic and maybe could be better with other profiler/debugger - I will need to check some of them as nice graphs and better info/details would be handy :)

ps. I've checked some other profilers but all have some problems, either are vendor specific (AMD, Nvidia, Intel) or work only with VS projects (need *pdb file) and so on.. Basic gprof output may be sufficient, but I would like to compare it to GLB profiler (yet still can get it work even with previous versions hm..).
7
Bug Reports / Re: Profiler broken?
« Last post by bigsofty on 2019-May-22 »
Thanks for the tips Dreamerman. Yeah, I was kinda hoping that the command line was read from somewhere, same as platform.ini but no luck. Strangely I can't seem to get "-pg" to work, even with stripping off.  :S

Simplest solution would be to use an old version of GLB, I know I had it working a couple of months back. It's not great though, kinda grinds my game to a halt when it is working, considering your profiling execution speed I worry about the accuracy of the profiler, when the profiler is affecting performance in such a way. Hence trying to get the GCC profiler to work on the raw C++.
8
Bug Reports / Re: Profiler broken?
« Last post by dreamerman on 2019-May-22 »
That command is surely added by GLB Editor during compilation, so rather no way to fix this in that way. One workaround is to compile from cmd, You can grab whole compilation/link command passed to gcc using this
Start compile in GLB with profiler, switch to ProcessExplorer when GLB comes to 'link' part, hit space (on ProcessExplorer - pause refreshing) search for g++ entry and copy whole cmd, fix that wrongly placed ' ', save that to .bat file. Use it after GLB 'compile' stage to get your app (it would be something like output.obj in %TEMP%\glbasic folder).

On other hand just checked GLB v15 and I have some issues with profiler.. Didn't use it from a long time, yet I remember that it worked, now it produces empty csv file, maybe I'm doing something wrong...

ps. to avoid symbols stripping just comment (';') one line in proper platform.ini file:
Code: GLBasic [Select]
strip="%GLBASIC%Compiler\platform\Win32\bin\strip.exe" --strip-all
9
Bug Reports / Re: Profiler broken?
« Last post by bigsofty on 2019-May-22 »
Had a quick look, via a recursive text search in the GLBasic compiler  but no luck finding a editable text file to fix it. Which is a pity since most of the GCC compiler and linker command line params are editable this way.

I was going to try GPROF (-pg on the project options GCC and Linker command line params) as a stand in but no luck, maybe because the symbols are stripped when creating an executable in GLB? This would actually have suited me better since I use quite a bit of inline C but oh well.
10
Bug Reports / Re: Profiler broken?
« Last post by dreamerman on 2019-May-21 »
Yes it's an error, surely with passing arguments to GCC (g++.exe) during link stage, GLB just doesn't add space before '-lGLBProfiler' command. Checked and 'GLBProfiler' library is in proper directory directory. File: 'resource.o' is from what I remember icon file, as now it's linked/added to project in different way than in previous GLB versions.
But another thing should be fixed too (also easy-to-fix), 'resource.rc' that's VERSIONINFO file, it contains little bug;
BLOCK "StringFileInfo" and BLOCK "VarFileInfo" should contain translation in same language code, now GLB sets StringFileInfo to '0809' code - UK English, but VarFileInfo has only translation for '0x409' - US English, this way file doesn't show proper description (author, copyright, version) in file-properties-details in system.
Just set both block's to same language, best US English so it would be:
Code: GLBasic [Select]
BLOCK "040904E4"
[...]
VALUE "Translation", 0x409, 1252
 
Info about VERSIONINFO resource file
Pages: [1] 2 3 ... 10