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

Messages - Qedo

#31
for six number:

   DIM wuerfel[6]
   IF wurf = FALSE
      FOR i=0 TO 5
         wuerfel = RND(5)+1
      NEXT
      wurf = TRUE
   ENDIF
   SORTARRAY wuerfel[], 0
   FOR i=0 TO 5
      ZOOMSPRITE wuerfel,320+200*i,865,2,2
   NEXT
   END
#32
I did it myself, thanks anyway
Happy New Year to all
#33
Missing attachment in this post:
https://www.glbasic.com/forum/index.php?topic=3839.msg28012#msg28012
Is it possible to reactivate?
Thank you
#34
Couldn't it be the older version of emscripten (1.39.20)?
#35
it seems so, see https://www.glbasic.com/forum/index.php?topic=6569.msg52954#msg52954
I tried to compile Opengl.bas and compile it though the result does not seem correct to me
My Python version is 3.8.3
#36
we never think about simple things :D
#37
about the local web server not working but are you sure you have python installed?
To check this, open a cmd and run python.exe
#38
try this:

SETLOOPSUB "MainLoop1"
SUB MainLoop1:
   PRINT "Hello World",10,10
     SHOWSCREEN
ENDSUB
#39
If the "Media" folder is empty this is probably the problem.
Put any file in it and recompile.
Once compiled, forget XAMPP and run "run_local_test.bat" instead
#40
QuoteThere is not much documentation, but almost everything should work. My G.A.C.K. games run in HTML5.

Yet Gernot in HTLM5 the mouse test:

SETLOOPSUB "MainLoop1"
SUB MainLoop1:
    PRINT "X:" + MOUSEAXIS (0), 0, 0
    PRINT "Y:" + MOUSEAXIS (1), 0, 20
    PRINT "Z:" + MOUSEAXIS (2), 0, 40
    PRINT "A:" + MOUSEAXIS (3), 0, 60
    PRINT "B:" + MOUSEAXIS (4), 0, 80
    PRINT "C:" + MOUSEAXIS (5), 0.100
    SHOWSCREEN
ENDSUB

only the left mouse button works.
Any idea?

#41
OUTLINING_LIMIT is an error I get when compiling with HTML5.
If I compile with HTML5-WebGL everything is OK
Tried with version 16.947 and the latest html5 Steam version (not sure which version)
#42
GLBasic - en / Re: OPENGLES
2022-Sep-05
it is true I realize the work, but I thought it is not possible to access Opengl ES 2.0 via SDL 2.0?
#43
what do you miss? my problem are ideas. I should do a refresher on my brain  =D
#44
Your solution that allows you to add a smaller or smaller image into a larger one is really functional. Great  :booze:

but two things don't work on my system:
1) the square brackets in
   unsigned char * low = (unsigned char *) & pixels [0] ;
   unsigned char * high = (unsigned char *) & pixels [(height -1) * width];

  with them the program does not compile with error: "no match for 'operator []"

2) the variable "stride" crashes the program
unsigned char * high = (unsigned char *) & pixels [(height-1) * stride];
#45
Right considerations dreamerman even if something I don't understand.
I answer where I can.

A) Size of int:
   In both Win32 and Win64, int and unsigned int, equal 32 bits, see Range of values ??https://en.cppreference.com/w/c/language/arithmetic_types#Data_models
B) Win64:
   it is correct as it is does not compile, it is necessary;
   1) delete typedef unsigned int size_t;
   2) vary these 2 lines in:
        extern "C" void * memcpy (void * destination, const void * source, unsigned int num);
        extern "C" void * memset (void * ptr, int value, unsigned int num);

   or:
   
   delete typedef unsigned int size_t;

   obviously size_t in Win32 Win64 is already declared but I don't understand why it gives problems only in Win64

C) OpenGL ES:
   glGetTexImage instead of glReadPixels could be done but notoriously glReadPixels is very slow and so I didn't even consider it.
   On the internet, in addition to the example you gave me, other examples are at least for OpenGL ES2.0 with commands incompatible with GLBasic version 1.1.

D) "unsigned char * high = (unsigned char *) & pixels ((height -1) * width);"
   Unfortunately I'm not much of a C ++ expert but "((height -1) * width)" returns the address of the beginning of the last line of an integer array.
   Example with a 4x2 matrix "((height -1) * width)" will be = 4 which with the cast (unsigned char *) will become 16. So with "unsigned char * high" high points to the sixteenth byte address. At least I have reasoned that way and it seems to work.
   
   The variable "stride" instead represents the length in bytes of the sprite line

E) Instead I don't understand:
   "in c ++ examples the last variable isn't 'width' but 'stride' -> 4 * width, and I was wondering why it's working here, then looking at rest of code reminded me that as function argument you are using glb int array without casting it to 'uint char / byte' "

Sorry if I answered without a specific order and a bit at random but I hope it's clear
Thank you
Ciao