BASIC

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
I think the profiler can get you there, but I don´t know how to use it. :-[
12
confirmed.

howover if you have access to the source code and download it. Not sure why Gernot limit it, since its could been higher. its currectly limited to 4096. If you ask me, this should been possible to change to whatever limit, so its a array issue.

But if you have download the source code, you can change this line in the file rainbows3d.h to a higher value:

#define GLR_MAX_OBJECTS      0x1000

0x1000 is set to extractly 4096 and not sure its possible to REDIM it.

You can actuelly download the source code and recompile it.
13
GLBasic - de / Re: Steam Version 16
« Last post by Schranz0r on 2019-Feb-19 »
Gernot anschreiben :)
14
There is a profiler function in the menu that lists time in all functions so you can find your bottlenecks.

Compiler->Profiler->Active
and ->Output after running the game/program.

15
Hola Compis (no se si alguno sobrevive aún)  =D, quería haceros una pregunta la he puesto en el foro Inglés, pero como mi inglés es realmente malo quizás no se entienda.
Bueno el asunto es:
Como puedo medir el tiempo que necesita una función o en su defecto todo el tiempo que necesita mi programa en ejecutarse, algo similar a lo que hace el comando TIME en Linux, o algo similar a Vlagrind.

Gracias como siempre por vuestro tiempo.
;)
16
Hi folks, how I can calculate the time needs a function to do his work?¿...

I want say something like the TIME command on Linux, (I think this command says the time of all Code, not only function, but is enough for my needs)

Thanks in advance.

17
Yes  :(

By cons, you are right in my test program it's not 4096 but 4224 the max  :D  :S 

I'm going to bed, this bug gives me a headache :sick:

Thank You Hemlos.

18
ye, sounds like an array crash
19
Hmm, I think you didn't understand the problem, but perhaps I'm poorly explained.
While you were answering me I wrote a modification in my first message, maybe it's clearer no?

If you exceed the number of 4096 objects in your program, your program crashes completely.
20
actually its 4224=4096+128 objects, but whos counting anyways? lol

i realize this defeats the purpose of having no extra files to load, yet...
u can reuse object ID numbers, and can save infinite amounts of objects to drive.

Code: GLBasic [Select]
INC num, 1 ////etc etc etc
CreateCube(num, sz)

// ------------------------------------------------------------- //
// -=#  CREATECUBE_NO_TEXTURE: Fast but without texture  #=-
// ------------------------------------------------------------- //
FUNCTION CreateCube_no_texture:  num, sz
        // Diese Variablen sind als LOCAL definiert:
        // num, sz,

        // 2-4-3-1
        // | | | |
        // 6-8-7-5
        //   | |
        //   6-5
        //   | |
        //   2-1
        //   | |
        //   4-3 Strip: 4 3 8 7 5 3 1 4 2 8 6 5 2 1

        // Normals + culling is wrong!!

LOCAL s[], n, m, x,y,z
        DIM s[14]
        s[0]=4; s[1]=3; s[2]=8; s[3]=7; s[4]=5
        s[5]=3; s[6]=1; s[7]=4; s[8]=2; s[9]=8
        s[10]=6;s[11]=5;s[12]=2;s[13]=1
        X_OBJSTART 0
                FOR m=0 TO 13
                        n=s[m]-1
                        x = MOD(n, 2)
                        y = 1-INTEGER(n/4)
                        z = 1-MOD(INTEGER(n/2), 2)
                        X_OBJADDVERTEX  x-.5, y-.5, z-.5, 0, 0, RGB(255,255,255)
                NEXT
        X_OBJEND
        X_SAVEOBJ "Filename" + num + ".png", 0
ENDFUNCTION

Pages: 1 [2] 3 4 ... 10