Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

181 Neutral

About conman

  • Rank
  1. hi, I am not quite sure about the sense of your generic_obj... It seems that you want to have a memory aligned list of objects (in your case integers). Why don't you just use std::vector<int>? Or am I not seeing the problem..? :) Constantin
  2. conman

    Create triangle shadow

    For the stencil technique to work the shadow volume doesn't have to be build by quads! It can be build by triangles and every polygon you like...
  3. conman

    OpenGL optimizations

    Quote:i never heard of scene graphs (gonna google it) so some links would be nice A scene graph isn't an optimization (actually it creates additional overhead), but it is a way to organize all objects in your scene. Basically it is a tree where every node has it's own local transformation matrix and it's global transformation depends on this local matrix multiplied with the global transformation of it's parent. Quote:and ive never tuched shaders so i would like som more information about that too It is a way to create pixel and vertex effects faster by rendering them on the GPU insted on the CPU. But I guess you don't have any fancy vertex or pixel effects you are now computing on your CPU... Cheers, Constantin
  4. Thanks Paulius, but are you sure? I get a WARNING LNK4098: defaultlib 'LIBC' conflicts with use of other libs; use /NODEFAULTLIB:library and I thought that's because when I link the dependent DLL I reference the .lib of the independent DLL and that's where the linker sees the different CRTs... Am I wrong here?
  5. Quote:For most applications, it is often very useful to provide mechanisms that allow the users to undo an operation or to recover from a state that violates constraints specified by the application. The standard method is to store the previous states via cloning a copy of all changed objects. But this is often infeasible since the overhead of storing these clones would be too much. An alternative is to create only partial clone, storing only the attributes that are required for the undo operation. The concept is very simple, but is problematic since the attributes usually have restricted access due to encapsulation. To get around this, the idea is to have the class itself provide a helper object with the important data, a memento. When given back a memento, the class can then reset its state according the information contained within the memento found on http://pages.cpsc.ucalgary.ca/~kristen/memento.shtml cheers, constantin
  6. Hi folks, on a windows system: does anyone know if it is a problem to use different runtimes (for example 'Multithread DLL Debug' and 'Multithread DLL') in different DLLs if this DLLs later should work together? I guess I'll get a linker warning because of the conflicting libraries, when I link the dependent DLL. I can ignore this warning, but I am not sure if that's an bad idea... Any ideas? Thanks, Constantin
  7. conman

    Sky scattering in HLSL

    I guess you take a paper covering sky scattering and implement that in HLSL. If you're not sure how to do it, do a general HLSL tutorial. What I mean is, you woun't need an actual HLSL documentation about scattering. But there is a paper covering sky scattering with HLSL code included: www2.imm.dtu.dk/pubdb/views/edoc_download.php/2554/pdf/imm2554.pdf Constantin
  8. Hi clouds, what makes you think it's ROAM? Constantin
  9. Hmm, I found this explanation. It seems to be a problem to do it at all... :(
  10. Hi, I try to pass a member-function of a C++ class to a Win32-API function. struct HookData { ... LRESULT HookCallback(int code, WPARAM wparam, LPARAM lparam); }; LRESULT HookData::HookCallback(int code, WPARAM wparam, LPARAM lparam) { ... } // later in the source: HookData *pHook = new HookData(); SetWindowsHookEx(hookID, pHook->HookCallback, g_AppInstance, threadID); in the last line this compiler error occurres: error C2664: 'SetWindowsHookExA' : cannot convert parameter 2 from 'LRESULT (int,WPARAM,LPARAM)' to 'HOOKPROC' now HOOKPROC is defined as: typedef LRESULT(*HOOKPROC)(int, WPARAM, LPARAM); So I am not sure what happend: Is it maybe a problem to provide a member-function to that API-function? Or do I need a prefix like CALLBACK/__stdcall or something like that? thanks, Constantin
  11. conman

    Place for professional raytracer

    Also, many of the algorithms are protected by patent law.
  12. Hi, I'd like to process another php file from a php script. My first solution goes like this: $cmd = "C:\\...\\apachefriends\\xampp\\php\\php.exe -f test.php"; exec($cmd, $out); for ($i=0; $i<count($out); $i++) echo $out[$i]; But I have some problems with this solution: I need to know where the php.exe is located on the server. Is there some kind of global variable containing this path? When the exec() command is executed a terminal popps open and closes again. Because I have a apache-server on my system I'd like to know if the window will be seen at the server side or at the client side? Is this a good/elegant solution at all? because the exec() command will be called every time a user navigates on my site. So every time a window will popp open on the server/client side! Is ther a better way to do this?? Thanks in advance!! Constantin
  13. Regarding your 2nd question: Recently I had a similar problem: my solution was like this: [StructLayout(LayoutKind.Sequential)] public struct BSPTexture { [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public char[] Name; public int Flags; public int Contents; } //here the code to load data into it: textures = (BSPTexture) ReadRawData( binaryReader, textures.GetType() ); //which uses this function: private static object ReadRawData( BinaryReader binaryReader, Type type ) { int rawsize = Marshal.SizeOf( type ); byte[] rawdata = binaryReader.ReadBytes( Marshal.SizeOf( type )); if( rawsize > rawdata.Length ) return null; // allocate unmanaged memory IntPtr buffer = Marshal.AllocHGlobal( rawsize ); // copy the data into the allocated unmanaged memory Marshal.Copy( rawdata, 0, buffer, rawsize ); // create pointer to the memory object obj = Marshal.PtrToStructure( buffer, type ); // free unmanged memory Marshal.FreeHGlobal( buffer ); return obj; } Hope it helps! Constantin
  14. conman

    [web] money per click

    Mhh, probably you're right...
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!