User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: LuaGL Release Thread

  1. #1
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LuaGL Release Thread

    This refers to the LuaGL module built for XLua, which is a major extension of the official LuaGL distribution (almost to the point that they shouldn't share a name). I'll keep any news of bugs, releases, etc to this thread.

    Current release: http://hocuspocus.taloncrossing.com/rii/xluagl.zip

    This release has some major differences from the version of LuaGL currently circulating with the XLua object. Instead of passing strings as enumeration arguments (e.g. gl.Begin("QUADS"), you pass numbers as enumeration arguments. Most of the OpenGL enumerations are predefined as variables in the gl table, so you'd rewrite the above as gl.Begin(gl.QUADS). LuaGL had a poor implementation for its enumerations that caused enum lookups to increase linearly with the size of the enum table. Using variables in a Lua table is not only faster, but it allows you to define your own enumerations if any are missing (which has been a common problem for the LuaGL module).

    Transforming your existing code is fairly straightforward. Everywhere you use a string enumeration, replaces remove the "" marks, and add gl. at the beginning of the argument. There is a minor exception for arguments that start with numbers, because those are illegal identifier names in Lua. Those names need to have an underscore prepended to them, e.g. gl._2D.

    This release also adds the glu table, which currently contains the functions LookAt, Ortho2D, Perspective, Project, and UnProject. LookAt, Ortho2D, and Perspective take the same parameters as their OpenGL counterparts. Project and UnProject take 3 numbers as parameters and return 3 numbers.

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    Yes! You are awesome. The glu table will help tons.

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    That you so much Retriever2!, xlua is amazing!... and i'm sure this will make a great extension even better

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    Thanks this sounds nice, im guessing this replaces the dll found -

    \Examples\XLua\ext

    etc, but doing this makes the old example no longer show for me. Would it be possible to have a updated example maybe showing the new table functions also if thats ok?

    Edit -

    Wait you mean the actual strings, i was getting confused because the codes had gl. before, doing stuff like

    gl.Begin(gl.QUADS)

    seems to get it running ok again. A updated example would still be cool though and good for new users also but im guessing you will release a updated Xlua with this sometime.

  5. #5
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    I was mostly rushing to get this out for zellix's request but I will follow up with an updated example and documentation.

  6. #6
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    Awesome! I would like to see some cool 3D examples that I can check out?

  7. #7
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    The download has been updated with the original examples and documentation from XLua, updated for the API changes and GLU functions.

    Sorry, nothing new added to the examples, but if anyone would like to make some cool OpenGL examples and share them, that would be cool.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    Thanks, i saved myself the default example yesterday but the documents is great to have.

    By the way every time i open your example rather than a saved one it asks me to locate the opengl.dll so maybe you should do something like -

    Apppath$+"opengl.dll"

    using a expression as this should fix that for people rather than needing to search for it.

  9. #9
    No Products Registered

    Join Date
    Sep 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    Can you specify GLUint and GLint in Lua? Or does it not require specification along with the other variable types such as float and int?

  10. #10
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: LuaGL Release Thread

    It uses the floating point version of all functions when it has to make a choice. The only exception is some of the shader functions where you can explicitly send ints or floats.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 29th April 2013, 09:25 PM
  2. LuaGL Bug Topic
    By Retriever2 in forum Lua Scripting
    Replies: 28
    Last Post: 5th August 2011, 11:06 PM
  3. Platinum Bonus Pack 1 for MMF2 Release Thread
    By Novabrain in forum Extension Developers Lobby
    Replies: 8
    Last Post: 30th June 2007, 10:04 PM
  4. re: Looking for an old thread...
    By ClickerGuy in forum File Archive
    Replies: 1
    Last Post: 2nd June 2007, 04:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •