sipickles

Members
  • Content count

    804
  • Joined

  • Last visited

Community Reputation

240 Neutral

About sipickles

  • Rank
    Advanced Member
  1. hey, i saw your post, i would like to talk to you about my project to see if you are interested.
  2. Hello, I have a reasonable well developed DirectX9 engine I use for games and interactive kiosks. Part of this is a text-rendering UI. I am coming slightly unstuck with my latest project which requires Hungarian characters, for example in the word FELNÕTTEKNEK (Firefox seems to render that special O okay!) If I render it with boring ARIAL typeface I get the expected result: [img]http://img685.imageshack.us/img685/1096/hung1.jpg[/img] To get the accent correct I had to switch from DEFAULT_CHARSET to EASTEUROPE_CHARSET when creating the font: [source]D3DXCreateFont( m_device, m_point, 0, FW_NORMAL, 1, FALSE, //DEFAULT_CHARSET, EASTEUROPE_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, m_name.c_str(), &m_font );[/source] So now I switch to my preferred type face, Futura CE Medium. WTF? The text is scrambled. I am puzzled by this because the 'CE' bit mean it contains the extra central european characters. [img]http://img808.imageshack.us/img808/7233/hung2f.jpg[/img] My application is using multibyte characters but it can render the special O in Arial, why not this other font? The character appears in text files encoded with win-1250 and win1252. Is it a unicode font? Thanks Simon
  3. Flash GUI in Direct3D

    [quote name='nikgastovski' timestamp='1296630658' post='4768364'] why not use gameswf/scaleform?[/quote] Thanks for the suggestions. I had come across Scaleform but its very expensive. Not heard of gameswf before. Looks good but not in active development - a bit of a turn off but I'll give it a try. Any others out there?
  4. Hi, For a while I have been using Awesomium to add a 2d HTML driven GUI to my game. I always imagined I could use flash with Awesomium too, and yes, it does render flash. The problem is communicating with a local flash movie via Javascript. Its a security problem. I can get the javascript to send data to the swf, but only if I add the swf path to the Global Security Settings of the Flash Player. Now, I can't really expect my end-users to perform this step. Is there a workaround to get Awesomium to play and communicate with a local swf file? Alternatively, what other methods are there of using flash in a GUI in DirectX? Ideally, I'd embed a flash player in my game and copy the rendered output to a directX texture. Is this possible? Thanks
  5. Stretch a mesh between two points

    You can simply use D3DXMatrixLookAtLH and inverse the result as described here
  6. Stretch a mesh between two points

    Quote:Original post by haegarr Its just the same as computing a look-at matrix Nicely put, I hadn't looked at it like that
  7. Hi, Not sure if this should be in the maths section but since I'd like to use D3DX operations to achieve this, I've posted here. Say I have a unit cube - a simple cube mesh 1 x 1 x 1 - and two points in 3d space. I'd like to link the points with a 3d line made by transforming the cube. Could anyone take me through the translation, rotation and scaling stages required to do this? My thoughts: Position cube midway between two points Scale cube to height of distance between two points, and width of desired line Perform a 3d rotation to match ends of stretched cube to two points Its really the last operation I am having trouble with. Any advice gratefully received. I am using DX9 btw. Thanks Simon
  8. Square spiral of coordinates round a grid point

    Thanks for putting it so clearly.... :)
  9. Hi, Say I have a camera at coordinate (10,10). Is there an algorithm which would generate a square spiral with this point at the centre? I'd like to use it to process info nearest camera, then with increasing distance, until a pre-set time allocation is reached. I'd expect data like this: 0 (10,10) 1 (11,10) 2 (11,11) 3 (10,11) 4 ( 9,11) 5 ( 9,10) 6 ( 9, 9) 7 (10, 9) 8 (11, 9) 9 (12, 9) 10 (12,10) 11 (12,11) 12 (12,12) 13 (11,12) 14 (10,12) 15 ( 9,12) 16 ( 8,12) 17 ( 8,11) 18 ( 8,10) etc.... I came across this which is nearly right, but I am not sure how to apply it to my situation: Ulam Spiral Advice gratefully received Si
  10. Hi, I a pretty new to luabind, using 0.9 with Lua 5.1.4, on MSVC 2008. I am trying to expose a cpp class to lua. WIth very trivial examples, all is well, compiles, links and runs just fine. However, when I try to do something more complex, I get this linker error: error LNK2001: unresolved external symbol "private: static unsigned int const luabind::detail::class_id_map::local_id_base" The code that causes this is based on the ScriptedStateMachine from chapter 6 of the great Mat Buckland book. Infact the source code from the book causes the same error. Its confounded me because I can see that the static in question IS defined in luabind/src/inheritance.cpp, line 20: class_id const class_id_map::local_id_base = std::numeric_limits<class_id>::max() / 2; I can also see that this source file is built into the lib/dll, when I build luabind with bjam. I am linking to luabindd.lib. So why the unresolved external symbol? Any help would be fantastic. Thanks Simon
  11. You would be well within your rights to assume that. I had also assumed the DX redist was up to date. No! It works. Thanks for the non-existant error message :)
  12. No, I cant install the SDK on the other machine. I am trying to simulate distribution anyway. Its not just that machine that it fails on. Any machine without SDK will not be able to build the effect it seems. I am using SM2 which is very within graphical capabilities of both machines, even tho the hardware differs. Heres the effect file itself: // ORTHO float2 texel = float2(1.0f/1024.0f, 1.0f/768.0f); // Texture texture Diffuse; // Transformations float4x4 World : WORLD; sampler Sampler0 = sampler_state { texture = (Diffuse); MIPFILTER = POINT; MINFILTER = POINT; MAGFILTER = POINT; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; }; struct VS_OUTPUT { float4 Position : POSITION; float2 Tex : TEXCOORD0; }; // Move, scale and convert to screen space VS_OUTPUT VS( float4 Position : POSITION, float2 Tex : TEXCOORD0) { VS_OUTPUT OUT = (VS_OUTPUT)1; OUT.Position = mul( Position, World ); OUT.Position.x = 2.0f * OUT.Position.x - 1.0f; OUT.Position.y = -2.0f * OUT.Position.y + 1.0f; //OUT.Position.z = 0.1f OUT.Tex = Tex; return OUT; } // simple pixel shader float4 PS(VS_OUTPUT IN) : COLOR { return tex2D(Sampler0, IN.Tex);// - texel); } technique RENDER_NORMAL_TECH { pass P0 { VertexShader = compile vs_2_0 VS(); PixelShader = compile ps_2_0 PS(); CullMode = None; AlphaBlendEnable = true; SrcBlend = SrcAlpha; DestBlend = InvSrcAlpha; //ZEnable = True; //ZWriteEnable = True; //ZFunc = LessEqual; Fillmode = Solid; } }
  13. Hi, I am trying to build a c++/DX9 app in release mode. It compiles fine but when I run it, it fails at the following call: HRESULT hr = D3DXCreateEffectFromFile( ddx9->Get(), m_filename.c_str(), NULL, NULL, //D3DXSHADER_DEBUG | D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY, 0, NULL, // memory pool &m_asset, &errorMsgs ); if ( hr != S_OK ) if (errorMsgs != 0 && errorMsgs->GetBufferPointer() != 0 ) { OutputDebugString( (char *)errorMsgs->GetBufferPointer() ); m_log("debug", format("EffectDX9 failure: %s") % ((char *)errorMsgs->GetBufferPointer()) ); } It works fine in debug mode, or in release mode on a system with DirectX SDK installed. It only fails on other system which don't have the SDK installed. As yuo can see, I thought it was because I was using the D3DXSHADER_DEBUG flag, but even with no flags, it fails. Oddly, there is nothing in the errorMsgs buffer (but thats probably due to the lack of D3DXSHADER_DEBUG). Can anyone see why this might be? Thanks Simon
  14. Ah , problem was Microsoft code baulking coz the avi had no sound, without a meaningful error message. Thanks MS! :)
  15. Hello, I have an application which renders video to textures, much like the DirectShow TextureDX9 sample. On my dev PC, it works fine (once correct ffdshow codecs have been installed). Video also plays well in Windows Media Player. On a second machine, the application runs, and the log file shows the video is loaded and playing (I can query current playback position). However the video texture is transparent! The second machine has the correct codecs, and can play it in WMP without a problem! Can anyone shed any light on this? Is it a driver issue? They are the latest nvidia geforce drivers and its a clean winXP install Thanks Simon