Horde3D

Next-Generation Graphics Engine
It is currently 21.04.2025, 03:36

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 22.12.2008, 00:02 
Offline

Joined: 21.12.2008, 23:46
Posts: 23
I have successfully created a char* data-field for the Horde3D::Geometry which
even successfully loads in
Horde3D::loadResource(generatedGeometryRes, cp, geomSize);

What would be the correct order to set a material and get this geometry into the scenegraph?
It think it might be a naming-problen (maybe not all nodes should be called "spec"...) or
a mistake in my scenegraph hierarchy.
Code:
        .......
        GeometryStreamGenerator* gsg = new GeometryStreamGenerator();
   const char* cp = gsg->getStream();
   specRes = Horde3D::addResource(ResourceTypes::Geometry, "spec", 0);
   Horde3D::loadResource(specRes, cp, gsg->getStreamSize());
   specNode = Horde3D::addModelNode(RootNode, "spec", specRes);
   specMesh = Horde3D::addMeshNode(specNode, "spec", stonesRes, 0, gsg->getNumTriangleIndices(), 0, (gsg->getNumVertices()-1));
   Horde3D::addNodes(RootNode, specNode);
   Horde3D::addNodes(specNode, specMesh);
        ....


Last edited by wakko on 22.12.2008, 13:21, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 11:18 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Did you check the engine log? Maybe there are some hints what can be wrong.


Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 11:57 
Offline

Joined: 21.12.2008, 23:46
Posts: 23
After removing the two "addNodes(...)"-lines there are no error messages in the EngineLog.html
but my geometry still won't be drawn...
Code:
..........
0.265    Adding Camera node 'Camera'
0.265    Adding nodes from SceneGraph resource 'cube.scene.xml'
0.500    Adding Geometry resource 'specGeom'
0.500    Loading resource 'specGeom'
0.500    Adding Model node 'specNode'
0.500    Adding Mesh node 'specMesh'
0.500    Adding Light node 'Light1'


Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 12:00 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Maybe you cut off the messages, but I'm missing a log message about loading the shader and material. Are those present?


Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 12:05 
Offline

Joined: 21.12.2008, 23:46
Posts: 23
Yes they are:
Quote:
0.000 Initializing OpenGL renderer using OGL '2.1.8304 Release' by 'ATI Technologies Inc.' on 'Sapphire RADEON X1600 PRO'
0.031 Shadow map precision is limited to 16 bit
0.031 Shadow map precision is limited to 16 bit
0.031 Adding Pipeline resource 'hdr.pipeline.xml'
0.031 Adding Pipeline resource 'forward.pipeline.xml'
0.031 Adding Material resource 'font.material.xml'
0.031 Adding Material resource 'logo.material.xml'
0.031 Adding SceneGraph resource 'cube.scene.xml'
0.031 Loading resource 'hdr.pipeline.xml'
0.031 Adding Material resource 'globalSettings.material.xml'
0.031 Adding Material resource 'postHDR.material.xml'
0.046 Loading resource 'forward.pipeline.xml'
0.046 Loading resource 'font.material.xml'
0.046 Adding Shader resource 'overlay.shader.xml'
0.046 Adding Texture2D resource 'font.tga'
0.046 Loading resource 'logo.material.xml'
0.046 Adding Texture2D resource 'logo.tga'
0.046 Loading resource 'cube.scene.xml'
0.046 Adding Geometry resource 'cube.geo'
0.046 Adding Material resource 'platform/stones.material.xml'
0.046 Loading resource 'globalSettings.material.xml'
0.046 Adding TextureCube resource 'ambientMap.png'
0.046 Loading resource 'postHDR.material.xml'
0.046 Adding Shader resource 'postHDR.shader.xml'
0.046 Loading resource 'overlay.shader.xml'
0.046 Shader resource 'overlay.shader.xml': Compiling shader context 'OVERLAY'
0.062 Shader resource 'overlay.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.


0.062 Loading resource 'font.tga'
0.125 Loading resource 'logo.tga'
0.125 Loading resource 'cube.geo'
0.125 Loading resource 'platform/stones.material.xml'
0.125 Adding Shader resource 'parallax.shader.xml'
0.125 Adding Texture2D resource 'layingrock.jpg'
0.125 Loading resource 'ambientMap.png'
0.156 Loading resource 'postHDR.shader.xml'
0.156 Adding Code resource 'utilityLib/fragPostProcess.glsl'
0.156 Shader resource 'postHDR.shader.xml': Compiling shader context 'FINALPASS'
0.156 Shader resource 'postHDR.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.


0.156 Loading resource 'parallax.shader.xml'
0.156 Adding Code resource 'utilityLib/vertCommon.glsl'
0.156 Adding Code resource 'utilityLib/fragDeferredWrite.glsl'
0.156 Adding Code resource 'utilityLib/fragLighting.glsl'
0.156 Loading resource 'layingrock.jpg'
0.218 Loading resource 'utilityLib/fragPostProcess.glsl'
0.218 Shader resource 'postHDR.shader.xml': Compiling shader context 'BRIGHTPASS'
0.218 Shader resource 'postHDR.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.


0.218 Shader resource 'postHDR.shader.xml': Compiling shader context 'BLUR'
0.234 Shader resource 'postHDR.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.


0.234 Loading resource 'utilityLib/vertCommon.glsl'
0.234 Loading resource 'utilityLib/fragDeferredWrite.glsl'
0.234 Shader resource 'parallax.shader.xml': Compiling shader context 'ATTRIBPASS'
0.234 Shader resource 'parallax.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.
WARNING: 0:1012: extension 'GL_ARB_draw_buffers' is not supported

0.234 Loading resource 'utilityLib/fragLighting.glsl'
0.250 Shader resource 'parallax.shader.xml': Compiling shader context 'LIGHTING'
0.265 Shader resource 'parallax.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.


0.265 Shader resource 'parallax.shader.xml': Compiling shader context 'AMBIENT'
0.265 Shader resource 'parallax.shader.xml': ShaderLog: [Linking]

Fragment shader(s) linked, vertex shader(s) linked.


0.265 Adding Camera node 'Camera'
0.265 Adding nodes from SceneGraph resource 'cube.scene.xml'
0.500 Adding Geometry resource 'specGeom'
0.500 Loading resource 'specGeom'
0.500 Adding Model node 'specNode'
0.500 Adding Mesh node 'specMesh'
0.500 Adding Light node 'Light1'


edit:
Is it possible that my static scenegraph "cube.scene.xml" (which is displayed properly)
somehow interferes with my dynamically generated geometry?


Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 12:22 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
wakko wrote:
Is it possible that my static scenegraph "cube.scene.xml" (which is displayed properly)
somehow interferes with my dynamically generated geometry?

No that shouldn't make any difference. The engine does not know which of those resources are generated "dynamically" and which are loaded from a file.
Are you sure, that your dynamically generated data is correct? Did you tried rendering in debug mode?


Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 13:00 
Offline

Joined: 21.12.2008, 23:46
Posts: 23
My geometry data seems to be ok as it is visible in Debug-mode but not in wireframe view.


Top
 Profile  
Reply with quote  
PostPosted: 22.12.2008, 13:20 
Offline

Joined: 21.12.2008, 23:46
Posts: 23
Solved!
After setting the appropriate material it works.
Thanks.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group