<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — setColor no worky?]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=265&amp;type=atom" />
	<updated>2007-08-16T07:59:31Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=265</id>
		<entry>
			<title type="html"><![CDATA[Re: setColor no worky?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1081#p1081" />
			<content type="html"><![CDATA[<p>Hi gman!</p><p>it seems the problem is drivertype? and colorchange works in openGL only?</p><div class="codebox"><pre><code>param.setDriverType(EDT_OPENGL)        &#039;ok
&#039;param.setDriverType(EDT_DIRECT3D8)   &#039;no color
&#039;param.setDriverType(EDT_DIRECT3D9)   &#039;no color</code></pre></div><p>this is strange...or isn&#039;t it?</p><p>complete code:<br /></p><div class="codebox"><pre><code>SuperStrict
Framework Irrlicht.Core

Local param:SIrrlichtCreationParameters = SIrrlichtCreationParameters.create()
param.setDriverType(EDT_OPENGL)        &#039;ok
&#039;param.setDriverType(EDT_DIRECT3D8)    &#039;no color
&#039;param.setDriverType(EDT_DIRECT3D9) &#039;no color

Local device:IrrlichtDevice = IrrlichtDevice.createFromParams(param)
Local driver:IVideoDriver=device.getVideoDriver()
Local smgr:ISceneManager=device.getSceneManager()

&#039;create camera
Local camera:ICameraSceneNode = smgr.addCameraSceneNodeMAYA()
camera.setPosition(_VECTOR3DF(0,30,-100))

&#039;create light
Local light_node:ISceneNode = smgr.addLightSceneNode(Null, _VECTOR3DF(+100,150,-10), _SCOLORF(1, 1, 1, 255), 200.0) &#039;RGBA

&#039;create irr nodes
Local INode:ISceneNode = smgr.addSphereSceneNode()
INode.getMaterial(0).getDiffuseColor().set(255, 0, 255, 0) &#039;ARGB

While(device.run())
    driver.beginScene(True, True, Null)
    smgr.drawAll()
    driver.endScene()
Wend    
device.drop()</code></pre></div>]]></content>
			<author>
				<name><![CDATA[kimgar]]></name>
				<uri>https://gprogs.com/profile.php?id=101</uri>
			</author>
			<updated>2007-08-16T07:59:31Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1081#p1081</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: setColor no worky?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1080#p1080" />
			<content type="html"><![CDATA[<p>hi kimgar <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; have you tried adding a light?&nbsp; or setting the lighting material flag to off?</p><p>do you have a quick sample program?</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-08-16T00:15:18Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1080#p1080</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[setColor no worky?]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1076#p1076" />
			<content type="html"><![CDATA[<p>i&#039;m trying to change the color of default geometry like this:</p><div class="codebox"><pre><code>Local irrNode:ISceneNode = smgr.addCubeSceneNode()
irrNode.getMaterial(0).getDiffuseColor().setBlue(128)

Print irrNode.getMaterial(0).getDiffuseColor().getBlue() &#039;prints 128...</code></pre></div><p>setBlue works, as getBlue returns the correct value, but there&#039;s no change on screen, hmmm, i am missing something...</p>]]></content>
			<author>
				<name><![CDATA[kimgar]]></name>
				<uri>https://gprogs.com/profile.php?id=101</uri>
			</author>
			<updated>2007-08-08T10:17:09Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1076#p1076</id>
		</entry>
</feed>
