Can StretchRect be used with DF24 or INTZ surfaces? Can DF24 or INTZ be multisampled? - direct3d

Can you StretchRect from a DF24 into another DF24 (ATI specific)?
Can you StretchRect from a INTZ into another INTZ (nVidia specific)?
Can you create DF24 or INTZ as multisampled surfaces?

It seems it cannot be multisampled:
Sources:
http://discussms.hosting.lsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind0801D&L=DIRECTXDEV&P=10986
i'm using RAWZ
now i'v ran my app on laptop witch winXP and 8600go ... and all seems to
be fine
forceware version is that same for vista desktop and my laptop (differs by
operating system ofcouse)
strange ...
The other thing that warps my mind is that the solution works only witch
nonmultisampled depth buffers witch suxx.
http://forum.beyond3d.com/showthread.php?t=53918
But, there is a huge problem -> MultiSampling does NOT work !
I need to turn off MultiSampling to bind the 'depthStencil_Surface' with my 'renderTarget'
If multisampling is not possible, I am not that much interested in StretchRect-ing it anyway. I wanted to use StretchRect to Resolve multisampled data.

Related

Node-Webkit read MP3 files

I use the audio class to read MP3 file thanks to a little trick : replacing the ffmpegsumo.so of Node-Webkit with the chromium one. This enable the reading of MP3 on Windows but doesn't works on Mac OS. Does anyone know why ?
Here's the code :
player = new Audio()
player.src = '/path/to/the/audio.mp3';
player.play();
This seems to be dependant upon the dll/so being a 32 bit version. I am guessing that is why copying the file from Chrome doesn't work correctly for most people ( my 3 year old phone is the only 32-bit device I have left ).
I keep seeing this link --
https://github.com/rogerwang/node-webkit/wiki/Support-mp3-and-h264-in-video-and-audio-tag
.. but it is a blank page. I am guessing it was deleted since the info was likely not current or correct.
This issue thread has links to some rebuilt ffmpegsumo libraries for both Mac and Windows --
https://github.com/rogerwang/node-webkit/issues/1423
The alternative appears to be rebuilding ffmpegsumo, this thread has some config for doing that -- https://github.com/rogerwang/node-webkit/issues/1208
I am still confused about the licensing on it after you build the library, so that is probably worth some research. Everything about mpeg4-part10 is copyrighted and heavily patent encumbered. I think we all need to get smart enough to stop using mp4/h.264. Before I got this working correctly on node-webkit, it was easier to use ffmpeg to transcode the video to an ogv container using Theora and Vorbis codecs. At this point it seems like iOS is keeping h.264 alive, when it should probably die the horrible death it has earned.

Perl: libapt-pkg-perl AptPkg::Cache->new strange behaviour under precise

