• Advertisement

Canglong

Member
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

111 Neutral

About Canglong

  • Rank
    Newbie
  1. 2D background sub-pixel movement

    Yeah that sounds right, but It's not noticeable at all, at least not to me. It looks exactly like one large quad with one texture.
  2. 2D background sub-pixel movement

    MJP: I also tried your method with border filtering but I still got lines at the quadborders, thanks for the reply though
  3. 2D background sub-pixel movement

    eppo: You were right, I set the samplerstates to clamp and know it works, thank you very much! I didn't express the problem clearly enough, it was not just a problem with slow movement, I just needed to be able to place the quads between pixels (not pixelperfect) and achieve exactly what MJP described but clamp did the trick. hedgehog: What I wanted here was not pixelperfect quads since then the scrolling would be less smooth.
  4. Hello, I'm currently making a 2d platformer with direct3d 9 and I have a method to create large backgrounds where I load large images as a surface in system memory and then create smaller 256x256 textures from the image and then create a grid of quads and each is set to the corresponding texture. This works very well, but I want to be able to parallax scroll these backgrounds at different speeds relating to the players movement and sometimes that means moving very slow, less than a pixel per frame for example. The problem is, that leads to filtering and this will create ugly lines in the border between the textured quads. So I have to place the quadgrid pixel-perfect. Does anyone know of a good way to display large images in their native size and use them with subpixel scolling? The images I'm using are too large too load as a single texture.
  5. Thanks for the reply. I'm not that experienced with Direct3D and graphics programming yet, so perhaps this topic is a bit too advanced for me. I'm afraid i don't know what a vector4 is, I've only been using vector3s. I haven't started working with shaders yet. I only know of setting the vertex uv coordinates before creating the vertex buffer, is that what you mean, when you say shader? Anyway, I tried texturing with the dds file and it seemed to work fine, but you mentioned these atlases were inefficient, do have any tips for a better atlas creation tool or some guide on how to write your own?
  6. I'm making a 2D- game in Direct3D 9 using quads with ortographic projection. I want to make a large texture atlas containing several smaller textures for drawing large background objects. That would reduce draw calls and calls to setTexture. I downloaded nvidias atlas creation tool, it creates texture atlases as .tai files. But how do use these files in Direct3D? I can't find any information in the nvidia documentation. Can I create a texture from the .tai file? Do I have to convert them to an image format such as PNG?
  7. Visual c++ Directx problem

    I didn't use the debugger. I chose "start without debugging". And when I use the debugger it's the same result. Pressing enter, Shift-F5 or escape doesn't help. All I can do is restart the computer. When I choose debug, the dialogue window shows up like i t should and I get these messages: [font="Consolas"][size="1"][font="Consolas"][size="1"]'Gengine.exe': Loaded 'C:\Users\Lars\Desktop\Gengine\Debug\Gengine.exe', Symbols loaded. 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\D3DX10d_43.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\D3dx9d_43.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16661_none_ebfb56996c72aefc\comctl32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded. 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded. 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\guard32.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\fltLib.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file 'Gengine.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file [size="2"]However, I get the same messages when debugging the old project so they can't be the problem. And when I go into fullscreen mode in the new project the screen goes black, and I can only restart the computer to get out, so there is no way for me to see any debug messages. Since the two projects are identical in settings, files and code my only guess is that the problem lies in how visual c++ organizes the projects. I'm new to visual c++ and have a bit of experience with c++. Could it be that two projects with identical functions/functionnames are somehow interfering with each other?[/size] [/size][/font][/size][/font]
  8. Hello. I'm currently learning Direct3d 9 and have a project in visual c++ 2010 express edition. The program first shows a config dialogue and then jump into fullscreen mode and display some polygons. Then I started a new project with the same settings and copied the source and header files to the new project. Basically I want to have several versions where I can experiment with different stuff. The problem is that the second version crashes when the program goes into fullscreen mode and starts rendering. And I don't know why. It compiles and when it runs, the config dialogue opens just like normal, but In fullscreen mode the screen just goes black, and there is no way to end the program, all I can do is to restart the computer. The old project still works perfectly but the new one allways crashes. The files and settings are the same. Anyone have a clue? edit: Apparently, the second project works in windowed mode but not in fullscreen.
  • Advertisement