• Content count

  • Joined

  • Last visited

Community Reputation

170 Neutral

About hoLogramm

  • Rank
  1. Per-Pixel Lighting Question

    The normal has to be mutliplied with the inverse transpose of your world matrix and where do you calculate light.dir? Also you want to consider converting the light's and camera's position to the models object space so you don't have to calculate the world's vertex and normal. This can save you quite a bit of processing.
  2. saving the private colorbuffer

    You can by using glReadPixels with Pixel buffer objects, but the better approach would be to use render to texture with frame buffer objects. OpenGL Frame Buffer Object 101 and OpenGL Frame Buffer Object 201 by Rob 'phantom' Jones h.
  3. Depth Map

    Just a shot in the dark because i have not used depth maps just yet, but that would somehow make sense. Like when rendering with hdr, you tone map the hdr image to ldr by using a logarithmic function and maybe this happens here too. How do you examine the depth values? Do you use your PIX output and examine the color? If so, cout your values directly after you get the depth texture. Those values should be in linear space from [0...8bit]. And if you are not restricted, use floating point formats for depth maps. Input from a more experienced person would be great of how depth values are really calculated (linear vs. logarithmic space) and if the logarithmic nature comes into play because of conversions. *EDIT: You are right about the precision error, because you get z-fighting pretty soon when zooming further away with two objects close to another. [Edited by - hoLogramm on September 5, 2008 1:21:24 AM]
  4. Depth Map

    I think those values are reasonable. The precision of a depth map is distributed between the near and the far plane. In order to get a viewable image the depths have to be downscaled from the range [0...depth precision] to [0...1]. Now using a far plane with a high value, your object is in comparison very close to the near plane and that is why your object looks darker after downscaling. Using low values for the far plane, your object is nearer to the far plane, than to your near plane and so the downscaled depth values are more distributed at the white end of the range (nearer to 1). h.
  5. Junior Programmer - Expectations

    A few months ago i applied for a junior programmer position whith pretty much the same requirements and i filled out their questionnaire, which was more or less about design decisions, rather knowledge about a programming language. E.g. list suitable ai's for a racing game, develop a project time and roadmap of the development of a first person shooter running on pc and consoles, path finding algorithms if i had 1 day, 1 week, 1 month to implement them and and issues one would have if a game was developed cross platform and the biggest challenges the games industry has to face in the next years and so on. I would have thought i applied for a senior programmer with all those design decisions and not for an entry level position in game programming. So expect the unexpected. h.
  6. Please Critique this class and code

    Maybe you want to encapsulate your enums and the typedef vector in your resource class too, because those are only essential to this specific class. I would also use a global namespace for your project, so the Resources namespace does not clash with something else. As my previouse poster stated the "_"-Parameters are better avoided. Instead you could use something like "InType, InState, InEntries" or the like. h.
  7. Lesson6 help needed, using GLUT

    Would be nice if you could post the link to this lesson. Quote: sz = (((3*refimg->w+3)>>2)<<2)*refimg->h; This codes modifies the reference images width by scaling and offseting and then it truncates least significant bits. I think it calculates the size of an rgb image in some weird way. Why the truncation is necessary i would have to play around with it a little bit. Quote:fsize == (long)sz; is so important? I get error if it isn't... sz is the size of the image and as long as fsize (file size for writing the image?) is greater than the image size, everything is fine. Otherwise you get segmentation faults because of array out of bounds indexing. h.
  8. Linking problems *SOLVED*

    Quote:@hoLogramm: ah, that's another thing i don't know about [embarrass]. I have my game project set as "debug" and use "Multi-threaded Debug DLL (/MDd)". I compiled the XML lib as "release" (since the author says it's a lot faster in release mode) and "Multi-threaded (/MT)". That was already set in the VS project that came with the library code i downloaded. It also has "Function-Level Linking" set (i don't know what that is either). I set the XML project to "Multi-threaded DLL" but it still didn't work. Can i use non-debug runtime with the XML library and use it with my project in "debug" mode? Yes, you can mix debug and release versions. Libraries compiled in release mode only means, that they don't contain any debug symbols. The problem i see is that you compiled with multi-threaded and multi-threaded dll. Change both to multi-threaded (debug or release) and that should fix your problem. Quote: Honestly, i have no idea why i get errors like that. I don't know what LIBCMT.lib is, probably some sort of C runtime library. I also need to exclude MSVCRT.lib from linking and i don't know why i have to do that either. But that's not really a worry to me, i just include/exclude whatever libraries are needed for the project. libcmt.lib ... static link library for c++ (release) libcmtd.lib .. same only for debug msvcrt.lib ... dynamic link library for c++ (release) msvcrtd.lib ... same only for debug libc.lib, libcd.lib ... c libraries find out more here Because those are standard libraries which get included automatically, you have to ignore all versions that don't match your build environment, since they define the same function set. e.g. I ignore these libraries, when building my project in static debug mode: libcmt.lib msvcrt.lib msvcrtd.lib libc.lib libcd.lib and in static release mode: libcmtd.lib msvcrt.lib msvcrtd.lib lic.lib libcd.lib h.
  9. Linking problems *SOLVED*

    sorry for double post.. see below
  10. Quote:Original post by Softnux You're both right, sorry! haven't slept for some 24 hours now ^^ glVertex3f( 16 * x, 16 * y, 0); glVertex3f( 16 * x, (16 *y) +16, 0); glVertex3f( (16 *x) + 16, (16 *y) + 16, 0); glVertex3f( (16 *x) + 16, 16 * y, 0); Fixed it up to ~300-400 fps in GL_FILLED. Thanks alot! Surprisingly fast answers compared to other forums =) Anyway, what framdrop should i expect if i use textures on all? Depends how many texture switches you have to introduce when rendering, but when you batch your quads with the same textures together, it would only make a very slight impact on it.
  11. Maybe implement a static list of open files in your fileopener class and use mutex lock on it. I am not very familiar with multithreading and if it would work properly. *EDIT* Sorry i just saw, that you are talking about executables rather than classes, so forget the above mentioned. h.
  12. Quote:Original post by Softnux Quote:Original post by hoLogramm Rendering primitives in wireframe mode always decreases performance by a lot. How is rendering performance with GL_FILL? If displaylists don't help improving performance, nothing will. I would say you have no hardware support (MESA drivers), running a profiler with an altered opengl32.dll in background or just a very crappy graphics card. h. GL_FILL is way slower. And since i can play World of Warcraft without any problems and VENDOR returns "Intel Inc" i assume that my card is sufficient and working. I should at least be able to draw a map like those in Graal Online with a decent fps. If GL_FILL is slower, than you have definitely a problem with overdraw and grekster is right. You are drawing every quad on top of each other. You would alter your code to something like this: glBegin( GL_QUADS); for(int y = 0; y < 100; y++) { for(int x = 0; x < 100; x++) { glPushMatrix(); glTranslatef(x*16, y*16, 0); glVertex3f( 0, 0, 0); glVertex3f( 16, 0, 0); glVertex3f( 16, 16, 0); glVertex3f( 0, 16, 0); glPopMatrix(); } } glEnd();
  13. Rendering primitives in wireframe mode always decreases performance by a lot. How is rendering performance with GL_FILL? If displaylists don't help improving performance, nothing will. I would say you have no hardware support (MESA drivers), running a profiler with an altered opengl32.dll in background or just a very crappy graphics card. h.
  14. Linking problems *SOLVED*

    Did you check if you build the xml library with the same runtime library option as your project? (Project Configuration -> C/C++ -> Code Generation ... Multi-threaded Debug (/MTd), ...) h.
  15. Go to Codesampler.com They have a tutorial on color key transparency. L.