I have a very strange problem with the constructor of AptPkg::Cache object in the precise package of libapt-pkg-perl (v. 0.1.25).
The perl script is designed to download a debian package for three different architectures (i386, armel, armhf). For each architecture I do the following:
Configure AptPkg::Config '$_config' with the right parameters and package-lists for the desired architecture.
Create the cache object with AptPkg::Cache->new .
Call the method AptPkg::Cache->policy to create the AptPkg::Policy object.
Call the method AptPkg::Policy->candidate("program-name") .
Download the package for the selected architecture.
This works very well with Ubuntu Lucid, but with Ubuntu Precise I can only download the package for the first architecture defined. For the other two architectures there will be no installation candidate (method AptPkg::Policy->candidate("Package-Name") doesn't return an object).
I tried to build a workaround and I found one solution how the script works for all three architectures, without problems, in precise:
If I create the cache object (with AptPkg::Cache->new) twice in a row it works and the script downloads the debian package for all three architectures:
my $cache = AptPkg::Cache->new;
$cache = AptPkg::Cache->new;
I'm sure that the problem has something to do with the method AptPkg::Cache->new because I checked everything else, what could cause the problem, twice. All config-variables are set correctly and I even get a different Hash for AptPkg::Cache->new for each architecture, but it seems that I am overlooking something important.
I'm not very familiar with perl, so I am asking you guys if someone can explain why the script works with the workaround but not without it. Further it looks quite strange if you have the same line of code twice in your script.
Maybe you hit this bug - https://bugs.launchpad.net/ubuntu/+source/libapt-pkg-perl/+bug/994509
There is a script there to test if you're affected. If it's something else consider submitting a bug report.
edit: Just saw this is 11 months old :/

Directx11 SDK June(2010) Initialization on VC++ 2010

I hope I'm posting on the right forum for this!
Recently I have started programming with the Directx 11 June (2010) SDK on VC++ 2010, on a Dell LapTop with a NVidia GeForce GT 630M GPU and a Intel HD 4000 chip.
One of the things you do, is to try and enumerate available adapters and outputs, and so on. Here's an example:
IDXGIFactory1 *factory;
CreateDXGIFactory1(__uuidof(IDXGIFactory1), (LPVOID *)&factory);
IDXGIAdapter *adapter;
factory->EnumAdapters(0, &adapter);
DXGI_ADAPTER_DESC desc;
adapter->GetDesc(&desc);
When I run this, the desc structure contains the information for my Intel HD chip, and NOT the information for my GPU!
Now, when I open my NVidia control panel, and select the GPU as the preferred processor, and re-run the sample, I get the info for my GPU in desc - which is right! And also, when I then try to enumerate outputs for this adapter, I find that there is at least one.
My question is: Is there a way to accomplish this programmatically, like in the DirectX 11 SDK, so that I don't have to set the setting in my NVidia control panel?
I went through the SDK code (for EmptyProject11), and somehow they "grab" the GPU instead of the Intel chip. I commented out all the code in the WinMain function, and inserted the above code, and it still grabbed the GPU! Is it something to do with the Project Setup, environment variables, command line arguments, or....? I mean how do they do it!?!?!?
I would appreciate any insight into this matter.
Thanks
You can run through all of the adapters presents and get information on them by looping through all possible adapters using the same function that you're already using:
HRESULT r = S_OK;
unsigned int adapterindex = 0;
std::unique_ptr<IDXGIAdapter, ReleaseDirectX> dxgiadapter = null;
// Save the result of EnumAdapters to r, and then check if it's S_OK
while ( ( r = factory->EnumAdapters( adapterindex, &dxgiadapter ) ) == S_OK ) {
++adapterindex;
/* Work with your adapter here, particularly DXGI_ADAPTER_DESC */
}
Usually, you will have to choose the default one automatically or enumerate all of them and in some kind of settings panel let the user choose. The other way to do it is use the Adapter Description which has the most video memory. It's not a foolproof heuristic, but it's one I use to get the "best" (used liberally) video card for the system. More often than not, however, the default is the default for a reason.
Good luck!

audio error in vmware running mac os x

simple synchronous loading of an audio file (.mp3) in a cocos2d app makes my vmware disconnect the sound.
the error is display bottom right, saying 'error in creating sound stream; sound is disconnected'
i read that it might be cause of my vmware's version (mine is 8) but I'm looking for a fix, not to downgrade to another version.
before i get that error, the sound on the system works just fine (youtube, etc)
the exact code im calling is..
[CDSoundEngine setMixerSampleRate: CD_SAMPLE_RATE_MID];
[[CDAudioManager sharedManager] setResignBehavior: kAMRBStopPlay autoHandle:Yes];
soundEngine = [SimpleAudioEngine sharedEngine];
[soundEngine preloadBackgroundMusic:#"somemp3.mp3"];
[soundEngine playBackgroundMusic:#"somemp3.mp3"];
maybe the bit rate is too high .. ?
thanks
There was a problem in the vmware..

wx.TextDropTarget not working in Linux

I have a desktop application developed with wxPython. The applications runs fine under Windows and OSX (same codebase, no platform specific code). Everything works on Linux except drag and drop. I can drag just fine, but DoDragDrop always returns wx.DragCancel. I can however, drag from my application or to another app/desktop which excepts text and DoDragDrop returns wx.DragCopy.
It seems to me like the DropTargets aren't getting called. I've added debug statements to OnData, etc and they are never activated.
Has anyone seen this and know of a workaround?
Found a known issue in wxWidgets that was considered fixed, http://trac.wxwidgets.org/ticket/2763, I am able to recreate this issue on linux. I reopened the ticket.
In the meantime you can swap your StaticBoxSizers or BoxSizers. or...
This works....
parent = DropTargetCtrn.GetParent()
boxes = [x for x in parent.GetChildren() if type(x)==wx.StaticBox]
tmpParent = wx.Panel(parent)
for box in boxes:
box.Reparent(tmpParent)
box.Reparent(parent)
parent.Destroy()
This solution seems to lower the StaticBox in the window hierarchy so it don't interfere with drop events. Note, box.Lower() does not work.

Resources