Horde3D

Next-Generation Graphics Engine
It is currently 16.04.2024, 05:16

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Shader limits?
PostPosted: 06.01.2008, 19:02 
Offline

Joined: 20.12.2007, 00:18
Posts: 23
Is there some kind of limit on the number of shaders that can be used. I'm having a problem where say I have shaderA which works fine on my model. I add shaderB which is a copy of shaderA, and change the material to point to shaderB instead, and it no longer appears in the engine. If I point the material to some other shader I've previously created it works too, so it's almost as if I've hit a limit. The shader is getting compiled according to the log.

I'm not sure if it's related but I've also found in certain cases objects won't appear until I move the camera around, or if I get too close the texture will change to something else.

Anyone encountered these issues?

Thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 07.01.2008, 01:02 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
There is no shader limit in the engine. Are you changing the materials dynamically during runtime? You could try to switch to debug mode (F7 in the samples) to see if your model is still there.

Manny wrote:
I'm not sure if it's related but I've also found in certain cases objects won't appear until I move the camera around, or if I get too close the texture will change to something else.


This can happen when you apply a shader which uses two textures from a material which only binds one texture. The second one is undefined and OpenGL takes whatever is currently in the memory.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 24.02.2008, 17:45 
Offline

Joined: 20.12.2007, 00:18
Posts: 23
Quote:
This can happen when you apply a shader which uses two textures from a material which only binds one texture. The second one is undefined and OpenGL takes whatever is currently in the memory.


Nope, this happens even if I simply copy the skinning shader and rename it to something else (and point a material to use it). In fact, in this case the object in question doesn't appear until it's been offscreen. Once it comes back onscreen it will be rendered.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 24.02.2008, 17:53 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
This looks like the bug reported here:

http://www.nextgen-engine.net/forums/viewtopic.php?t=225

It has been fixed in version 0.14, so please upgrade to the latest version.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 24.02.2008, 18:47 
Offline

Joined: 20.12.2007, 00:18
Posts: 23
The sample in that link does display what appears to be the same bug, however I'm now running with 0.14 and it still occurs.

I'm trying to see if the samples exhibit the same behaviour but I'm getting odd linker errors when building them:

fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411'


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 25.02.2008, 15:19 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Could you describe exactly the steps necessary to reproduce the problem? The best of course would be a small sample file. This would greatly help me to track down the issue.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 01.03.2008, 18:42 
Offline

Joined: 20.12.2007, 00:18
Posts: 23
Quote:
Could you describe exactly the steps necessary to reproduce the problem?


I literally just downloaded 0.14 and loaded the Horde3d solution file and rebuilt the chicago or knight sample. The error in my first post occurs in debug. In release i get the following:

Quote:
fatal error C1047: The object or library file '..\..\build\sample chicago\release\app.obj' was created with an older compiler than other objects; rebuild old objects and libraries
3>LINK : fatal error LNK1257: code generation failed


Is there possibly some conflicts between any libs. I noticed another post with the same issue and you asked about SP1. I don't have this installed, and from what I've read about it recently I'm not convinced I should - it seems to cause a lot of problems. Could that be an issue though?
I could upload a sample for you, but I haven't changed a thing - this is the freshly downloaded SDK :(

This is the build log:

Quote:
Build Log Rebuild started: Project: Sample Chicago, Configuration: Release|Win32
Command Lines Creating temporary file "C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\RSP00003D32843660.rsp" with contents
[
/O2 /GL /I "C:\Dev\Toolkit\SDKs\Horde3D\Bindings/C++" /I "c:\Dev\Toolkit\SDKs\Horde3D\Samples\Chicago\../../Dependencies/Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /EHsc /MT /Fo"C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\\" /Fd"C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\vc80.pdb" /W3 /c /Wp64 /Zi /TP .\main.cpp

.\crowd.cpp

.\app.cpp
]
Creating command line "cl.exe @"C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\RSP00003D32843660.rsp" /nologo /errorReport:prompt"
Creating temporary file "C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\RSP00003E32843660.rsp" with contents
[
/OUT:"C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\Sample_Chicago.exe" /INCREMENTAL:NO /LIBPATH:"C:\Dev\Toolkit\SDKs\Horde3D\Bindings/C++" /LIBPATH:"c:\Dev\Toolkit\SDKs\Horde3D\Samples\Chicago\../../Dependencies/Libs_VC8" /MANIFEST /MANIFESTFILE:"C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\Sample_Chicago.exe.intermediate.manifest" /DEBUG /PDB:"c:\dev\toolkit\sdks\horde3d\build\sample chicago\release\Sample_Chicago.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ENTRY:mainCRTStartup GLFW.lib OpenGL32.lib Horde3D_vc8.lib Horde3DUtils_vc8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..\..\build\horde3d utils\release\horde3dutils_vc8.lib" "..\..\build\horde3d engine\release\horde3d_vc8.lib"

"..\..\build\sample chicago\release\app.obj"

"..\..\build\sample chicago\release\crowd.obj"

"..\..\build\sample chicago\release\main.obj"
]
Creating command line "link.exe @"C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\RSP00003E32843660.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Output Window Compiling...
main.cpp
crowd.cpp
app.cpp
Linking...
fatal error C1047: The object or library file '..\..\build\sample chicago\release\app.obj' was created with an older compiler than other objects; rebuild old objects and libraries
LINK : fatal error LNK1257: code generation failed
Results Build log was saved at "file://C:\Dev\Toolkit\SDKs\Horde3D\Build\Sample Chicago\Release\BuildLog.htm"
Sample Chicago - 1 error(s), 0 warning(s)


Is there anything else I can provide that may shed some light?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 02.03.2008, 12:01 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Actually the only thing that I think could cause such problems is GLFW which I have included as a precompiled library. You could try to download the GLFW source and build it yourself. A soultion is included so this very easy, just switch to release config, hit the build button and copy the created lib to the Horde3D SDK directory. I'm curious to see if that is the problem...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 11.03.2008, 07:59 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
GLFW is included as DLL now instad of being linked statically with the sample apps. I think this should solve problems with different versions of Visual Studio.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 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:  
cron
Powered by phpBB® Forum Software © phpBB Group