Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Qedo

#21
I rewrite after thread problem.
GLB 15.004 DO NOT COMPILE my FLAG_SPRITE, see source at http://www.glbasic.com/forum/index.php?Topic=11002msg96884#msg96884 and also Kanonet's X_SPRITE program (http://www.glbasic.com/forum/index.php?topic=7992.msg74110#msg74110).
GLB 15.005 fails to install
Can anyone check?
Ciao
#22
GLBasic - en / Flag
2017-May-04
Hello guys, do you need a 3D waving flag in your games? Take a look at this program.
I used Kanonet's great XSPRITE program as base, because in real 3D (with X_OBJADDVERTEX ....) it's slower.
Works with Android.
Let me know.
Ciao
#23
if you want the absolute positioning in DDGUI you must add the following lines of code in DDgui.gbas

   wabspos%=0 //added  line 444
   CASE "XPOS";     wdg.wxpos% = val$;wdg.wabspos%=1 //added  line 767
   CASE "YPOS";     wdg.wypos% = val$;wdg.wabspos%=1 //added  line 768
   IF wdg.wabspos%=1 // added  line 1585
      xpos%=wdg.wxpos% // added  line 1586
      ypos%=wdg.wypos% // added  line 1587
   ENDIF // added  line 1588


and use absolute positioning in this way:
DDgui_set(L_n_rate_year$, "YPOS",120)
DDgui_set(L_n_rate_year$, "XPOS", 50)



Only tried with DDgui_widget DDgui_numbertext DDgui_text DDgui_button.
These changes should not create incompatibility with standard DDGUI programs.
If this happens I apologize.
Let me know
Ciao
Qedo
#24
Hello to all
I wanted to write a simple rate and banking calculator by using DDGUI.
I found big problems to place text input and widget because of its relative positioning of the controls.
So I slightly modified the code DDGUI adding 7 lines of code.
I can now precisely place where I want DDgui_widget DDgui_numbertext DDgui_text DDgui_button.
Only tried with these.
if anyone is interested I will send the code
ciao
Qedo
#25
Hello to all
Do you know if there are problems with DDgui compiled for Android?
I tried with DDgui_test.gbas and also with my simplified version but with no success.
Tried with BlueStacks emulator and my smartphone (LG G3 Android 6.0) .
Error: "The application has stopped."
Some idea?
Ciao
Qedo
#26
GLBasic - en / GL ES
2016-Dec-09
Hi all
It is expected to shift to the GL ES 2.0 or higher?
I would like to use the Shader on Android.
Ciao
Qedo
#27
Hi
this example provides 2 different output in debug mode and in normal mode.
This problem has made me crazy in the vector font program that I'm writing
Ciao
Qedo

// Project: bug
// Start: Tuesday, August 16, 2016
// IDE Version: 14.329

a=0
IF a<>0 THEN
a=a-100
PRINT a , 10,10
SHOWSCREEN
MOUSEWAIT
#28
It seems don't work SETMOUSE in PRESCALER condition (V14.006), without the command SYSTEMPOINTER TRUE
Try the example  and after, commenting "SYSTEMPOINTER TRUE".

Code (glbasic) Select

GETDESKTOPSIZE sx,sy
SETSCREEN sx,sy,1

SYSTEMPOINTER TRUE // if comment this line don't work SETMOUSE in PRESCALER condition
xfactor=3
xs=sx/xfactor
ys=sy/xfactor
PRESCALER xs,ys

   WHILE TRUE
      DRAWRECT 100, 100, 300, 100, RGB(255, 255, 0)
      LimitMouse(100, 100, 400, 200)
      PRINT "<=", mx, my
      IF b1 THEN END
      SHOWSCREEN
   WEND

FUNCTION LimitMouse: minx, miny, maxx, maxy
   MOUSESTATE mx, my, b1, b2
   PRINT mx+" "+my,0,0
   IF mx<minx THEN mx=minx
   IF mx>maxx THEN mx=maxx
   IF my<miny THEN my=miny
   IF my>maxy THEN my=maxy
   SETMOUSE mx, my
ENDFUNCTION


#29
I'd like to know your thought on how to handle PRESCALER?
logical 1 or 2?, or other?
Ciao

1) graphic output fixed: example 480,320

     PRESCALER 480,320

     case  a:
      native resolution 1920-1280:  scaling factor = 4 (1920/480,1280/320)
     case  b
      native resolution 1280-720:  scaling factor = 2,66 (1280/480) o 2,25 (720/320)

     cons: only case "a" WORK, case "b" DON'T WORK considering the parameters of the scaling command PRESCALER
     pros: graphic output fixed

