Jump to content

OpenGL without external libraries


LarsJ
 Share

Recommended Posts

ThaiNhatMinh, You should only use these UDFs, if you need OpenGL. If you just want to add one or more images to an AutoIt GUI, there are easier ways to do it.

If you need OpenGL, you can use these UDFs. So far the following image formats are supported: BMP, GIF, ICO, JPG, PNG, RGB, RGBA, TGA, TGA(RLE), TIF and WMF. See section 1.3 above. SamplesOpenGL 1.1TexturesBasicTest image formats.au3 shows how to use the different formats.

I do not quite understand what you mean by "view more image to GUI". If you want to use other image formats, it's not possible.

If you want to view more images in the same GUI at the same time, it is possible, but there are no examples, that shows how to do it. If this is what you want, I can add an example.

If you have trouble viewing one of your own pictures, take a look at SamplesOpenGL 1.1TexturesBasicHomer Simpson.au3.

Also remember that when you use images in OpenGL, you always use an image together with a texture.

It'll be easier to help, if you add more information. You can use Google Translate to translate to english.

Regards Lars.

Link to comment
Share on other sites

  • 1 year later...

Thank you Lars for these awesome examples. They helped me a lot in creating my little OpenGL project.

I ran into a stupid problem though. My compiled project only worked inside the script dir. When I moved it to another folder OpenGL failed to initialize sometimes, depending on which folder i moved it to. It took me way too long to figure out why:

Func GetProjectPath()
    Local $p = ""
    While Not FileExists( $p & "Includes\Utilities.au3" )
        $p &= "..\"
    WEnd
    Return $p
EndFunc

 

Setting a sane upper limit solved my problem :)

Link to comment
Share on other sites

Schlitzgesicht, You are welcome. Good to see you got the problem solved. Maybe I should put a limit in that loop. I've probably not tested the examples outside the project folder. The next time you can just ask before you spend too much time on such an issue. Now that you have already registered.

I've actually made a note on a possible new OpenGL project. So far it's a secret. Maybe I can use the new project as an opportunity for an update of the old one. What's your project about? Or maybe it's a secret too?

Link to comment
Share on other sites

No, it's not a secret and it doesn't even have any beautiful 3D graphics, but it has an extremely specific purpose. It imports recorded data from an old scientific DOS program in a proprietary format and plots a graph with 10000-100000 data points on average. Plotting with GDI was slower by several magnitudes, so I could only plot static graphs. Now, with opengl I was even able to make the graphs interactive with panning, zooming, stretching and other fancy stuff. 

Matlab would have been the ideal program to create this project, if its runtime library wasn't that huge. The entire library needs to be loaded before it even does anything. IIRC that was well over 500 MB...

With Autoit and your helpful files I could create a standalone program that is faster and takes up just a couple of MB.

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...