Jump to content
The Dark Mod Forums

Rendering of Projected Lights


Recommended Posts

As it seems, the rendering of projected lights is not working anymore in DarkRadiant since I changed some stuff during my work on the draggable projected lights. It's still working in GtkRadiant, so it's definitely because of my changes.

 

I did some comparisons between the relevant code sections and tried to simluate the behaviour of the state before I made the changes, and I think I got this right, but the lights are still not rendering correctly.

 

From what I can see the projection matrix code is still unchanged, so this part should still work. I tried to setup a build environment for GtkRadiant using VC++ 2005 but I failed after some time, as it complains about some type conversion error in the type-cast system (can't remember the actual message, but I think it was something about casting const to non-const).

 

@namespace: Are there some special compiler flags necessary to build GtkRadiant? It would be really helpful to add some debug output in the GtkRadiant code to check against the DarkRadiant render code. It's probably something with the light bounds but I can't solve it from just reading the code alone.

Link to comment
Share on other sites

@namespace: Are there some special compiler flags necessary to build GtkRadiant? It would be really helpful to add some debug output in the GtkRadiant code to check against the DarkRadiant render code. It's probably something with the light bounds but I can't solve it from just reading the code alone.

 

Gtk comes with already setup VC2k5 projectfiles, what are the problems?

Link to comment
Share on other sites

Yeah, I imported those files and added the GTK-headers to the project settings. It stopped compiling somewhere in the main codebase. I'll have to look at the error output on my other machine, but it was related to the TypeCast stuff. It complained about const-ness or something like that. I'll post back here as soon as I wrote down the exact error message.

Link to comment
Share on other sites

Not that I remember, I just downloaded it from the SVN repository. What's that package exactly? I guess it can be downloaded from qeradiant.com?

 

edit: Ok, found the link in the COMPILING file, I will check that out and post back here.

Link to comment
Share on other sites

Still no luck with getting this to compile without errors. I got a few thousands of warnings ("C++ exception handler used, but unwind semantics are not enabled.") which I could get rid of, but there are still a few errors when compiling the libs and the GtkRadiant project. This is an example of the error log at plugin.cpp:

c:\programme\microsoft visual studio 8\vc\include\xutility(2228) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'const SmartReference' (or there is no acceptable conversion)

with

[

Type=scene::Node,

Counter=IncRefDecRefCounter<:node>

]

c:\temp\gtkradiant\trunk\libs\generic\reference.h(51): could be 'Reference &Reference::operator =(const Reference &)'

with

[

Type=scene::Node

]

while trying to match the argument list '(Reference, const SmartReference)'

with

[

Type=scene::Node

]

c:\programme\microsoft visual studio 8\vc\include\xutility(2976) : see reference to function template instantiation '_OutIt std::_Copy_opt<:list>::_Const_iterator<_secure_validation>, _OutIt,std::_Iter_random_helper<_cat1>::_Iter_random_cat>( _InIt,_InIt,_OutIt,_InOutItCat, std::_Nonscalar_ptr_iterator_tag, std::_Range_checked_iterator_tag)' being compiled

with

[

_OutIt=Reference<:node> *,

_Ty=NodeSmartReference,

_Secure_validation=false,

_Cat1=std::list::_Const_iterator::iterator_category,

_Cat2=std::random_access_iterator_tag,

_InIt=std::list::_Const_iterator,

_InOutItCat=std::_Iter_random_helper<:list>::_Const_iterator ::iterator_category,std::random_access_i

terator_tag>::_Iter_random_cat

]

c:\programme\microsoft visual studio 8\vc\include\vector(962) : see reference to function template instantiation '_OutIt stdext::unchecked_copy<_iter>*>(_InIt,_InIt,_OutIt)' being compiled

with

[

_OutIt=Reference<:node> *,

_Iter=std::list::_Const_iterator,

Type=scene::Node,

_InIt=std::list::_Const_iterator

]

c:\programme\microsoft visual studio 8\vc\include\vector(866) : see reference to function template instantiation 'void std::vector<_ty>::_Insert<_iter>(std::_Vector_iterator<_ty>,_Iter,_Iter,std::forward_iterator_ta

g)' being compiled

with

[

_Ty=NodeReference,

_Iter=std::list::_Const_iterator,

_Alloc=std::allocator

]

c:\programme\microsoft visual studio 8\vc\include\vector(524) : see reference to function template instantiation 'void std::vector<_ty>::insert<_iter>(std::_Vector_iterator<_ty>,_Iter,_Iter)' being compiled

with

[

_Ty=NodeReference,

_Iter=std::list::_Const_iterator,

_Alloc=std::allocator

]

c:\programme\microsoft visual studio 8\vc\include\vector(501) : see reference to function template instantiation 'void std::vector<_ty>::_Construct<_iter>(_Iter,_Iter,std::input_iterator_tag)' being compiled

with

[

_Ty=NodeReference,

_Iter=std::list::_Const_iterator

]

c:\temp\gtkradiant\trunk\libs\traverselib.h(90) : see reference to function template instantiation 'std::vector<_ty>::vector<:list>::_Const_iterator<_secure_validation>>(_Iter,_Iter)' being compiled

with

[

_Ty=NodeReference,

Value=NodeSmartReference,

_Secure_validation=true,

_Iter=std::list::_Const_iterator

]

plugin.cpp

I also had to set the include paths of all the gtk, mhash and whatnot header files in the project settings after downloading the gtkradiant dependency package (I removed the other paths that I had added before that, so I think that's clean).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...