Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Zoomby

  • Rank
  1. Hi, when my Windows XP starts, I have very heavy harddisk access, more than necessary in my opinion. Lookup at Filenmon reveals that windows is reading several files I recently used (not only essential DLLs) So it seems to belong to that prefetch mechanism in some way!? But my "C:\WINDOWS\Prefetch" is empty (yes, no hidden files also). Can I stop windows preloading these files or analyse why they are loaded? Bye Chris
  2. Thanks Steve. Has anyone an answer to my first question?
  3. Hi, WINAPI: what is the difference between these two synchronization methods? Is there any in what it is doing? Is there a difference in how it is behaving under the hood? And I wonder: Is a critical section simply implemented with a mutex? ma = CreateMutex(NULL,FALSE,TEXT("M1")); WaitForSingleObject(ma,INFINITE); ... ReleaseMutex(ma); ea = CreateEvent(NULL,FALSE,TRUE,TEXT("E1")); WaitForSingleObject(ea,INFINITE); ... SetEvent(ea); Bye, Zoomby
  4. Hi, there are many people who claim that memory got by GlobalAlloc can be shared between different processes. Other people say that GlobalAlloc is a vestige from win16 days, and it just calls HeapAlloc today (didn't check that myself). But then it would be all in the process's private virtual address space... What's the truth? And how does the Clipboard (SetClipboardData) for example share data between processes if the GlobalAlloc handle which it can get doesn't do it? Bye Zoomby
  5. Zoomby

    Generating bitmap fonts

    Hi MasterWorks, your right. I didn't think about kerning. I guess I'll not implement these advanced techniques. At least not in the first step. Technically, I think it's possibly. You can, for example, receive the kerning pairs with "GetKerningPairs", as strtok noted Bye Zoomby
  6. Zoomby

    Generating bitmap fonts

    Quote: I am curious how you plan to tackle the spacing and alignment issues of converting a font to a bitmapped texture; I've done it by hand many times and it isn't particularly easy! You can measure the width of each character automatically but in practice the results usually require tweaking beyond that. For instance, the letters 'b' and 'd' should both be centered about the 'o' part without regard to their 'stems'. I'd be interested if anybody knows how to solve these kinds of problems "on the fly". Hi, I don't understand exactly what you mean. Aren't these characters "centered" if you draw them with GDI's DrawText? To get the width I use GetCharABCWidths. Are there difficulties which I didn't notice yet?
  7. Zoomby

    Generating bitmap fonts

    Thanks Steve! >>to alpha modulate the source texture Can you give me a hint how to set the texture stages to achive this? But I think I'll also have to read the texture-topic in the DX documentation myself...
  8. Hi, I'm trying to generate anti-aliased bitmap fonts "on the fly". The problem is GDI doesn't support the alpha channel. Is there an easy way to generate those fonts into an alpha-channel texture without a "hand-conversion" phase? (i.e. create alpha-values from gray pixels...) How did you solve it? Bye Zoomby
  9. Thanks for enlighten me Jerax :-)
  10. Thanks Cranky, what d3dx functions do you mean? >>which is basically software vertex processing done by you at that point... I always thought the hardware could do the processing. If I understood correctly ProcessVertices also does software vertex processing. I wonder, Is there a way to transform a set of vertices in a vertex buffer by hardware? (Without rendering it)
  11. 1000 times, since I like to transform these quads. I know, I could batch the vertices etc. ,but imagine there would be no other way than transformation. Then I had to call it 1000 times. Do I?
  12. Hi, sorry for this, but is it ok that 1000 transformed quads rendered with DrawIndexedPrimitive eat 10% CPU power in an windowed app? My hardware isn't to old and i'm using D3DDEVTYPE_HAL. Am I making a dumb mistake somewhere or are my expectations to high? Bye Zoomby
  13. Zoomby

    SSE slower?

    Thanks for the tips! I created a new example, where SSE is more than 4 times faster finally. void testSSE() { int size = 4000000; float* source = (float*) _aligned_malloc(sizeof(float) * size, 16); float* dest = (float*) _aligned_malloc(sizeof(float) * size, 16); __m128 a,b,c; for (int i=0;i<size;i++) { source = 4.0f; } START; b = _mm_set1_ps(0.5f); for (int i=0;i<size/4;i+=4) { a = _mm_load_ps(source+i); a = _mm_mul_ps(a,a); a = _mm_add_ps(a,b); _mm_store_ps(dest+i,a); } STOP; START; for (int i=0;i<size;i++) { dest = source * source; dest += 0.5f; } STOP; }
  14. Hi, I'm playing around with the SSE intrinsics. But the SSE code runs 10 times slower than the non SSE code. What am I doing wrong? Missing compiler switch? I use the Microsoft Visual C++ Toolkit 2003 compiler (switch /Oi used) The processor is an Intel Pentium M which should support SSE. //START, STOP is for time measurement void testSSE() { __declspec(align(16)) float v1[4]; __declspec(align(16)) float v2[4]; __m128 a,b,c; v1[0] = 0.5f; v1[1] = 0.7f; v1[2] = 0.2f; v2[0] = 1.0f; v2[1] = 1.0f; v2[2] = 1.0f; START; a = _mm_load_ps(v1); b = _mm_load_ps(v2); for (int i=0;i<10000;i++) { a = _mm_add_ps(a,b); } _mm_store_ps(v1,a); STOP; cout<<v1[0]<<" "<<v1[1]<<" "<<v1[2]<<endl; v1[0] = 0.5f; v1[1] = 0.7f; v1[2] = 0.2f; v2[0] = 1.0f; v2[1] = 1.0f; v2[2] = 1.0f; START; for (int i=0;i<10000;i++) { v1[0] = v1[0] + v2[0]; v1[1] = v1[1] + v2[1]; v1[2] = v1[2] + v2[2]; } STOP; cout<<v1[0]<<" "<<v1[1]<<" "<<v1[2]<<endl; }
  15. Thanks for your answer zedz, I think the bottleneck really was my loop calling glDrawArrays etc. 1000 times with small objects. If I create one huge VBO with 20000! cubes the performance is OK. So I really need to reduce my rendering calls... Is it wise to use glMultiDrawArrays and VBOs to supply a list of objects which should be rendered? This list can then be updated every now and then to exclude or include objects which should be hidden/visible...
  • 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!