Jump to content
  • Advertisement

Fourty_Two

Member
  • Content Count

    148
  • Joined

  • Last visited

Community Reputation

145 Neutral

About Fourty_Two

  • Rank
    Member
  1. Fourty_Two

    Taskbar Buttons - Hiding

    Thanks for the responces. I've tried several programs that "Minimize" to tray, but they really just remove the application from the taskbar and place it in the systray. These application don't show up on ALT+TAB after that. For the comment about the C# "ShowInTaskbar" property, would it be possible in C# to run a scan of all open windows and set the property to false for the ones you wanted removed? I'm not very familiar with C#, but I assume it has access to all the API calls that C++ does. Thanks
  2. I know its possible to get a handle to the taskbar and hide it with ShowWindow(), but is it possible to remove individual window buttons from the task bar? The reason I ask is there are certain applications that I have open ALL the time (Outlook, bash console, etc) and I don't need them or want them taking up taskbar space. I would still like them to show up on ALT+TAB if possible. If someone could point me in the right direction, or if you know of an application that can do this, I'd greatly appreciate it.
  3. Fourty_Two

    Quick Lua noob question

    void KeyDown(unsigned char key) { lua_getglobal(pLuaState,"KeyDown"); if(key==DIK_LEFT) { lua_pushstring(pLuaState,"left"); } else if(key==DIK_RIGHT) { lua_pushstring(pLuaState,"right"); } else lua_pushnil(pLuaState); if(lua_pcall(pLuaState,1,0,0)) { OutputDebugString(lua_tostring(pLuaState,-1)); OutputDebugString("\n"); } } lua_pcall fails and the debug code prints out "attempt to call a nil value" How would I go about tracking down what causes this? Thanks
  4. When you create an interpolator with the Enginuity class, you give it a reference to a float. If that float is in a class and the class is deleted, what happens to the reference? Won't it point to the same location in memory (now invalid) and keep modifiying it?
  5. Fourty_Two

    Motion Blur

    Since I seem to be talking to myself (I do that alot) I guess no one cares or no one knows. I'm going to go with the latter because I'm an optimist. In that case, here's how I did it for all you people who don't know how its done. This is a little simplified, but not much for(int alpha=0; alpha < TAIL_LENGTH; ++alpha) { //ALPHAARG1 = TEXTURE ALPHA pDevice->SetTextureStageState(0,D3DTSS_ALPHAARG1,D3DTA_TEXTURE); //set D3DTA_TFACTOR with D3DRS_TEXTUREFACTOR pDevice->SetRenderState(D3DRS_TEXTUREFACTOR,alpha*((0xFF000000)/TAIL_LENGTH)); //ALPHAARG2 = modifier pDevice->SetTexturesStageState(0,D3DTSS_ALPHAARG2,D3DTA_TFACTOR); //Multiply ALPHAARG1 by ALPHAARG2 pDevice->SetTextureStageState(0,D3DTSS_ALPHAOP,D3DTOP_MODULATE); pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,2); }
  6. Fourty_Two

    Motion Blur

    It works, sort of. I'm rendering a textured quad sprite with transparency. When I do the above code, the trailing images are rendered with a decreasing alpha value like I want, except that the whole image is showing (ie I have a white semitransparent square). What do I need to do to make it use the original alpha value if it is equal to 255 and apply the new alpha value otherwise? edit: I guess at this point its more of a neat trail/tail than motion blur, but I like the effect ;)
  7. Fourty_Two

    Motion Blur

    For the second method (which seems the most promissing for me) by setting a constant value, are you suggesting something like this? pDirect3DDevice->SetRenderState(D3DRS_TEXTUREFACTOR, alphavalue); pDirect3DDevice->SetTextureStageState(0,D3DTSS_ALPHAARG1,D3DTA_TFACTOR); I'm still learning what all the different stages do, so that might be wrong. I'm going to code it anyway though ;)
  8. Fourty_Two

    Motion Blur

    I get the whole idea of how it works, rendering the same image multiple times per frame decreasing transparency, but I'm not quite sure how to implement it. How do you change the transparency of an image on the fly? I don't think running through the memory of the image adjusting the alpha values is the best way to go. Can you use multiple texture stages to this? Thanks
  9. Fourty_Two

    using statics

    You have to give inited a "presence". In the .h or .cpp file add the line: SpecialArray::inited=0; or something to that effect.
  10. I'm trying to create a log system that can output to any stream source; files, console, com ports, sockets, or whatever else the user wants. For the first three its no big deal, they can all be accessed using handles, but I don't know about sockets. Is there anyway to make the socket act just like a file handle and send raw text using ReadFile and WriteFile? MSDN had it in there, just hidden. Like always.
  11. So I have a Sprite class. And in this sprite class there is an IDirect3DTexture8 pointer and a IDirect3DVertexBuffer8 pointer. To create these objects I need access to the IDirect3DDevice in some fassion. Passing a copy of the Device pointer to every Sprite instance seems like a bad way to manage this, and I was curious if there are any better ways to organize the code. Maybe pass a pointer to an already created vertex buffer and texture as constructor parameters? But the sprite also needs access to the device to SetTransforms and to render itself and the like. Any references, links, books, etc would be helpful. Thanks
  12. Fourty_Two

    Passing CComPtr as parameter

    I understand what you're saying about passing to the device, but I haven't had much experience with large, multiclass projects. Are there any good references on how to manage and organize that method?
  13. Are there any rules to follow when passing CComPtr's as parameters? If you pass by value you get a copy that is released at the end of the function (more overhead), and if I pass by reference the debug reports unreleased memory from my IDirect3DDevice8 object (which gets passed around a lot for rendering and what not.) Should my internal classes (Sprites, textured quads) just maintain a normal pointer to the device? Thanks
  14. I had a similar problem when I wrote my own smart pointer. My problem came about, if you have a function that returns a pointer, the CComPtr adds a reference that it isn't needed. CComPtr<IDirect3D8> pD3D = Direct3DCreate8(D3D_SDK_VERSION); After that line of code, pD3D has a ref count of 2, but should only have a count of one. I had to add an attach method that obtained ownership without adding a ref. pD3D.attach(Direct3DCreate8(D3D_SDK_VERSION)); Maybe that will be helpful.
  15. Fourty_Two

    COM smart pointer question

    Actually, nmi, that won't work now that I think about it. There isn't any difference between the internals of the copy constuctor and the assignment.
  • 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!