<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>LuaGL - new forum posts</title>
		<link>http://luagl.wikidot.com/forum/start</link>
		<description>Posts in forums of the site &quot;LuaGL&quot;</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-371663</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-371663</link>
				<description></description>
				<pubDate>Sat, 31 Jan 2009 11:12:19 +0000</pubDate>
				<wikidot:authorName>George Petsagourakis</wikidot:authorName>				<wikidot:authorUserId>28310</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Good to see somebody hasn't given up on this.<br /> Now all I am waiting for is a new version getting support for OpenGL 3.0 :)</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-371512</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-371512</link>
				<description></description>
				<pubDate>Sat, 31 Jan 2009 03:45:09 +0000</pubDate>
				<wikidot:authorName>alvaro martínez</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>after some googleing and errors i managed to build with my following makefile (only for osx, <tt>luarocks</tt> doesnt build <tt>LuaGL</tt> because it doesnt give the <tt>-frameworks</tt> parameters to <tt>gcc</tt>)<br /> But i still get some memory runtime errors</p> <div class="code"></div> <br /> CC = export MACOSX_DEPLOYMENT_TARGET=10.3;gcc<br /> LD = export MACOSX_DEPLOYMENT_TARGET=10.3;gcc<br /> FrameWorks = -F/System/Library/Frameworks/<br /> INC = -I/usr/include/ -I/usr/local/include/ $(FrameWorks) -Iinclude<br /> LIB = $(FrameWorks) -framework OpenGL -framework GLUT -L/usr/lib/ -lgmalloc -L/usr/local/lib/ -llua5.1<br /> CFLAGS = -pedantic -fno-common -Wall -fPIC $(INC)<br /> LFLAGS = $(LIB) -bundle -undefined dynamic_lookup -all_load <p>all: LibGL LibGlut</p> <p>clean:<br /> rm *.o *.so</p> <p>%.o: src/%.c<br /> $(CC) $(CFLAGS) -c $&lt; -o $@</p> <p>LibGL: LuaGL.o<br /> $(LD) $(LFLAGS) -o luagl.so LuaGL.o</p> <p>LibGlut: LuaGlut.o<br /> $(LD) $(LFLAGS) -o luaglut.so LuaGlut.o</p> <p>[[/code]]</p> <p>In the file <tt>luagl.c</tt> says:</p> <div class="code"> <pre> <code>#include &lt;malloc.h&gt;</code> </pre></div> <p>it doesnt work in mac osx (because doesnt come with it), its better to change it to:</p> <div class="code"> <pre> <code>#include &lt;stdio.h&gt;</code> </pre></div> <p>that seems to be the main problem at runtime because it keeps telling me the following error:</p> <p><tt>lua(19956,0xa000ed88) malloc: *** Deallocation of a pointer not malloced: 0x84c28;</tt></p> <p>anyone has an idea?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-365249</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-365249</link>
				<description></description>
				<pubDate>Sat, 24 Jan 2009 09:08:33 +0000</pubDate>
				<wikidot:authorName>alvaro martínez</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>could you post the makefile?<br /> i am also a os x user, but this doesn't compile via luarocks</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-105495#post-329184</guid>
				<title>Re: Bugfixes</title>
				<link>http://luagl.wikidot.com/forum/t-105495/bugfixes#post-329184</link>
				<description></description>
				<pubDate>Sun, 07 Dec 2008 20:54:30 +0000</pubDate>
				<wikidot:authorName>George Petsagourakis</wikidot:authorName>				<wikidot:authorUserId>28310</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Questions: which source branch? compiler/platform?</p> <p>In the case that you are on Windows XP, can you sent me the binaries you produced?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-105495/bugfixes">Bugfixes</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-105495#post-309957</guid>
				<title>Bugfixes</title>
				<link>http://luagl.wikidot.com/forum/t-105495/bugfixes#post-309957</link>
				<description></description>
				<pubDate>Sun, 16 Nov 2008 17:19:42 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>First thanks for providing this binding for openGL ;)</p> <p>However I found it troublesome to use this lib due to weird crashes. I finally found the glitch which is located in get_array2f. The function is not balancing the lua VM stack. I fixed the loop that caused a stackoverflow that lead to a crash somewhat later (thus hard to track down the error).</p> <div class="code"> <pre> <code>for(i = 0; i &lt; n; i++) { lua_rawgeti(L, index, i+1); if(!lua_istable(L, -1)) { lua_pop(L,1); // undo the change to the stack, normally not necessary return -1; } for(j = 0; j &lt; *size; j++) { lua_rawgeti(L, -1, j + 1); (*array)[i*(*size) + j] = (GLfloat)lua_tonumber(L, -1); lua_pop(L, 1); // lua_remove(L,-1) equivalent } lua_pop(L,1); // pop the row off }</code> </pre></div> <p>I also saw during examination that there is a memory leak in the texture function gl_tex_image.<br /> The function returned without freeing the pixels array, i.e.</p> <div class="code"> <pre> <code>if((height = get_array2f(L, 4, &amp;pixels, &amp;width)) != -1) { glTexImage2D(GL_TEXTURE_2D, (GLint)lua_tonumber(L, 1), iformat, width/iformat, height, 0, e, GL_FLOAT, pixels); free(pixels); // I added this line return 0; }</code> </pre></div> <p>In other places existed the same glitch.</p> <p>—zet</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-105495/bugfixes">Bugfixes</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-104479#post-306864</guid>
				<title>CodeBlocks and mingw</title>
				<link>http://luagl.wikidot.com/forum/t-104479/codeblocks-and-mingw#post-306864</link>
				<description></description>
				<pubDate>Wed, 12 Nov 2008 19:06:34 +0000</pubDate>
				<wikidot:authorName>George Petsagourakis</wikidot:authorName>				<wikidot:authorUserId>28310</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Trying to compile on CodeBlocks and mingw I get too many errors.</p> <ol> <li>Create a GLUT project through the codeblocks project wizard and make sure that it compiles and runs.</li> <li>Then Rename main.cpp to LuaGL.c and replace the contents with the ones found in the fabiowguerra/svn/src/LuaGL.c</li> <li>Add a File-&gt;New-&gt;File..-&gt;C/C++ Header File, LuaGL.h paste the contents of the respective file from fabiowguerra/svn/include/LuaGL.h</li> <li>Continue the same process for the rest of the files. LuaGlu, LuaGlut, LuaGlAux.</li> <li>Create a new Dynamic Library build target from the menu File -&gt; New.</li> <li>Add the liblua5.1.lib to the linker tab for the whole project in the Build Options dialog.</li> <li>Press built for the dll built target and watch the errors go!</li> </ol> <p>At the moment I am having a lot undefined references from LuaGlu.c on the Lua API functions.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-104479/codeblocks-and-mingw">CodeBlocks and mingw</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-33505#post-302980</guid>
				<title>Re: SVN Trunk</title>
				<link>http://luagl.wikidot.com/forum/t-33505/svn-trunk#post-302980</link>
				<description></description>
				<pubDate>Fri, 07 Nov 2008 20:26:47 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Why isn't LuaGL using another extension manager like Glew or GLEE that seem a lot more efficient?<br /> Also GLUT should be overtaken. GLFW is the project that is more up to date as far as OpenGL Utilities are concerned</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-33505/svn-trunk">SVN Trunk</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-281263</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-281263</link>
				<description></description>
				<pubDate>Sun, 12 Oct 2008 03:33:53 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi, it's funny because it's been so long since I've used this. I never did see your reply :)</p> <p>Thanks for the info. I did end up getting it to work.</p> <p>Cheers</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-93465#post-271712</guid>
				<title>Next Release</title>
				<link>http://luagl.wikidot.com/forum/t-93465/next-release#post-271712</link>
				<description></description>
				<pubDate>Tue, 30 Sep 2008 11:15:07 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I'm currently working on an engine that supports opengl and lua and i found your project most helpful. I miss the glu function in the 1.01 release so i now use the trunks 1.02-beta release. Currently the trunk has a few problems compiling on Windows.</p> <p>I would like to know if there will be a new release coming that i can incorporate in my application and when we can expect it.</p> <p>Regards,<br /> Leon</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4725">Forum discussion / General discussion</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-93465/next-release">Next Release</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-90931</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-90931</link>
				<description></description>
				<pubDate>Mon, 14 Jan 2008 04:17:04 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi Scott,</p> <p>I do not have experience with OS X.</p> <p>But if you are just extending an OpenGL application, you can simply include LuaGL.c in your project and add LuaGL headers to your include path, that should work.</p> <p>If you need to use glut, you can create a dynamic library, linking LuaGL.c and LuaGlut.c (and LuaGlu.c and LuaGLAux.c, if using the SVN version). The dependencies are on Lua, OpenGL, GLU and GLUT.</p> <p>I'm using the following makefile on linux, but I think it is not very portable. I'm accepting suggestion on how to build a more portable makefile…</p> <blockquote> <p>CC = gcc<br /> LD = ld<br /> INC = -Iinclude -Isrc -I/usr/include/lua5.1<br /> LIB = -lGLU -lGL -lm -llua5.1<br /> CFLAGS = -Wall -fPIC -c $(INC)<br /> LFLAGS = $(LIB)<br /> LGLUT = -lglut</p> <p>all: luagl luaglu luaglut</p> <p>luagl: LibLuaGL<br /> luaglu: LibLuaGlu<br /> luaglut: LibLuaGlut</p> <p>clean:<br /> rm *.o *.so</p> <p>LuaGLAux.o: src/LuaGLAux.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LuaGL.o: src/LuaGL.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LuaGlu.o: src/LuaGlu.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LuaGlut.o: src/LuaGlut.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LibLuaGL: LuaGL.o LuaGLAux.o<br /> $(LD) $(LFLAGS) -shared -o LuaGL.so LuaGL.o LuaGLAux.o</p> <p>LibLuaGlu: LuaGlu.o LuaGLAux.o<br /> $(LD) $(LFLAGS) -shared -o LuaGlu.so LuaGlu.o LuaGLAux.o</p> <p>LibLuaGlut: LuaGlut.o<br /> $(LD) $(LFLAGS) $(LGLUT) -shared -o LuaGlut.so LuaGlut.o</p> </blockquote> <p>Hope this helped you.</p> <p>Fabio</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-90566</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-90566</link>
				<description></description>
				<pubDate>Sun, 13 Jan 2008 02:41:59 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Any news on this? If there's no Makefile can anybody give me a bit of a hint for compiling with gcc on OS X?</p> <p>Cheers,<br /> Scott</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-89846</guid>
				<title>Re: Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-89846</link>
				<description></description>
				<pubDate>Fri, 11 Jan 2008 04:10:21 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>It is not a dead project, since there are big changes on the svn. But it really needs a better documentation and makefile to be more usefull to a lot of people.</p> <p>Fabio</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-89533</guid>
				<title>Compiling</title>
				<link>http://luagl.wikidot.com/forum/t-34714/compiling#post-89533</link>
				<description></description>
				<pubDate>Thu, 10 Jan 2008 15:01:13 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I have no idea where to start, since there are no tutorials or anything. :( Or maybe this is a dead project?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-34714/compiling">Compiling</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-33505#post-86130</guid>
				<title>SVN Trunk</title>
				<link>http://luagl.wikidot.com/forum/t-33505/svn-trunk#post-86130</link>
				<description></description>
				<pubDate>Wed, 02 Jan 2008 22:54:33 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello,</p> <p>I copied my SVN branch to trunk. It has a lot of improvents, bugfixes and is more stable than LuaGL 1.01.<br /> I recommend everyone to use this version.</p> <p>It can be downloaded using the followin command:</p> <blockquote> <p>svn co https://luagl.svn.sourceforge.net/svnroot/luagl/trunk</p> </blockquote> <p>For those who don't have SVN installed, it can be downloaded at &lt;subversion.tigris.org&gt;.</p> <p>The new LuaGL version will be released probably on March. It will be backward compatible with the previous versions.<br /> It need only some small changes and a Makefile, probably using autoconf and automake to configure OpenGL, GLU and Glut libs.</p> <p>I'm accepting help to build this Makefile, since i'm out of time to work on LuaGL until March.</p> <p>Fabio</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-33505/svn-trunk">SVN Trunk</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-33449#post-86121</guid>
				<title>Re: Compiling LuagL 1.01</title>
				<link>http://luagl.wikidot.com/forum/t-33449/compiling-luagl-1-01#post-86121</link>
				<description></description>
				<pubDate>Wed, 02 Jan 2008 22:35:27 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi 'Anonymous',</p> <p>Please test with the trunk version on SVN. It is compatible with luagl 1.01 and has a lot of bugfixes and the a lot better tests and samples.</p> <p>Fabio</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-33449/compiling-luagl-1-01">Compiling LuagL 1.01</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-33449#post-85977</guid>
				<title>Compiling LuagL 1.01</title>
				<link>http://luagl.wikidot.com/forum/t-33449/compiling-luagl-1-01#post-85977</link>
				<description></description>
				<pubDate>Wed, 02 Jan 2008 15:35:34 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I compile LuaGL 1.01 with tcc using the command line:<br /> tcc -shared -rdynamic -lopengl32 -lopenglu32 -lopenglut32 -llua -o luagl.dll luagl.c luaglut.c</p> <p>which compiles just fine, but when I try to load test2.lua I get:</p> <p>lua5.1.exe: error loading module 'luagl' from file '.\luagl.dll':<br /> The specified procedure could not be found.</p> <p>stack traceback:<br /> [C]: ?<br /> [C]: in function 'require'<br /> test2.lua:1: in main chunk<br /> [C]: ?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4727">Help / Installation &amp; compilation of LuaGL</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-33449/compiling-luagl-1-01">Compiling LuagL 1.01</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-32414#post-85082</guid>
				<title>Re: glut window number &amp; glut_destroy_window</title>
				<link>http://luagl.wikidot.com/forum/t-32414/glut-window-number-glut-destroy-window#post-85082</link>
				<description></description>
				<pubDate>Sun, 30 Dec 2007 02:48:49 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi 'Anonyous',</p> <p>Thanks for your suggestion I implemented glut.DestroyWindow in my SVN branch. It will be on the next release.<br /> But my implementation is a little different from yours.</p> <p>I changed glut.CreateWindow to return the window identifier. And the glut.DestroyWindow will receive the identifier.<br /> This way it will be possible to handle multiple windows.</p> <p>I recomend everyone to use the SVN version, there are lots of improvements and bug fixes there..</p> <p>PS: The next release will happen only on March or April, because I will defend my MSc Dissertation on March. But it is almost done, but I still need to create a makefile to it. Any suggestions for the makefile? Need to use autoconf/automake?</p> <p>Fabio</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-32414/glut-window-number-glut-destroy-window">glut window number &amp; glut_destroy_window</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-32414#post-83132</guid>
				<title>glut window number &amp; glut_destroy_window</title>
				<link>http://luagl.wikidot.com/forum/t-32414/glut-window-number-glut-destroy-window#post-83132</link>
				<description></description>
				<pubDate>Sun, 23 Dec 2007 03:26:07 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <div> <p>So the main question is: where the glut window number will be stored and how will be accessed?</p> </div> <p>To quickly add glut.DestroyWindow function do the following:</p> <ul> <li>Edit <strong>luaglut.c</strong> file.</li> <li>Add new line after all <strong>#include</strong> directives, such as:</li> </ul> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">window</span><span class="hl-code">;</span> </pre></div> </div> <ul> <li>Prepend line in function <strong>glut_create_window</strong> with <strong>window=</strong> so it look like this:</li> </ul> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">window</span><span class="hl-code"> = </span><span class="hl-identifier">glutCreateWindow</span><span class="hl-brackets">((</span><span class="hl-types">const</span><span class="hl-code"> </span><span class="hl-types">char</span><span class="hl-code"> *</span><span class="hl-brackets">)</span><span class="hl-identifier">lua_tostring</span><span class="hl-brackets">(</span><span class="hl-identifier">L</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-brackets">))</span><span class="hl-code">;</span> </pre></div> </div> <ul> <li>Add new function <strong>glut_destroy_window</strong>:</li> </ul> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">glut_destroy_window</span><span class="hl-brackets">(</span><span class="hl-identifier">lua_State</span><span class="hl-code"> *</span><span class="hl-identifier">L</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">glutDestroyWindow</span><span class="hl-brackets">(</span><span class="hl-identifier">window</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <ul> <li>Add new constant into <strong>glutlib</strong> at the end of file</li> </ul> <div class="code"> <div class="hl-main"> <pre> <span class="hl-brackets">{</span><span class="hl-quotes">"</span><span class="hl-string">DestroyWindow</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-identifier">glut_destroy_window</span><span class="hl-brackets">}</span> </pre></div> </div> <p>That is it.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-32414/glut-window-number-glut-destroy-window">glut window number &amp; glut_destroy_window</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-52521</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-52521</link>
				<description></description>
				<pubDate>Thu, 27 Sep 2007 05:14:53 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yes, that while loop is really inefficienct and this thread is a discussion to make that conversion better. As for your second question, to put a function in lua, it has to have a particular signature ( int func(lua_State *) ) so what you describe is not possible unless it's a userdata which would require another kind of overhead so it doesn't really matter in the end and they way functions like glEnd are wrapped is the most ideal solution for Lua.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-52481</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-52481</link>
				<description></description>
				<pubDate>Wed, 26 Sep 2007 23:43:10 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Ah I see. I was asking because I saw that string flag array in the source and I couldn't help but think that looping through an array like that isn't the most efficient method to check for flags.</p> <p>Another thing I noticed in the source is that you've made functions to call gl functions that don't take arguments and don't give returns, like glEnd. In this case can't you just use a pointer to the original gl function instead? I don't know much about C but I've tried it in FreeBasic and it does work</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-51907</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-51907</link>
				<description></description>
				<pubDate>Tue, 25 Sep 2007 13:36:19 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>We are going to provide support for both notations:</p> <p>gl.Clear("DEPTH_BUFFER_BIT | COLOR_BUFFER_BIT")<br /> gl.Clear(gl.DEPTH_BUFFER_BIT + gl.COLOR_BUFFER_BIT)</p> <p>We provide first notation cause there is a possiblity that bitwise oprations can give other results some times.<br /> Second one gives better performance.</p> <p>Best.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-15114#post-51397</guid>
				<title>Re: progress?</title>
				<link>http://luagl.wikidot.com/forum/t-15114/progress#post-51397</link>
				<description></description>
				<pubDate>Sun, 23 Sep 2007 13:12:10 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Well, I would join but I don't yet know enough about either opengl or lua to be of any real help. Or C for that matter, I mostly use FreeBasic.</p> <p>As a bit of a challenge to myslef however, I've just started an attempt to translate the source code into FB</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4728">The LuaGL Community / General community discussion</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-15114/progress">progress?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-51245</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-51245</link>
				<description></description>
				<pubDate>Sat, 22 Sep 2007 18:22:25 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>This might be a stupid question, by why are you even using strings for this? In lua player they put the values of the flags directly into lua variables, then when passing the flags you just add them together.</p> <p>Now, I know that adding them isn't the same as doing a bitwise or, but it works just fine in lua player so why can't it work here?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-49071</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-49071</link>
				<description></description>
				<pubDate>Fri, 14 Sep 2007 15:31:35 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>yes I know it's C++ :] My reasons for using C++ are to take advantage of the already quite fast string C++ STL class. Also later on in my branch I plan on using C++ for dynamic buffers, small object allocators, and higher-level representations. I differ here from you and Grzegorz in that I don't care so much about ANSI C compatibility, just widely available ISO C++. If it works with microsoft's compiler and GCC then I'm satisfied.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-48900</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-48900</link>
				<description></description>
				<pubDate>Thu, 13 Sep 2007 21:32:30 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ok, but it is C++ not C.</p> <p>I think it's a little waste of time, two people doing the same work…</p> <p>But anyway I'll create a small performance test to this feature. The fastest patch (that compiles in ANSI C without warnings) will be on the next release.</p> <p>In my branch I modified the unit test to use a modified version of luaunit (original version was not working with lua5.1), i will try to commit a get_enum test in end of this week.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-48861</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-48861</link>
				<description></description>
				<pubDate>Thu, 13 Sep 2007 17:11:16 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>BTW, this code is located in branches/wesleysmith/trunk_merge/src/LuaGL.cpp</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-48860</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-48860</link>
				<description></description>
				<pubDate>Thu, 13 Sep 2007 17:10:27 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I just comitted my get_enum code to a modded trunk in my branch. I had to do some extra things to get LuaGL trunk to compile on OSX and some additional things to get it to work as a C++ file. It works with the following mask techniques:</p> <p>gl.Clear("DEPTH_BUFFER_BIT,COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT, COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT ,COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT , COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT|COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT| COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT |COLOR_BUFFER_BIT")<br /> gl.Clear("DEPTH_BUFFER_BIT | COLOR_BUFFER_BIT")</p> <div class="code"> <pre> <code>15a16,19 &gt; &gt; #if defined (__APPLE__) || defined (OSX) &gt; #include &lt;stdlib.h&gt; &gt; #else 16a21,25 &gt; #endif &gt; &gt; #ifdef __cplusplus &gt; extern "C" { &gt; #endif 19a29,36 &gt; #ifdef __cplusplus &gt; } &gt; #endif &gt; &gt; #include &lt;string&gt; &gt; &gt; using namespace std; &gt; 21a39,41 &gt; #define LUA_GL_STRING_TO_ENUM_TABLE "LuaGL_string_to_enum_table" &gt; #define LUA_GL_ENUM_TO_STRING_TABLE "LuaGL_enum_to_string_table" &gt; 32c52 &lt; static GLenum get_enum(const char *str, int n) --- &gt; GLenum get_enum(lua_State *L, const char *key) 34c54 &lt; int i = 0; --- &gt; GLenum val; 36,39c56,57 &lt; while(gl_str[i].str != 0) &lt; { &lt; if(strncmp(str, gl_str[i].str, n) == 0 &amp;&amp; gl_str[i].str[n] == 0) &lt; return gl_str[i].value; --- &gt; lua_getfield(L, LUA_REGISTRYINDEX, LUA_GL_STRING_TO_ENUM_TABLE); &gt; lua_getfield(L, -1, key); 41c59,60 &lt; i++; --- &gt; if(lua_isnil(L, -1)) { &gt; val = ENUM_ERROR; 43c62,63 &lt; return ENUM_ERROR; --- &gt; else { &gt; val = (GLenum)lua_tointeger(L, -1); 45,49c65 &lt; static GLenum get_gl_enum(lua_State *L, int index) &lt; { &lt; unsigned int i; &lt; const char *str = lua_tostring(L, index); &lt; GLenum temp = 0, ret = 0; --- &gt; lua_pop(L, 2); //pop value and enum table 51c67,70 &lt; for(i = 0; i &lt; strlen(str); i++) --- &gt; return val; &gt; } &gt; &gt; GLenum get_gl_mask_enum(lua_State *L, const char *key, char token) 53c72,77 &lt; if(str[i] == ',') --- &gt; GLenum val = 0; &gt; string mask(key); &gt; size_t pos = 0, substr_start = 0, last_pos = 0; &gt; &gt; pos = mask.find(token, substr_start); &gt; while(last_pos != string::npos) 55,57c79,90 &lt; temp = get_enum(str, i); &lt; if(temp != ENUM_ERROR) &lt; ret |= temp; --- &gt; int end_off = 0; &gt; &gt; //check for leading and trailing spaces &gt; if(mask[substr_start] == ' ') { &gt; substr_start++; &gt; } &gt; &gt; if(mask[pos - substr_start - 1] == ' ') { &gt; end_off = 1; &gt; } &gt; &gt; string bit = mask.substr(substr_start, pos - substr_start - end_off); 59,60c92,96 &lt; str += i+1; &lt; i = 0; --- &gt; val |= get_enum(L, bit.c_str()); &gt; &gt; substr_start = pos+1; &gt; last_pos = pos; &gt; pos = mask.find(token, substr_start); 61a98,99 &gt; &gt; return val; 63d100 &lt; temp = get_enum(str, strlen(str)); 65c102 &lt; if(temp == ENUM_ERROR) --- &gt; LUAGL_API GLenum get_gl_enum(lua_State *L, int index) 67,69c104,116 &lt; if(ret == 0) &lt; return ENUM_ERROR; &lt; return ret; --- &gt; const char *key = lua_tostring(L, index); &gt; GLenum val = 0; &gt; char token1 = ',', token2 = '|' ; &gt; &gt; //detect if multiple enums as a bit mask &gt; if(strchr(key, token1)) { &gt; val = get_gl_mask_enum(L, key, token1); &gt; } &gt; else if(strchr(key, token2)) { &gt; val = get_gl_mask_enum(L, key, token2); &gt; } &gt; else { &gt; val = get_enum(L, key); 72c119 &lt; return ret | temp; --- &gt; return val; 75c122 &lt; static const char *get_str_gl_enum(GLenum num) --- &gt; LUAGL_API const char *get_str_gl_enum(lua_State *L, GLenum num) 77c124 &lt; unsigned int i = 0; --- &gt; const char *val; 79,82c126,130 &lt; while(gl_str[i].str != 0) &lt; { &lt; if(num == gl_str[i].value) &lt; return gl_str[i].str; --- &gt; lua_getfield(L, LUA_REGISTRYINDEX, LUA_GL_ENUM_TO_STRING_TABLE); &gt; lua_pushnumber(L, num); &gt; lua_gettable(L, -2); &gt; val = lua_tostring(L, -1); &gt; lua_pop(L, 2); //pop value and enum table 84,86c132 &lt; i++; &lt; } &lt; return NULL; --- &gt; return val; 202c248 &lt; static int get_array2d(lua_State *L, int index, GLdouble **array, int *size) --- &gt; static int get_array2d(lua_State *L, int index, GLdouble **array, GLint *size) 215c261 &lt; *size = luaL_getn(L, -1); --- &gt; *size = (GLint)luaL_getn(L, -1); 238c284 &lt; static int get_array2f(lua_State *L, int index, GLfloat **array, int *size) --- &gt; static int get_array2f(lua_State *L, int index, GLfloat **array, GLsizei *size) 251c297 &lt; *size = luaL_getn(L, -1); --- &gt; *size = (GLsizei)luaL_getn(L, -1); 526,529d571 &lt; const char *arg; &lt; const char *delims = "|,"; &lt; char arg_buffer[256]; &lt; char *result = NULL; 532,549c574,576 &lt; // test argument type &lt; if(lua_type(L, 1) != LUA_TSTRING) { &lt; script_error(L, "incorrect argument to function 'gl.Clear'"); &lt; } &lt; &lt; arg = lua_tostring(L, 1); &lt; &lt; if(strlen(arg) &gt; 256) { &lt; script_error(L, "incorrect argument to function 'gl.Clear'"); &lt; } &lt; &lt; strcpy(arg_buffer, arg); &lt; result = strtok(arg_buffer, delims); &lt; while( result != NULL ) { &lt; printf("result: %s\n", result); &lt; result = strtok(NULL, delims); &lt; } &lt; --- &gt; /* test argument type */ &gt; if(!lua_isstring(L, 1)) &gt; luaL_error(L, "incorrect argument to function 'gl.Clear'"); 553,556c580,582 &lt; // test argument &lt; if(e == ENUM_ERROR) { &lt; script_error(L, "incorrect string argument to function 'gl.Clear'"); &lt; } --- &gt; /* test argument */ &gt; if(e == ENUM_ERROR) &gt; luaL_error(L, "incorrect string argument to function 'gl.Clear'"); 557a584 &gt; /* call opengl function */ 1418c1445 &lt; static gl_front_face(lua_State *L) --- &gt; static int gl_front_face(lua_State *L) 1503c1530 &lt; int mask; --- &gt; GLint mask; 1641c1668 &lt; str = get_str_gl_enum(params[i]); --- &gt; str = get_str_gl_enum(L, params[i]); 1766c1793 &lt; lua_pushstring(L, get_str_gl_enum(error)); --- &gt; lua_pushstring(L, get_str_gl_enum(L, error)); 1950c1977 &lt; int size; --- &gt; GLint size; 2020c2047 &lt; glGetPointerv(e, (void *)&amp;flags); --- &gt; glGetPointerv(e, (GLvoid **)&amp;flags); 2035c2062 &lt; glGetPointerv(e, (void *)&amp;params); --- &gt; glGetPointerv(e, (GLvoid **)&amp;params); 2096c2123 &lt; int e2; --- &gt; GLint e2; 2113c2140 &lt; lua_pushstring(L, get_str_gl_enum(e2)); --- &gt; lua_pushstring(L, get_str_gl_enum(L, e2)); 2142c2169 &lt; int e3; --- &gt; GLint e3; 2160c2187 &lt; lua_pushstring(L, get_str_gl_enum(e3)); --- &gt; lua_pushstring(L, get_str_gl_enum(L, e3)); 2183c2210 &lt; int width, height, level; --- &gt; GLint width, height, level; 2258c2285 &lt; int e; --- &gt; GLint e; 2293c2320 &lt; lua_pushstring(L, get_str_gl_enum(e)); --- &gt; lua_pushstring(L, get_str_gl_enum(L, e)); 2412c2439 &lt; static gl_is_list(lua_State *L) --- &gt; static int gl_is_list(lua_State *L) 2425c2452 &lt; static gl_is_texture(lua_State *L) --- &gt; static int gl_is_texture(lua_State *L) 4108a4136,4139 &gt; #ifdef __cplusplus &gt; extern "C" { &gt; #endif &gt; 4110a4142,4172 &gt; &gt; //make sting_to_enum table &gt; lua_pushstring(L, LUA_GL_STRING_TO_ENUM_TABLE); &gt; lua_newtable(L); &gt; { &gt; int i=0; &gt; while(gl_str[i].str) &gt; { &gt; lua_pushstring(L, gl_str[i].str); //strings as enum keys &gt; lua_pushinteger(L, gl_str[i].value); //enum value as values &gt; lua_settable(L, -3); //set table with (key, value) pair &gt; i++; &gt; } &gt; } &gt; lua_settable(L, LUA_REGISTRYINDEX); &gt; &gt; //make enum_to_string table (not unique) &gt; lua_pushstring(L, LUA_GL_ENUM_TO_STRING_TABLE); &gt; lua_newtable(L); &gt; { &gt; int i=0; &gt; while(gl_str[i].str) &gt; { &gt; lua_pushinteger(L, gl_str[i].value); //enum value as keys &gt; lua_pushstring(L, gl_str[i].str); //strings as enum values &gt; lua_settable(L, -3); //set table with (key, value) pair &gt; i++; &gt; } &gt; } &gt; lua_settable(L, LUA_REGISTRYINDEX); &gt; 4112a4175,4178 &gt; &gt; #ifdef __cplusplus &gt; } &gt; #endif</code> </pre></div> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-48598</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-48598</link>
				<description></description>
				<pubDate>Wed, 12 Sep 2007 23:48:41 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'll work ", " "," and "|" into my patch. I just got back home to california and will be preparing a diff for my get_enum code soon.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-48523</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-48523</link>
				<description></description>
				<pubDate>Wed, 12 Sep 2007 17:14:58 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Its a good idea.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47867</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47867</link>
				<description></description>
				<pubDate>Mon, 10 Sep 2007 16:04:16 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What do you think ,<br /> maybe add support to "|" character as well ?<br /> To make a "C" like look : "SHT1 | SHT2" ?<br /> Or Is it "unnecessary" feature ?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47677</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47677</link>
				<description></description>
				<pubDate>Mon, 10 Sep 2007 04:09:32 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>There is something more that could be done. Today "STH1,STH2" works, but "STH1 , STH2" do not. A very simple code will resolve this problem. It'll be good to put this change on the patch too.</p> <p>I will create some tests for the enumerations. A patch must pass all tests.</p> <p>The functon get_gl_enum wouldn't be called very often on most OpenGL applications. So I was not very worried about the performance at the original version.</p> <p>Both solution (from wes and gwpl) are very good. In practice there will be no big difference between them.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47434</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47434</link>
				<description></description>
				<pubDate>Sat, 08 Sep 2007 19:22:35 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So please prepare your own patch to trunk and make new topic about it.</p> <p>For me <strong>it is not</strong> backward compatible, cause I can't see support for notation OR operation , I mean : "STH1,STH2" , what means in C: STH1 | STH2.</p> <p><em>If I'm wrong let me know, Then will delete this post</em></p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47385</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47385</link>
				<description></description>
				<pubDate>Sat, 08 Sep 2007 15:30:03 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here's what's required to put the Lua table version of get_enum in the trunk</p> <div class="code"> <pre> <code>#define LUA_GL_STRING_TO_ENUM_TABLE "LuaGL_string_to_enum_table" #define LUA_GL_ENUM_TO_STRING_TABLE "LuaGL_enum_to_string_table" LUAGL_API GLenum get_gl_enum(lua_State *L, int index) { const char *key = lua_tostring(L, index); GLenum val; lua_getfield(L, LUA_REGISTRYINDEX, LUA_GL_STRING_TO_ENUM_TABLE); lua_getfield(L, -1, key); if(lua_isnil(L, -1)) { val = ENUM_ERROR; } else { val = (GLenum)lua_tointeger(L, -1); } lua_pop(L, 2); //pop value and enum table return val; } LUAGL_API const char *get_str_gl_enum(lua_State *L, GLenum num) { const char *val; lua_getfield(L, LUA_REGISTRYINDEX, LUA_GL_ENUM_TO_STRING_TABLE); lua_pushnumber(L, num); lua_gettable(L, -2); val = lua_tostring(L, -1); lua_pop(L, 2); //pop value and enum table return val; }</code> </pre></div> <p>And then add to luaopen_opengl</p> <div class="code"> <pre> <code>lua_pushstring(L, LUA_GL_ENUM_TO_STRING_TABLE); lua_newtable(L); { int i=0; while(gl_str[i].str) { lua_pushinteger(L, gl_str[i].value); //enum value as keys lua_pushstring(L, gl_str[i].str); //strings as enum values lua_settable(L, -3); //set table with (key, value) pair i++; } } lua_settable(L, LUA_REGISTRYINDEX);</code> </pre></div> <p>It's completely backward compatible as all it is doing is replacing the while loop with a lua_gettable.</p> <p>wes</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47380</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47380</link>
				<description></description>
				<pubDate>Sat, 08 Sep 2007 14:57:50 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>My version of get_enum is backward compatible so I don't think this is an issue. I think you're belaboring the getting a stable version point too much. I think LuaGL is already quite stable, we just need to make it faster which is the point of using Lua tables instead of rolling our own mechanism. Lua's hashtables are quite fast.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47211</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47211</link>
				<description></description>
				<pubDate>Fri, 07 Sep 2007 17:03:08 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What about <strong>simplicity</strong> <a href="http://luagl.wikidot.com/viewsvn/branches/grzegorzwierzowiecki/patches_to_trunk/2007-09-03-gw-get_enum-in-logarithm-complexity-with-bsearch.patch?view=markup&amp;pathrev=16">my patch</a> consist about <strong>6</strong> lines of code and uses well known library function "bsearch".</p> <p>Just <a href="http://luagl.wikidot.com/viewsvn/branches/grzegorzwierzowiecki/patches_to_trunk/2007-09-03-gw-get_enum-in-logarithm-complexity-with-bsearch.patch?view=markup&amp;pathrev=16">look</a></p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-identifier">GLenum</span><span class="hl-code"> </span><span class="hl-identifier">get_enum</span><span class="hl-brackets">(</span><span class="hl-types">const</span><span class="hl-code"> </span><span class="hl-types">char</span><span class="hl-code"> *</span><span class="hl-identifier">str</span><span class="hl-code">, </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">n</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">gl_str_value</span><span class="hl-code"> *</span><span class="hl-identifier">res</span><span class="hl-code">, </span><span class="hl-identifier">key</span><span class="hl-code">; </span><span class="hl-types">char</span><span class="hl-code"> *</span><span class="hl-identifier">buf</span><span class="hl-code"> = </span><span class="hl-identifier">malloc</span><span class="hl-brackets">(</span><span class="hl-identifier">n</span><span class="hl-code">+</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">strncpy</span><span class="hl-brackets">(</span><span class="hl-identifier">buf</span><span class="hl-code">,</span><span class="hl-identifier">str</span><span class="hl-code">,</span><span class="hl-identifier">n</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">buf</span><span class="hl-brackets">[</span><span class="hl-identifier">n</span><span class="hl-brackets">]</span><span class="hl-code">='\</span><span class="hl-number">0</span><span class="hl-code">'; </span><span class="hl-identifier">key</span><span class="hl-code">.</span><span class="hl-identifier">str</span><span class="hl-code"> = </span><span class="hl-identifier">buf</span><span class="hl-code">; </span><span class="hl-identifier">res</span><span class="hl-code"> = </span><span class="hl-identifier">bsearch</span><span class="hl-brackets">(</span><span class="hl-code"> &amp;</span><span class="hl-identifier">key</span><span class="hl-code">, </span><span class="hl-identifier">gl_str</span><span class="hl-code">, </span><span class="hl-identifier">gl_str_size</span><span class="hl-code">, </span><span class="hl-reserved">sizeof</span><span class="hl-brackets">(</span><span class="hl-types">struct</span><span class="hl-code"> </span><span class="hl-identifier">gl_str_value</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-identifier">comp_gl_str_value</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">free</span><span class="hl-brackets">(</span><span class="hl-identifier">buf</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">res</span><span class="hl-code">!=</span><span class="hl-prepro">NULL</span><span class="hl-brackets">)</span><span class="hl-code"> ? </span><span class="hl-identifier">res</span><span class="hl-code">-&gt;</span><span class="hl-identifier">value</span><span class="hl-code"> : </span><span class="hl-identifier">ENUM_ERROR</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <p>9 lines of code , where 1 is function prototype and is common, ~4 lines are data declaration and allocation, and rest : only ~5 lines are <span style="text-decoration: underline;">crucial</span>…</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-47200</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-47200</link>
				<description></description>
				<pubDate>Fri, 07 Sep 2007 16:40:01 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So Wes… that because:</p> <ol> <li>I propose to make now new stable version of LuaGL as fast as possible.</li> <li>This patch does <strong>not</strong> implement searching algorithm but uses one from library…</li> <li>I've read your version of get_enum and I'm not sure if it is 100% backward compatible (I'm not sure to OR operation in your algorithm "," … we have to discuss this point on private…)</li> <li>Please prepare small clear patch to trunk version to show us how do you want to merge your procedures with current trunk. If patch will be as small and as clear and 100% backward compatible with previous version of LuaGL it could be good thing.</li> <li>I'm not sure if in that case Lua hashtable makes significant difference</li> <li>Once again… as far as we make some cleanings (I mean fixing version 1.01 to make new as fast as possible and as most stable as possible ) in LuaGL , I think that smaller, and more clear patch == better patch.</li> </ol> <p>I like more sophisticated concepts connected with get_enum function. Some time ago I was testing my own hashtables with hash functions specially prepared to that <span style="text-decoration: underline;">static</span> set of data… but finally I realized that LuaGL need now small and stable solutions.<br /> In next setps I think that your solution after performance tests have a big chance to be the winner as best balance between sophistication and performance… by I'm not sure if your solutions are ready to be merged into stable tree of LuaGL, as I didn't see <span style="text-decoration: underline;">standalone</span> parch that makes that think.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-46224</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-46224</link>
				<description></description>
				<pubDate>Tue, 04 Sep 2007 13:56:36 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>We can create some performance tests, but I think that Wesley solution can be simpler and faster.<br /> Fabio</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-45821</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-45821</link>
				<description></description>
				<pubDate>Mon, 03 Sep 2007 13:24:08 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I've been using lua tables for the get_enum and get_string functions for a year now in a commercial project. This is going to be faster than your patch because it uses Lua's hashtabs (basically pointer comparisons) for string equality testing. I don't see any reason to be so conservative about this part of LuaGL. Why not use Lua tables? In my mind it's simpler and saves us the trouble of writing a searching algorithm.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-45713</guid>
				<title>Re: 2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-45713</link>
				<description></description>
				<pubDate>Mon, 03 Sep 2007 02:24:36 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>To see how it works just use following commands:</p> <div class="code"> <pre> <code># Download revision 16 (or newer) svn co -r 16 https://luagl.svn.sourceforge.net/svnroot/luagl luagl # Go there, make local copy of trunk and patch it. cd luagl/branches/grzegorzwierzowiecki/ ./cp_trunk_here.sh ./patch_trunk_with_current_gw-patches.sh trunk/ # Now compile local copy of trunk and test tests files cd trunk chmod +x configure ./configure linux make cd tests; lua test1.lua; lua test2.lua;</code> </pre></div> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18381#post-45712</guid>
				<title>2007-08 gw patch on get_enum</title>
				<link>http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum#post-45712</link>
				<description></description>
				<pubDate>Mon, 03 Sep 2007 02:12:44 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><a href="http://luagl.wikidot.com/viewsvn/?view=rev&amp;revision=16">http://luagl.wikidot.com/viewsvn/?view=rev&amp;revision=16</a></p> <blockquote> <p>This patch changes implementation of "static GLenum get_enum(const char *str, int n)". In previous implementation it was O(gl_str_size*n). Now it has complexity O(lg2(gl_str_size)*n).</p> </blockquote> <p>I propose to make this implementation as temporary for 1.02 version of LuaGL,<br /> cause it's:</p> <ul> <li>simple and small patch</li> <li>stable (uses well tested lib function bsearch)</li> <li>backward compatible</li> <li>it makes algorithm complexity much better</li> </ul> <p>in effect it increases performance without stability cost and risk ;) (but it's my opinion).</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18381/2007-08-gw-patch-on-get-enum">2007-08 gw patch on get_enum</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18360#post-45681</guid>
				<title>Re: Dev Roadmap</title>
				<link>http://luagl.wikidot.com/forum/t-18360/dev-roadmap#post-45681</link>
				<description></description>
				<pubDate>Sun, 02 Sep 2007 21:30:10 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Current tasks:<br /> <a href="http://sourceforge.net/pm/?group_id=85185">http://sourceforge.net/pm/?group_id=85185</a></p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18360/dev-roadmap">Dev Roadmap</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18360#post-45653</guid>
				<title>Dev Roadmap</title>
				<link>http://luagl.wikidot.com/forum/t-18360/dev-roadmap#post-45653</link>
				<description></description>
				<pubDate>Sun, 02 Sep 2007 18:52:45 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here's the current task list:</p> <p>GLU support (this would be nice to finish off. We're missing the gluSphere and other primitive calls. These are pretty trivial to bind. The NURBS stuff is more difficult)</p> <p>Add an alternative semantic: "gl.Begin(gl.Point);" (This doesn't really bother me, but could be take care of with with the enum table so is not difficult)</p> <p>Add OpenGL constants in LuaGL (I have code for this in my branch)<br /> Improve get_enum function (same as above)<br /> Add GLSL support. (I have code for this but maybe could come later)</p> <p>Here's what my roadmap would look like:</p> <p>1) Clean up headers by removing duplicate declarations from the gl and glu header files, consolidated in a single shared header. The shared header would also contain platform detection macros for choosing the proper gl, glu, and glut system headers</p> <p>2) fix the enum/string conversion</p> <p>3) remove as much malloc/free stuff as possible without too much trouble</p> <p>4) finish up glu wrappers</p> <p>5) develop a system for extensions</p> <p>6) start work on a x-platform windowing system</p> <p>… There are more but this can do for now. What do you all think?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18360/dev-roadmap">Dev Roadmap</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18336#post-45582</guid>
				<title>Re: 2007-08 GW Patches (commit 15)</title>
				<link>http://luagl.wikidot.com/forum/t-18336/2007-08-gw-patches-commit-15#post-45582</link>
				<description></description>
				<pubDate>Sun, 02 Sep 2007 11:47:19 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>To see how it works just use following commands:</p> <div class="code"> <pre> <code># Download revision 15 (or newer) svn co -r 15 https://luagl.svn.sourceforge.net/svnroot/luagl luagl # Go there, make local copy of trunk and patch it. cd luagl/branches/grzegorzwierzowiecki/ ./cp_trunk_here.sh ./patch_trunk_with_current_gw-patches.sh trunk/ # Now compile local copy of trunk and test tests files cd trunk chmod +x configure ./configure linux make cd tests; lua test1.lua; lua test2.lua;</code> </pre></div> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18336/2007-08-gw-patches-commit-15">2007-08 GW Patches (commit 15)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18336#post-45580</guid>
				<title>2007-08 GW Patches (commit 15)</title>
				<link>http://luagl.wikidot.com/forum/t-18336/2007-08-gw-patches-commit-15#post-45580</link>
				<description></description>
				<pubDate>Sun, 02 Sep 2007 11:39:10 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi, all, here are my patches (from 2007-08) to trunk version.</p> <p>For me most important ones are:</p> <ol> <li>2007-09-01-gw-LuaGlut_InitDisplayPatch_and_Include_of_GLUT</li> <li>2007-08-31-gw-0-sorted-values-in-tables</li> <li>2007-09-01-gw-tests_files_to_make_them_standalone</li> </ol> <p>A description about each patch is in description file "-desc.txt" , here is a commit description:<br /> <a href="http://luagl.wikidot.com/viewsvn/?view=rev&amp;revision=15">http://luagl.wikidot.com/viewsvn/?view=rev&amp;revision=15</a></p> <p>Just a part…</p> <blockquote> <p>This commit includes a set of most important patches to trunk and scripts that helps me in developing that patches. Each patch has description in PATCHNAME-desc.txt file. Scripts are self explaining, so just run it without parameter to see help info.</p> <p>Commit includes following files:</p> <ul> <li>patch_trunk_with_current_gw-patches.sh</li> </ul> <p>Use this script to patch directory with trunk version of LuaGL with Grzegorz Wierzowiecki's current patches.<br /> <strong>(…)</strong></p> <ul> <li>patches_to_trunk/2007-08-31-gw-0-sorted-values-in-tables.patch</li> <li>patches_to_trunk/2007-08-31-gw-0-sorted-values-in-tables-desc.txt</li> </ul> <p>Puts values in tables in lexicographical order.</p> <ul> <li>patches_to_trunk/2007-08-31-gw-temporary-patch--that-adds-temporary-makefiles.patch</li> <li>patches_to_trunk/2007-08-31-gw-temporary-patch--that-adds-temporary-makefiles-desc.txt</li> </ul> <p>Adds Makefiles… temporary thing.<br /> See txt file for more info.</p> <ul> <li>patches_to_trunk/2007-09-01-gw-LuaGlut_InitDisplayPatch_and_Include_of_GLUT.patch</li> <li>patches_to_trunk/2007-09-01-gw-LuaGlut_InitDisplayPatch_and_Include_of_GLUT-desc.txt</li> </ul> <p>Fixes glut.h inclusion problem and Display initialization on some platforms.<br /> See txt file for more info.</p> <ul> <li>patches_to_trunk/2007-09-01-gw-tests_files_to_make_them_standalone.patch</li> <li>patches_to_trunk/2007-09-01-gw-tests_files_to_make_them_standalone-desc.txt</li> </ul> <p>Make tests lua files runnable as standalone.<br /> See txt file for more info.<br /> <strong>(…)</strong></p> </blockquote> <p>to <a href="http://luagl.wikidot.com/viewsvn/?view=rev&amp;revision=15">read more go here</a></p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18336/2007-08-gw-patches-commit-15">2007-08 GW Patches (commit 15)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18084#post-45437</guid>
				<title>Re: Window toolkit system</title>
				<link>http://luagl.wikidot.com/forum/t-18084/window-toolkit-system#post-45437</link>
				<description></description>
				<pubDate>Sat, 01 Sep 2007 09:36:03 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Sounds good. I'll be working on the Cocoa system over the next few months if you want to start on one of the others as you have time. Once we get them to a decent level, we can compare functionality and refactor the interfaces to match.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18084/window-toolkit-system">Window toolkit system</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18084#post-45224</guid>
				<title>Re: Window toolkit system</title>
				<link>http://luagl.wikidot.com/forum/t-18084/window-toolkit-system#post-45224</link>
				<description></description>
				<pubDate>Fri, 31 Aug 2007 13:31:23 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I can think about Win32API :) , cause I have some experience with it.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18084/window-toolkit-system">Window toolkit system</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18084#post-45202</guid>
				<title>Re: Window toolkit system</title>
				<link>http://luagl.wikidot.com/forum/t-18084/window-toolkit-system#post-45202</link>
				<description></description>
				<pubDate>Fri, 31 Aug 2007 12:28:45 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'd imagine on Linux we'd want to do X11. On OSX I would do Cocoa. On Windows, I'm not sure what the options are right now.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18084/window-toolkit-system">Window toolkit system</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18084#post-44986</guid>
				<title>Re: Window toolkit system</title>
				<link>http://luagl.wikidot.com/forum/t-18084/window-toolkit-system#post-44986</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 18:40:16 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I think that we can cover any popular window toolkit system behind most of apis .<br /> In example, currently LuaGLUT is delivered with LuaGL, but behind that same LuaGLUT api we can hide another (in example Fox,AUX,Wiggle, X11…).</p> <p>So I think that we should now choose one API or create our own… and try to port it to as much platforms as we can.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18084/window-toolkit-system">Window toolkit system</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18084#post-44985</guid>
				<title>Window toolkit system</title>
				<link>http://luagl.wikidot.com/forum/t-18084/window-toolkit-system#post-44985</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 18:36:07 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I think that one unified window solution have to be delivered with LuaGL, to provide LuaGL as a ideal platform for rapid small opengl applications development .</p> <p>Cause of that there have to be :</p> <ul> <li>simple</li> <li>small</li> <li>fully x-platform</li> </ul> <p>What propositions, what ideas ?</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18084/window-toolkit-system">Window toolkit system</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18077#post-44981</guid>
				<title>Re: Comments on LuaGL and Its Future</title>
				<link>http://luagl.wikidot.com/forum/t-18077/comments-on-luagl-and-its-future#post-44981</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 18:09:04 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Great set of comments and ideas.<br /> But it <em>too</em> big chunk to comment and discuss in one place, so I suggest to split ideas into groups (according to topic: style, technologies, etc) and put it into several topics.<br /> Smaller portions of suggestions will be easier to discuss. :).</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18077/comments-on-luagl-and-its-future">Comments on LuaGL and Its Future</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-18077#post-44975</guid>
				<title>Comments on LuaGL and Its Future</title>
				<link>http://luagl.wikidot.com/forum/t-18077/comments-on-luagl-and-its-future#post-44975</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 17:20:51 +0000</pubDate>
				<wikidot:authorName>wes</wikidot:authorName>				<wikidot:authorUserId>12550</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Notes from my branch of LuaGL.</p> <p>Design notes on OpenGL bindings:<br /> - Wrapper functions should have as few return paths as is reasonable as this creates unnecessary complexity and overhead</p> <p>- Under the hood, we don't need to call each type of equivalent function. The Scripting bindings are abstactions to a certain degree of the low-level OpenGL API functions. If there are many function signatures offering the same functionality we should combine them where possible. The bindings are nicely abstracted this from within Lua but in the current trunk design are not necessarily so. For example, gl.Vertex maps to glVertex2f, glVertex3f, glVertex4f, glVertex2fv, glVertex3fv, and glVertex4fv. In the C wrapper function, we only need one set of these functions, with or without 'v', not both.</p> <p>- LuaGL will probably be used in many contexts since Lua is an embedding language. We should not try to predict how people will want to report errors but instead provide a default function that handles the most typical use-case scenario. For most apps this will involve calling luaL_error but other apps might have very different needs. As an example, a computer game might have it's own custom console that it would like scripting errors reported to. The authors of the game should be able to recompile LuaGL (or perhaps set it from a script at runtime?) by switching one line of code to put in place a different error function.</p> <p>- We should start auto-documenting LuaGL with doxygen style comments</p> <p>- the function lua_isstring coerces non-string types if it can. In wrapped functions where an actual string is the only logical input as is the case with enums in LuaGL scripts, we should instead use the idiom lua_type(L, index) == LUA_TSTRING is this will match only strings instead of strings in addition to coerces types</p> <p>- LuaGL has a lot of gratuitous (i.e. obvious) comments. It's a bit messy. Also, the comments are within multiline C stye comment tokens which prevents someone working with the source from using such comments to block out large chunks of code. If a comment is a one-liner, we should use one line comments '//' instead of '/* */'. I know the Lua authors prefer the multi-line style, but I find it hurts coding efficiency when modifying source files</p> <p>- To help readability, in many places we should have brackets after if/for/while loops, especially in if/else if/else blocks with more than one branch. In addition to preventing coding errors, this will eliminate potential issues from macros that expand to multiple lines from breaking when not contained in a pair of brackets.</p> <p>- I personally prefer tabs for indenting as opposed to spaces as it makes navigation with the arrow keys faster</p> <p>- In many places, LuaGL uses (int)lua_tonumber when it should use the built-in Lua function lua_tointeger</p> <p>- Use of malloc and free should be phased out as fast as possible, especially for small amounts of memory like vectors of floats. It's much faster for a function that could have 2, 3, or 4 values in a vector to just declare a vector of the maximum size statically and pass it's pointer in to the appropriate function instead of malloc'ing the exact amount.</p> <p>- Sometimes the use of malloc and free are unavoidable when the vector is of unkown size as it is for images and buffers of points. In these cases we should try to come up with some kind of buffer object to avoid constant re-/deallocation and to speed up the transfer of data from Lua to C. Possible solutions are a buffer user data class or the use of a global memory pool within Lua</p> <p>- The design goals and priorities of Lua should be the following<br /> 1) Provide robust bindings to as much of OpenGL as makes sense on a nearly 1 to 1 basis with low-level functions, including most of the OpenGL extensions. This way script authors and put low-level functions together to build higher-level abstractions for dealing with complex parts of the API like textures and framebuffer objects.<br /> 2) Once the low-level bindings are in place, development should focus on constructing high-level C++ classes for encapsulating parts of the OpenGL API that make sense grouped as objects to relieve some of the burden of script authors and increase performance by moving more of the processing to C/C++. Such high-level objects should be as platform agnostic and use-case agnostic as possible provuding robust and flexible functionality. Examples would be a Texture class, Shader class, FBO class<br /> 3) In parallel to 2), developement should also bring in related APIs for 3D graphics such as Cg if it makes sense in building abstractions like a Shader object. We should not, however, include projects for model or image loading for example as these are related sister proejcts but do not have to do directly with controlling the GPU like Cg does.<br /> 4) In addition to GLUT, it would be nice to provide native OpenGL windowing bindings as an option for users. In this way, LuaGL could provide x-platform windowing with a single interface</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-18077/comments-on-luagl-and-its-future">Comments on LuaGL and Its Future</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44971</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44971</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 16:53:02 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <blockquote> <p>it's very important that eventual changes must be backward compatible!</p> </blockquote> <p>Yes Fabio, indeed, LuaGL have to be a stable and backward compatible :).</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44967</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44967</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 16:45:35 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>And remember that it's very important that eventual changes must be backward compatible! It may not broke current projects using LuaGL.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44958</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44958</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 16:20:40 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The standard place to include glut is &lt;GL/glut.h&gt; . See: <a href="http://www.opengl.org/resources/libraries/glut/spec3/node7.html">http://www.opengl.org/resources/libraries/glut/spec3/node7.html</a>.<br /> The problem is that very often the standard is broken.</p> <p>The original solution that I have implemented is #2.</p> <p>An alternative is #3, maybe we can use GLUT_VERSION definition or other definition.</p> <p>A #4 solution is to not include glut at all. Leave it as responsability to who is using the lib.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44882</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44882</link>
				<description></description>
				<pubDate>Thu, 30 Aug 2007 14:27:18 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>On OSX since GLUT is a framework and is standardized in where it is located, doing:</p> <p>#include &lt;GLUT/glut.h&gt;</p> <p>will always work and is the prefered method of including this header. I think the inclusion of GLUT should be handled inside the OS detection macros.</p> <p>wes</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44493</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44493</link>
				<description></description>
				<pubDate>Wed, 29 Aug 2007 18:39:06 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So I see here tree possible solutions:</p> <p>1. Follow by Opengl.org examples and use #include &lt;GL/glut.h&gt; .</p> <p>2. Use #include &lt;glut.h&gt; (or even #include "glut.h") and then use more sophisticated "configure" script to set proper compiler parameters.</p> <p>3. Fabio's solution with preprocessor constants like __glut_h .</p> <p>*1 - Assuming that opengl.org is a kind of standard makes sens for me… examples: <a href="http://www.opengl.org/resources/code/samples/glut_examples/">http://www.opengl.org/resources/code/samples/glut_examples/</a><br /> <a href="http://www.opengl.org/resources/code/samples/glut_examples/examples/examples.html">http://www.opengl.org/resources/code/samples/glut_examples/examples/examples.html</a></p> <p>*2 - I mean "-I" in gcc. In this way we can adjust to current configuration without any interference into sources. Additionally on specific configurations (when compilation FAILs :( … ) user can simply create file "glut.h" in project directory just by "echo '#include &lt;XXX/glut.h&gt;' &gt; glut.h" to adjust project to his specific configuration (like "OpenGL/glut.h").</p> <p>*3 - It can be a another option between two previous ones.</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44488</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44488</link>
				<description></description>
				<pubDate>Wed, 29 Aug 2007 18:33:35 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Fabio proposed another solution:</p> <blockquote> <p>There is no standard place to put 'glut.h', specially<br /> in windows. Many people put it in &lt;GL/glut.h&gt;, others<br /> in &lt;GLUT/glut.h&gt; and others in &lt;glut.h&gt;. We could<br /> use:</p> <p>#ifndef <span style="text-decoration: underline;">glut_h</span><br /> … glut inclusion here …<br /> #endif</p> <p>So if the user put 'glut.h' in another place he can<br /> include by himself before including 'luaglut.h' with<br /> no errors..</p> </blockquote> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44486</guid>
				<title>Re: location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44486</link>
				<description></description>
				<pubDate>Wed, 29 Aug 2007 18:29:29 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Wesley proposed such kind of solution ….</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-prepro">#if</span><span class="hl-code"> </span><span class="hl-identifier">defined</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">__APPLE__</span><span class="hl-brackets">)</span><span class="hl-code"> || </span><span class="hl-identifier">defined</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">OSX</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-prepro"> #include </span><span class="hl-quotes">&lt;</span><span class="hl-string">GLUT/glut.h</span><span class="hl-quotes">&gt;</span><span class="hl-code"> </span><span class="hl-prepro">#elif</span><span class="hl-code"> </span><span class="hl-identifier">defined</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">__LINUX__</span><span class="hl-brackets">)</span><span class="hl-code"> || </span><span class="hl-identifier">defined</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">UNIX</span><span class="hl-brackets">)</span><span class="hl-code"> || </span><span class="hl-identifier">defined</span><span class="hl-brackets">(</span><span class="hl-identifier">WIN32</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-prepro"> #include </span><span class="hl-quotes">&lt;</span><span class="hl-string">GL/glut.h</span><span class="hl-quotes">&gt;</span><span class="hl-code"> </span><span class="hl-prepro">#endif</span> </pre></div> </div> <p>but after some searching I found that it's platform independent thing were GLUT files are located.<br /> So I thing we should think about another options…</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17966#post-44482</guid>
				<title>location of GLUT header files</title>
				<link>http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files#post-44482</link>
				<description></description>
				<pubDate>Wed, 29 Aug 2007 18:25:44 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi, there is a following problem.<br /> Depending on configuration glut have to be included in one of three ways:<br /> <tt>#include &lt;glut.h&gt;</tt><br /> <tt>#include &lt;GL/glut.h&gt;</tt><br /> <tt>#include &lt;GLUT/glut.h&gt;</tt><br /> (or even <tt>#include &lt;OpenGL/glut.h&gt;</tt> )</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-14649">The LuaGL Community / Patches, Fixes, Improvements etc.</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17966/location-of-glut-header-files">location of GLUT header files</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-17961#post-44475</guid>
				<title>Zachęta do syskusjii</title>
				<link>http://luagl.wikidot.com/forum/t-17961/zacheta-do-syskusjii#post-44475</link>
				<description></description>
				<pubDate>Wed, 29 Aug 2007 18:12:17 +0000</pubDate>
				<wikidot:authorName>gwpl</wikidot:authorName>				<wikidot:authorUserId>3313</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Witam wszystkich polskojęzycznych do dyskusji zw. z LuaGL :).</p> <p>Zakładajcie śmiało wątki, wyrażajcie opisnie, życzenia, pomysły…</p> <br/>Forum category: <a href="http://luagl.wikidot.com/forum/c-4797">Forum discussion / Dyskusje po Polsku</a><br/>Forum thread: <a href="http://luagl.wikidot.com/forum/t-17961/zacheta-do-syskusjii">Zachęta do syskusjii</a>
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>