GLBasic forum

Main forum => GLBasic - en => Topic started by: msx on 2012-Sep-12

Title: Problems using CREATESCREEN/DRAWSPRITE
Post by: msx on 2012-Sep-12
Hi, I need to create a virtual screen of 2200 px and does not work properly because DRAWSPRITE draws nothing. What could be the problem?.

Code (glbasic) Select
CREATESCREEN 2,100,768,2200
USESCREEN 2
PRINT "TEST",0,0,1
USESCREEN -1
DRAWSPRITE 100,0,0
SHOWSCREEN
MOUSEWAIT
END
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: Ian Price on 2012-Sep-12
Your code worked for me.
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: msx on 2012-Sep-13
How is it possible?  :S Tested on PC and WebOS  :sick:
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: matchy on 2012-Sep-13
Does the code work for smaller sprite sizes? Instead of print, try drawing some lines!
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: msx on 2012-Sep-13
It works perfectly for smaller virtual screens. Actually my code includes graphics (DRAWSPRITE and DRAWRECT). I used PRINT only to post a simple example.
I've noticed that does not work for dimensions greater than 2000 px.
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: MrTAToad on 2012-Sep-13
Could you make the sprite available too ?
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: matchy on 2012-Sep-13
Alright. So as not to createscreen, can you just loadsprite and drawsprite a pre-made image larger than 2000px?
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: spicypixel on 2012-Sep-13
Problem a gfx card texture issue ?
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: spacefractal on 2012-Sep-13
Some graphics dont support officeren lagrer then the desktop resolution used, what what you using?
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: kanonet on 2012-Sep-13
There are minimum and maximum texture sizes for each graphic card/driver. Maybe your one does not support images bigger than 2048pxl.
But you can still load the Image with LOAD2MEM and resize it manually before you transform it to an displayable sprite with MEM2SPRITE.
Title: Re: Problems using CREATESCREEN/DRAWSPRITE
Post by: msx on 2012-Sep-15
Thanks to all, I have finally chosen split into two virtual screens.