graph not displayed (from png and fpg)
I can't see the loaded images in both ways :
from png :
import "mod_video" import "mod_key" import "mod_map" import "mod_draw" import "mod_mouse" import "mod_proc" process int main() begin set_mode(640, 480); set_fps(0, 0); graph = png_load("image.png"); x = 320; y = 240; while(!key(_esc)) frame; end end
from fpg :
import "mod_video" import "mod_key" import "mod_map" import "mod_draw" import "mod_mouse" import "mod_proc" process int main() begin set_mode(640, 480); set_fps(0, 0); file = fpg_load("images.fpg"); graph = 1; x = 320; y = 240; while(!key(_esc)) frame; end end
I only get a black screen (the problem doesn't come from the png nor the fpg, because it works with BennuGD v1).
Comments (21)
-
repo owner -
reporter I was using the asynchronous fpg_load method (which does not works). But the synchronous method is working well you're right. I'm trying to reproduce the png bug. I'll let you know.
-
reporter This code doesn't works (png bug) :
import "mod_say" import "mod_proc" import "mod_grproc" import "mod_map" import "mod_text" import "mod_key" import "mod_video" import "mod_screen" import "mod_draw" process int main(); begin set_mode(800, 600); set_fps(60, 0); mouse.graph = png_load("inventoman.png"); loop if(key(_esc)) break; end frame; end end
I'm using this image from your examples folder :
-
repo owner I cannot seem to replicate this bug. I have compiled your code and run it in my Linux desktop, but it seems to be working as expected: https://vimeo.com/153982351
Could you please provide more details on your running environment?
-
reporter I'm on Windows 10 64bits.
6Go of ram
Core i7-3632QM CPU @ 2.20GHz 2.20GHz
AMD Radeon HD 7670M
Intel HD Graphics 4000
-
repo owner This might be related to
#28.Have you updated the graphics drivers for both cards to the latest version? Is there any difference if you run the code using the different graphics cards? Can you run the code with debugging info and report on the output?:
pxtp -d main.dcb
-
reporter Here are the debug outputs :
Renderer info: ============== Accelerated rendering: 1 Render to texture: 1 Rendering driver: opengl VSYNC: 0 Max texture size: 16384x16384 Renderer size: 320x240 Renderer info: ============== Accelerated rendering: 1 Render to texture: 1 Rendering driver: opengl VSYNC: 0 Max texture size: 16384x16384 Renderer size: 800x600
I've checkd my drivers, they are all up to date. The png load and fpg load functions works well with others png / fnt. It seems that it doesn't works only with the files from your examples folder. That said, do I have to create a new bug repport for the asynchronous fpg loading function ? Because it's another "problem". The asynchronous method never works.
-
repo owner The code looks fine.
I'm going to ask a silly question, now: The files you are trying to load are located in the same path as the PRG files, right? I mean: I'm assuming the paths are correct.
Also: does it make any difference if you uncompress the FPG file?
As for the asynchronous loading: yes, please, open a new bug report.
-
repo owner Another question: which executable files are you using?
-
reporter Yes, the files are located in the same path as the PRG. The program work well if I try with BennuGD instead of PixTudio. What do you mean by uncompress the FPG file ? You mean, to export the images ? I'm using the last version of PixTudio, wich I have compiled myself as described in your tutorial.
-
repo owner PixTudio/BennuGD can read from compressed gzip files, so MAP, FNT and FPG files are usually compressed with gzip (but the ".gz" extension is removed).
Could you please try the binaries compiled by @panreyes from here: http://www.panreyes.com/pixtudio-win32.zip
-
reporter I've tried with decompressed fpg > same result I've tried with the binaries compiled by Pablo Antonio Navarro Reyes > same result
I will try on another computer to see if the problem comes from mine.
-
reporter Ok, I made some tests on another computer (computer 2). On computer 2, this code doesn't works :
mouse.graph = png_load("test.png");
But this one works :
mouse.graph = png_load("C:\test\test.png");
It works with absolute path. I'm 100% sure that my test.prg file is in the same directory than test.png. They are both in "C:\test\" directory. But on computer 1, the absolute path doesn't works... I realy don't know from where can the bug come from. This is realy strange. I've used the same PixTudio exe on both computers.
The computer 2 config is :
Windows 10 64bits 6Go of ram Core i5 M480 CPU @ 2.67GHz 2.67GHz AMD Radeon HD 5000M
-
repo owner Could you please try compiling and running both test.prg and test.png from the same directory where pxtp.exe lives?
-
reporter Here are the results with both files in the same directory where pxtp.exe is :
Computer 1 :
-
bennugd : not working
-
pixtudio : not working
Computer 2 :
-
bennugd : not working
-
pixtudio : working
-
-
reporter Is it possible that the problem comes from the fact that I'm running on a 64 bits OS ?
-
reporter Related bennugd.org forum post : http://forum.bennugd.org/index.php?topic=4202.0
-
reporter - changed status to resolved
The working directory when running the game must be the game folder :
cd game_folder C:\pixtudio\bin\pxtp.exe my_game.dcb
instead of :
C:\pixtudio\bin\pxtp.exe C:\game_folder\my_game.dcb
-
repo owner Thanks for having a look and sorry for not answering earlier; I've had a complicated last week.
Is this behaviour any different from BennuGD's? If it is, then that can be a bug, since I did not intend to change it.
-
reporter Yes, this behaviour is different from BennuGD's. It works well on BennuGD.
I hope all is ok for you (about your complicated week).
-
repo owner Thanks :)
I will open a new issue and have a look at this different behaviour.
- Log in to comment
This should be working. Can you please attach the PNG and FPG files that do not work?