• Welcome to PlanetSquires Forums.
 
Main Menu

Recent posts

#41
Hello all how I can make a Keyboard Code Action including to Afx and OpenGL (Here: gl/Windows/glu.bi ?

#include <GLFW/glfw3.h>

// This function is called whenever a key is pressed or released
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
    if (action == GLFW_PRESS)
    {
        // Print the key code when a key is pressed
        printf("Key pressed: 0x%x\n", key);
    }
}

int main()
{
    // Initialize GLFW
    if (!glfwInit())
    {
        return -1;
    }

    // Create a window
    GLFWwindow* window = glfwCreateWindow(800, 600, "My OpenGL Window", NULL, NULL);
    if (!window)
    {
        glfwTerminate();
        return -1;
    }

    // Make the window's context current
    glfwMakeContextCurrent(window);

    // Set the key callback function
    glfwSetKeyCallback(window, key_callback);

    // Main loop
    while (!glfwWindowShouldClose(window))
    {
        // Render your scene here

        // Swap the front and back buffers
        glfwSwapBuffers(window);

        // Poll for events
        glfwPollEvents();
    }

    // Terminate GLFW
    glfwTerminate();
    return 0;
}
This code sets up a key

Theres a sub in nehe example 03 for example with cogl.processKeyStrokes() thats the right place?

This Kind of Setup is new for me

Regards frank
#42
General Board / Re: Usage of Fixed Length Stri...
Last post by José Roca - March 13, 2024, 06:28:08 AM
Hello everybody,

I am busy collaborating on an encyclopaedia of French cinema.

https://www.aidememoirecinema.fr/

I don't remember ever using AS STRING * with FreeBasic because all my WinFBX code is unicode.

Many, many years ago, when I was working with the DOS operating system, I used it to work with random files.
#43
OK, it turns out you need to run the program in WINDOWS 7 compatability mode.

Then the information in the Listview shows correctly.
Getting these Datamax things properly running on USB on Win7 is complicated.
Then it works, then it doesnt.  :(

-Regards, Peter
#44
WinFBE - Code Editor and Visual Designer / WIN7 VS WIN 10 & 11
Last post by Petrus Vorster - March 13, 2024, 05:28:04 AM
Hi All

I still have to struggle with WIN7(64 bit) at work.
At home we have Win10 & 11 on laptops.

Paul helped me with a tool to print barcode labels a while ago.
On Windows 10, connecting a Datamax O'Neil E-class Label printer works just fine.
Everything aligns properly, label software runs great.

If I run that same program at work on Windows 7 everything goes nuts.

My listview control gives mis-aligned or garbage caracters on the left of the control.
The printer labels does scan, but they are terribly mis-aligned.
Same settings, same printer.

None of that happens on Windows 10.

I am a bit out of ideas why there would be a diffrence on the two Operating systems.

Regards, Peter

#45
General Board / Re: Usage of Fixed Length Stri...
Last post by Paul Squires - March 12, 2024, 10:52:58 PM
Looks like Frank ran into a couple of the new SPACE issues using code from Jose's WinFBX library.
https://www.planetsquires.com/protect/forum/index.php?topic=4752.msg36080;topicseen#msg36080

I am not sure how active Jose is with programming these days so when you have finalized your new changes I can make the changes to the WinFBX code.
#46
Excellent, happy to hear that everything is working okay for you now!
#47
All is fine now ;)

Have downloaded winFBE_suite and my nehe 5 example is running fine

I am Glad lol Bye Frank nice Rest of the week

#48
Thank you Paul :)

I have downloaded latest patch for freebasic and fbc Version I have was built at 24.12.2024 1.424 MB Size..

But my "fbedit" Editor dated of 2010 could that be a Problem perhaps?  Other Programms are working all fine.

I have included Afx folder into \ inc folder of Main Level Here you can find fbc

I have No ideas sorry

Thx Frank
#49
General Board / Re: question about comparing m...
Last post by Paul Squires - March 12, 2024, 09:29:02 AM
There was a lot of discussion on the FB forum about random numbers. Take a look over there for posts by deltarho[1859] because he has posted a lot on the subject. For example:
https://www.freebasic.net/forum/viewtopic.php?t=32129
https://www.freebasic.net/forum/viewtopic.php?p=300318
https://www.freebasic.net/forum/viewtopic.php?p=300720
https://www.freebasic.net/forum/viewtopic.php?p=298279

Using RANDOMIZE TIMER should be sufficient in most cases to generate a random seed for your RANDOM function.
#50
Works perfectly fine for me on 1.10.1 that I downloaded from:
https://www.freebasic.net/forum/viewtopic.php?t=32498

Are you using the new development version that Jeff is working on?
https://www.freebasic.net/forum/viewtopic.php?t=32254

That new version has a lot of changes to the way SPACE works and from your post it looks like that is where the errors are happening. Those functions with the errors are part of Jose's WinFBX library.