Jump to content
  • Advertisement

666_1337

Member
  • Content Count

    491
  • Joined

  • Last visited

Community Reputation

122 Neutral

About 666_1337

  • Rank
    Member
  1. Hi everybody Please excuse me if this is the wrong forum, i just thought its more graphics theory than game art... Imagine i have a sheet of recovered paper, checkered. Then I paint an image on it with a pencil, scan it up and compress it as jpeg, so i have lots of information loss about the image, and a pattern ( the checkerboard/diamonds and the artefacts of the recovered paper ) which doesn't belong to it. Is there a way to separate the pencilpainted image from the pattern, without using artificial intelligence? Thanks in advance, Alonso Schaich
  2. Hello this hasn't anything to do with game creation, but i don't know where else i could ask. This is a part of my current 'homework' i can't solve: Given is a Quadric with Todo: Show that there exists an orhogonal Matrix and scalars with for We have used lambda_i for the eigenvalues of a Matrix, but i don't even know where to start this proof. I would appreciate your help. Thanks in advance.
  3. 666_1337

    the distance between two points (again)

    Quote: std::cout << sqrt((x2-x1)^2 + (y2-y1)^2); outch... do you know what operator ^ means? I think you don't. ^ is the EXCLUSIVE OR OPERATOR, not the power. What you want to do is x*x + y*y, or pow(x,2)+pow(y,2), not x^2+y^2.
  4. 666_1337

    Facts on figures, how many people play games on linux?

    Flightgear, Vegastrike, Simutrans, and of cause Classic Unreal Tournament
  5. 666_1337

    get working directory

    1. lookup msdn documentation for dirent 2. getcwd(), _getcwd() EDIT: 1. dirent is the way to do it in unix - but MSDN Documentation has a porting guide ( chapter 10 "UNIX scandir example" here ) ps: working with file descriptors should also work ( at least on Unix it does ). 2. getcwd() is UNIX, _getcwd() is Win32. Again, see MSDN Unix->Win32 Migration Guide ( same link but more on the top )
  6. 666_1337

    NIghtWish

    clicky
  7. 666_1337

    EM64T Notebook

    Hello I'm about to buy myself a notebook. Since my Desktop PC is relatively aged, the 64 Bit IA32 Processors have twice the register count than its 32 Bit counterparts and I think SSE3 is more interresting to me than 3DNow! I would like it to have one of intel's _new_ EM64T-Supporting Pentium 4 Processors. However, saying that noone will have more than 4 Gigabytes Memory in a Notebook during the next years Intel doesn't officialy have a EM64T-Notebook Chip... While looking around in online shops I found several notebooks with Intel Penium 4 550 Processors. Intel's Proccessor Register sais that the P4 550 is installed into a LGA775 Slot - just like the P4 650 - that has EM64T. Can I easily replace the P4 550 with a P4 650? Will there be complications because of the 64 Bit Memory Addressing Mode? or is it imposible? ( I was not able to retrieve either the notebook-mainboard's names or specs ) EDIT: of cause I would like to run the notebook in 64 Bit mode.
  8. Your main problem might be that you will require to have all the vertex data in memory if you want to get even close to RT. If you approximate an 4x4 km terrain with a rectangular grid of two triangles each meter you'll get ( even if textures are generated by the vertex shader ) at least ( considering 3D Verices with normals ) 384 Megabytes of Memory occupied only by the terrain ( Notice that you cann't allocate a Vertex Buffer Object of such a size ). ROAM would help you to decimate the amount of Vertices that need to be rendered but you still need that 384 MB Chunk on the CPU Memory ( A possibilty to reduce this would be to have ROAM (or others) approximate the highest LOD Mesh ). However these days the vertex processor units are very fast while ROAM tends to be very Cpu-intensive. I suggest you should rather use less cpu-intensive approaches like GEO-MipMapping and __disable__ bump- and detailmaps as well as anisotropic filtering or other performace intensive rasterization-time operations for the meshes which are more far away. ps: If you stand on the top of an Island and look down the framerate will be killed by the water calculations, and not by the terrain geometry - at least if you have realtime-calculated water.
  9. 666_1337

    converting std::string to integer

    Quote:Original post by Zahlman stringstream ss(input); int value; ss >> value; Considering the fact that you have to check whether you use a gcc version prior to 3.2 to include either sstream or sstream.h, i guess atoi is easier. Quote:Original post by MaulingMonkey/i] An alternative to Fruny's method, which requires the boost library: #include <boost/lexical_cast.hpp> using namespace boost; lexical_cast< int >( input ); including a single boost header will slow down compilation times about 500% in normal cases ( and some compilers get `confused` by boost template-code, resulting that they create wrong code. We had that often enough ). Quote:Original post by jake_Ghost/i] (int)input.c_str(); is that the proper way to do it? jake that will cast the location of input.c_str() into an integer. remember input.c_str() is of type `const char *` - a pointer. note that atoi(const char *nptr) is the same as strtol(nptr, (char **)NULL, 10), which gives you the possibility to define which base ( 10 for decimal ) the number in the string shall consist. atoi requires C89 support.
  10. 666_1337

    Calling functions

    I once used std::vector<boost::any> as argument to all script-usable functions, but that way i had just had the same function twice ( one for the script, the other for __C__ and to be called by the script-function. This time I'm trying to prevent to have to create each (script-useable) function twice. On x86 on linux arguments are stored in an `array` commencing on esp. I don't know if it's the same on Windows but I'm sure it's different on e.g. ia64. I guess I posed the question inpressesely. The Script Language is defined to be C ( it took me too long to write the parser to change that ), and using assembly I can call my backend-functions directly. The Question is can I call them directly WITHOUT using assembly?
  11. Hello While writing my scripting engine, I used two structures for a call. First the Variable structure defined the function's argument's type, and it's value. The other ( struct Function ) defines the function's argument count, it's arguments( if availible ) and a pointer to the C function ( It happened to get difficult to invoke member functions I determined ). I used this Code with GCC in Linux: struct Variable { enum { INT, FLOAT, STRING } type; union { int i; float f; const char *s; } value; }; struct Function { void (*function)(); int argsc; struct Variable *argsv; }; void call_a_function( struct Function *func ) { if( !func->function ) return; if( func->argsc ) { long *arguments_list = new long[func->argsc]; for( int i = 0; i < func->argsc; ++i ) switch( func->argsv.type ) { case Variable::INT: arguments_list = static_cast<long>( func->argsv.value.i ); break; case Variable::FLOAT: float *pointer = reinterpret_cast<float*>( &arguments_list ); *pointer = func->argsv.value.f; break; case Variable::STRING: arguments_list = reinterpret_cast<long>( func->argsv.value.s ); break; } asm ( "copy_start: \n\t\t" "mov (%%ecx,%%edx), %%ebx \n\t\t" "mov %%ebx, (%%esp,%%ecx) \n\t\t" "sub $4, %%ecx \n\t\t" "jge copy_start \n\t\t" "call *%%eax \n\t\t" : :"c"( 4*(func->argsc-1) ), "a" ( func->function ), "d"( arguments_list ) ); delete [] arguments_list; } else func->function(); } Now where I'm trying to port all my stuff to Windows/{MSVCPP/IntelC}, I'm wondering if that can be done in C/C++ ( I guess that code won't even run in 64 bit mode of ia32_64 ). I know there is boost::function and other template function `libraries` but none of those seemed able to call functions with different types and count of arguments.
  12. Hi, I know the program's location is passed to the program in arg_v[0] ( `int main( int arg_c, char **arg_v )` ) if I use unix or MSDOS, and it can be obtained with the `GetCommandLine`-function if using Win32. With these I can search the programs location string reversely for the first '/' or '\\' and truncate it there to get the application path. But: If I launch the program by launching a link to it, the link's location is passed as arg_v[0] ( haven't taken a look onto that behaviour in windows yet, but I suppose it's the same ) - what is not desired, since i use the application's path as `root` to other files I require. So my question is: How do I obtain the app's REAL directory in windows / unix? Thanks in advance, Alonso
  13. 666_1337

    Copying the debth buffer

    Quote:Original post by duckbob How would one copy the debth buffer into a color channel? If the d-buffer is 24bit does it need to be manully convereted to 8bit? Thanks Easy. Render to texture. Or render to PBuffer. Second ones can be created with floating point colour-buffers.
  14. Hi, I'm sure I'm not the only one who has got problems antialialing triangles with GL_POLYGON_SMOOTH. I heard people saying it can be solved by correctly setting up the triangles' edge flags, but that doesn't affect anything for me. this is how it looks like ( POLYGON_SMOOTH_HINT is NICEST for both - edgeflags are correct ): Anyone knows how i can fix this ( If I render things in far to near order is still see triangles that should be occluded )? thanks in advance. Alonso
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!