Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


hunpro

Member Since 02 Sep 2007
Offline Last Active Yesterday, 01:58 PM

Topics I've Started

linking with havok

15 August 2009 - 12:29 PM

Hi all! I gave a try for the Havok api, but there is a strange linking problem. If I try to include havok headers more then one of my headers, the compiler (using VC2008 EE) gives theese errors:
phx_object.obj : error LNK2005: "char const * const HK_PHYSICS_KEYCODE" (?HK_PHYSICS_KEYCODE@@3QBDB) already defined in havok_core.obj
phx_object.obj : error LNK2005: "char const * const HK_ANIMATION_KEYCODE" (?HK_ANIMATION_KEYCODE@@3QBDB) already defined in havok_core.obj
phx_object.obj : error LNK2005: "char const * const HK_BEHAVIOR_KEYCODE" (?HK_BEHAVIOR_KEYCODE@@3QBDB) already defined in havok_core.obj
phx_object.obj : error LNK2005: "char const * const HK_CLOTH_KEYCODE" (?HK_CLOTH_KEYCODE@@3QBDB) already defined in havok_core.obj
phx_object.obj : error LNK2005: "char const * const HK_DESTRUCTION_KEYCODE" (?HK_DESTRUCTION_KEYCODE@@3QBDB) already defined in havok_core.obj
phx_object.obj : error LNK2005: "char const * const HK_AI_KEYCODE" (?HK_AI_KEYCODE@@3QBDB) already defined in havok_core.obj
phx_object.obj : error LNK2005: "public: static class hkTypeInfo const * const * const hkBuiltinTypeRegistry::StaticLinkedTypeInfos" (?StaticLinkedTypeInfos@hkBuiltinTypeRegistry@@2QBQBVhkTypeInfo@@B) already defined in havok_core.obj
phx_object.obj : error LNK2005: "public: static class hkClass const * const * const hkBuiltinTypeRegistry::StaticLinkedClasses" (?StaticLinkedClasses@hkBuiltinTypeRegistry@@2QBQBVhkClass@@B) already defined in havok_core.obj
phx_object.obj : error LNK2005: "public: static struct hkVersionRegistry::Updater const * * hkVersionRegistry::StaticLinkedUpdaters" (?StaticLinkedUpdaters@hkVersionRegistry@@2PAPBUUpdater@1@A) already defined in havok_core.obj
phx_object.obj : error LNK2005: "public: static class hkStaticClassNameRegistry const * * hkVersionRegistry::StaticLinkedClassRegistries" (?StaticLinkedClassRegistries@hkVersionRegistry@@2PAPBVhkStaticClassNameRegistry@@A) already defined in havok_core.obj

First, I tried to include only to cpp files, but more than one causes a problem there too. Each of my headers has the #pragma once / #ifndef stuff (tried both), but no success. I've tried a very simple console project to test it:
// header1.h
#pragma once // same with #ifndef's
#include "havoc_headers.h"

// cpp1
#include "header1.h"

// cpp2
#include "header1.h"

int main()
{
return 0;
}

// ...the linker yells
I can solve this with using only one .cpp to handle all Havok related code, but that would be quite messy. What do you think?

OpenAL: stereo then mono on same source

13 January 2009 - 08:42 AM

Hi, I'm wrapping OpenAL, and found a strange thing: if I play a stereo sound, then assinging the same soundsource to a mono sound, the mono plays ( alGetSourcei(source,AL_SOURCE_STATE,&state) -> state==AL_PLAYING), but there is only silence. If mono is first, or the second sound is a stereo too, then everything is ok. I played around a bit, looking all the alGetSourcef() alGetSourcefv() properties, they are the same for mono and stereo, of course, we talk about the same source. Finally I tried to create the OAL device in 'generic software' not in 'generic hardware'(second is default) - now it is working. I use OpenAL SDK 1.1 (summer 2007) with VS2005 - VC8. My testcode (how to format code): // removed error checking for more clear view ALuint source; alGenSources(1,&source); alSourcei(source,AL_BUFFER,stereobufferindex); // stereo buffer alSourcePlay(source); Sleep(4000); // no matter if we wait until sound stops // second buffer alSourceStop(source); alSourcei(source,AL_BUFFER,NULL); alSourcei(source,AL_BUFFER,monobufferindex); // mono buffer alSourcePlay(source); // nothing to hear // wait for sound.. Should I use software mode always? (think it's slower, but works..I hope ;) (BTW: this is not the first bug with the hardware renderer, once mono-ogg-streaming made funny stuff, repeating first second of playback.. reinstalling the same SDK has solved that..cool)

vertex-processing-speed

22 December 2007 - 12:12 PM

I tried to use the full 'vertex-power' of my Gef7300GS, NV's site says it is ~420Million vertex/sec (kinda awsome :) ) I have tried to draw a triangelist with no vertex caching, and 2.6M tris (~7.8M vertices) runs on about 4 fps, that's only 30Mvertex/sec. (less than 10%..) Shaders are small, objects (50) are small on screen, it is not pixel-bound. Buffers are DEFAULT, and WRITEONLY, the fastest combination. I'd like to reach at least 60-70%.. Do you think it is impossible?

Shadow Volume extrusion with vertex-skinning

02 September 2007 - 04:10 PM

Hi, I'm new here, and of course with a problem...:) I'm making a simple demo with shadow volumes, and everything is super, until I try to use it with animated meshes. I've read a lot of whitepapers about the technique, but only with static meshes. My only problem is, how to transform the mesh normals to remain parallel on each face (per face must normals be parallel.) I tried lot of 'ideas', the papers said, but all gone bad. (like rearrange matrix paletteincides, and use one matrix on a faces' normals, or strore with each vertex the other two vertices, and make a cross product to get normals..) I have no more idea, but it can be done... they said. But how? (and sorry for my english..)

PARTNERS