<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Problem with Rubik Cube</title>
		<link>http://www.allegro.cc/forums/view/618420</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 23 May 2021 23:19:59 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi all:<br />  I am back at it again! Hope all is well.<br />  This time it will be a rubik cube that I need help on.<br />  I have posted the files above. I tried to zip them but had no luck.<br />  This is my problem:</p><p>  When you run the program the cube will start to rotate.<br />  This is fine. I have it set up to press the &#39;s&#39; key so I have a still<br />  cube to hopefully begin rotating slices.<br />  It should then show white on top, blue on the right side and red on<br />  the left side. What happens is the left side is all white.<br />  If you then press the &#39;r&#39; key to begin rotating again what was all white on     <br />  left side is now blue just like the right side.</p><p>  I have no idea what is happening except there is something going on<br />  between texture[0] and texture[5].</p><p>  The program is quite large now. I want to put it in an array after I<br />  get it all working right. I did a search on the internet and found<br />  some rubik cube programs but did not look like I wanted, so I made<br />  my own.<br />  If someone has the time to take a look I would be thankful.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Scooter)</author>
		<pubDate>Sun, 23 May 2021 20:27:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Firstly, you&#39;re only declaring 5 textures, you need 6:</p><p><span class="source-code">GLuint texture<span class="k2">[</span><span class="n">6</span><span class="k2">]</span><span class="k2">;</span> <span class="c">//YOU HAD THIS AS 5!!</span></span></p><p>Secondly, you need to fix your rotate code:</p><div class="source-code snippet"><div class="inner"><pre>    <span class="k1">if</span><span class="k2">(</span>rotate <span class="k3">=</span><span class="k3">=</span> <span class="k1">false</span><span class="k2">)</span>
       <span class="k2">{</span>
         glRotatef<span class="k2">(</span><span class="n">45</span>.<span class="n">0</span>, <span class="n">1</span>.<span class="n">0</span>, <span class="n">0</span>.<span class="n">0</span>, <span class="n">0</span>.<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
         glRotatef<span class="k2">(</span><span class="n">45</span>.<span class="n">0</span>, <span class="n">0</span>.<span class="n">0</span>, <span class="n">1</span>.<span class="n">0</span>, <span class="n">0</span>.<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
       <span class="k2">}</span>
</pre></div></div><p>

That should get you where you need to be!</p><p>EDIT:<br />Actually, you don&#39;t need to change your rotate code, that&#39;s up to you!!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dizzy Egg)</author>
		<pubDate>Sun, 23 May 2021 22:34:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi Dizzy:<br />  I cannot believe I did that! That is unreal!</p><p>  I had texture[5]; Then right beside that, I had load 6 textures.<br />  OK, I made a mistake, but why did the rotation work so well since<br />  I was missing one. In my code I said that I needed 6. I guess that<br />  is what saved me. I guess I need an eye exam!</p><p>  Also, some months ago I sent you a really fast program that loaded<br />  obj files. Were you able to do anything with it? Just checking.</p><p>  Thanks for looking at my code. I hope you didn&#39;t have to spend much<br />  time on it. Thanks again, have a great day!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Scooter)</author>
		<pubDate>Sun, 23 May 2021 23:19:59 +0000</pubDate>
	</item>
</rss>