2) scaling factor fixed: example 4

   scaling_factor=4
   GETDESKTOPSIZE sx,sy
   xs=sx/scaling_factor
   ys=sy/scaling_factor
   PRESCALER xs,ys

     case a:
      native resolution 1920-1280:  graphic output = 480,320 (1920/4-1280/4)   RATIO 1.5 
     case b
      native resolution 1280-720:  graphic output = 320,180 (1280/4-720/4) RATIO 1.77


   cons: graphic output depending on the resolution of the video device (consider the multitude of resolutions in the world Android) and different ratio
   pros: ?
#30
this simple program work correctly in GlBasic 10.283 and creates a sprite hole, while don't work in Glbasic 11.414  (see the picture)
Any idea?
Ciao


id% = GENSPRITE()
// Create virtual screen
CREATESCREEN 1,id%,32,32

USESCREEN 1
DRAWRECT 0,0,31,31,RGB(255,255,255) // white background os the sprite
DRAWRECT 4,4,24,24,RGB(255,0,128)  // transparent hole in the sprite

USESCREEN -1
DRAWRECT 100,100,70,70,RGB(255,0,0)  // draw the red background

DRAWSPRITE id%,120,120  // draw the sprite

SHOWSCREEN
MOUSEWAIT
#31
Hi,
I'm writing a program for runners on Android. Someone's how to use GPS module?
Thank you
Ciao
#32
GLBasic - en / array index
2012-Feb-12
hello all.
where is the mistake?
with  array3dLen_C = 80 all OK. With upper indices there is the error:
EXCEPTION_STACK_OVERFLOW.

ciao

INLINE
      int tc, zc, yc;
      int array3dLen_C=80;
      int array3d_C[array3dLen_C][array3dLen_C][array3dLen_C];
      for (tc = 0; tc < array3dLen_C; tc++)
         for (zc = 0; zc < array3dLen_C; zc++)
            for (yc = 0; yc < array3dLen_C; yc++)
                array3d_C[yc][zc][tc] = i;
ENDINLINE
#33
Code Snippets / POW speed
2011-Sep-17
Don't use POW function  for value of power less or ugual to 40. It is very slow
Try this code
Ciao


[attachment deleted by admin]
#34
I ask two things to those more experienced than me.
1) between GLB and C, in the float matrix multiplication benchmark, why there is a relationship in the rate of 5/1?   1400ms GLBasic and 300ms INLINE C. I think too high
2) Why the local arrays slow the program by 60%? LOCAL=2300ms against GLOBAL=1400ms.
To see this uncomment:
// LOCAL  a[]
// LOCAL  b[]
// LOCAL  c[]
Ciao

[attachment deleted by admin]
#35
It is  possible in GLBasic runs in parallel (multitasking?) two (or more) programs  and to share a common memory area?
I think it would be useful the use of pointers but is not possible in GLBasic
Perhaps using INLINE. Does anyone have any examples?
Ciao
#36
I found an old program of Mandelbrot written in  GlBasic and Blitx 3D and comparing the speed in pixels per second was disappointing:
150 Kpixel GLBasic  and 1000 Kpixel Blitx3D
I tried to understand why GlBasic was so slow and I found that the bottleneck was the command SETPIXEL.
I replaced it with the MEM2SPRITE and voila the program has jumped to 2000 Kpixel!!!
Great GLBasic  :good:
Ciao

[attachment deleted by admin]
#37
would not be better that the update files rather than generically called glbasic_sdk.exe, were called glbasic_sdk_10.57.exe  or  glbasic_sdk_10.68.exe for example? In this way with the version number in the filename would become much easier to manage updates.
Ciao
#38
new QSIN (QQSIN).
on my computer (notebook):
QQSIN = 230 ms
QSIN   = 580 ms
SIN GLBasic= 1150 ms
Wait your time


[attachment deleted by admin]
#39
Hello everyone,
I want to write a program (especially for smartphone) management training for runners , and then I also manage the data base even if very simple, tables and graphic.
My question is: is GLBasic  a programming language suitable for this purpose?
Thank you
#40
Hi all,
it's possible capture portion of screen outside the program of glbasic  (capture desktop,explorer,firefox etc)?
I would like write a magnifier program in windows system.
Thank you
Edo