-
Posts
18 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Articles
Docs
Gallery
Posts posted by stevel
-
-
I know this is a pretty ignorant question, but what controls which backends get loaded?
I just loaded up the app I built from a cMake project from the 3.10.1 install, and DirectSound, OpenAl, and XAudio all show up in the options dialog, and all seem to work. So my plan would probably be to spend hours looking over my code, and trying to minimize differences between it and the cmake project I just built, but anything that could be done to educate me to reduce that time would be appreciated.
-
Thanks for the reply. Just looking at the crash as I write this to try to answer your question. As I think I mentioned, the engine module manager is calling initialize system, which is executing module->initialize() for the fourth module (I == 3). Which is the SFXSystem.
Looking a bit deeper in the call chain, SFXProvider is calling initialize all providers, and it's on the third provider (i == 2). Which is SFXDS.
That third provider is calling init, and it seems to be SFXDSProvider, and that's where the crash occurs, so I think the answer to your question is DS, or direct sound. Let me know if I misunderstood either the question, or the call chain.
-
I'm going to ask this question at a very high level first, and then if needed dive into the details. Maybe someone will have an idea what is going wrong from the high level description.
I'm including the T3D engine in my project as a part of our larger app. The App is a 64 bit application that has a button that opens a 3D window, which is based on the t3D engine.
At the moment, everything seems to be working pretty well in that I can launch our app, and click on the button, and it initializes and opens the window, which is based on the engine, but if I plug in my headphones, and do the same thing, the engine crashes while loading the SFX module.
It looks like the crash is associated with trying to load up the 'dllopen' routine from within the sound DLL. It seems to be failing to find that routine within the DLL.
What it feels like to me, is that the engine is trying to load the sound DLLs, which are still 32bit dlls, and it's failing because we're building a 64 bit app.
If anyone has any thoughts on this question, I would appreciate hearing them. I will be glad to post some more information if that would help on Monday.
-
Thanks for your help, everyone, reverting cMake to 3.7.1 was the solution to my issue. Should not have grabbed the latest in the first place.
-
Thanks for the replies. Gonna try using an older version of cmake. Will post if it works.
-
I am trying to do a new CMake build of the engine with 3.10.1. I haven't used CMake before, and am encountering some errors that I could really use some help with.
Background:
Torque3D 3.10.1 fresh source download.
CMake 3.13.3 Just downloaded the latest (Maybe I need a specific version?)
I just downloading and reinstalled the June 2010 DXSDK, in case that was the issue.
I'm using VS2017, and targeting VS2015, 64Bit. (Cause VS2017 is not listed.)
Here's the last few lines from the CMake output window: I can post part of the CMakeOutput.log file, if necessary.)
Looking for arm_neon.h - not found
Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
Could NOT find OSS (missing: OSS_INCLUDE_DIR)
Could NOT find AudioIO (missing: AUDIOIO_INCLUDE_DIR)
Could NOT find SoundIO (missing: SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)
Could NOT find QSA (missing: QSA_LIBRARY QSA_INCLUDE_DIR)
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CheckIncludeFiles.cmake:63 (message):
Unknown arguments:
-D_WIN32_WINNT=0x0502
Call Stack (most recent call first):
Engine/lib/openal-soft/CMakeLists.txt:938 (CHECK_INCLUDE_FILES)
Configuring incomplete, errors occurred!
See also "C:/Torque/Torque3D-3.10.1/My Projects/ExtendSim3D/buildFiles/CMake/CMakeFiles/CMakeOutput.log".
See also "C:/Torque/Torque3D-3.10.1/My Projects/ExtendSim3D/buildFiles/CMake/CMakeFiles/CMakeError.log".
-
Thank you Timmy! I had messed up my project, thinking that as I was trying to support DX 11, the dependency on the older DLL was transitioned to the newer one. As you pointed out, I was wrong. Back up and running now.
Thanks again,
-
I'll give that a try. Thanks for the response.
-
Unless I am missing something, that's the DLL necessary for DX9. I'm trying to find out what I need to include to support DX11.
-
Not sure why I am finding this so hard to resolve, but I am having trouble figuring out which version of d3dcompiler_47.dll to include when testing our project. It's based on 3.10, and I need to support DirectX 11. Basically I think I just need to know which version of the windows SDK to download so I can grab the right version of the d3dcompiler_47.dll file.
If it matters, the specific problem I am having is D3DReflect returning an invalid argument error. I am pretty sure this is because I have the wrong version of the .dll included.
If someone could let me know which version of the windows SDK I need, or set me straight if I am totally off base, I would appreciate the help.
Thanks,
-
Thanks for this. I seem to have gotten the code up and running, and I am seeing a split screen in my project on the monitor, but when I look into the rift, I just see a little hourglass icon. Not sure what is going on here, but I will post if I have any useful information about it. (I have a DK2, and get warnings from the oculus software that it's not supported, but it still works with the demos.) I should try this in the T3D directly, not just in my project, and see what it does there.
-
Thanks Azaezel! Finally got back to this, and I have something using imposter code that is starting to work. I can post the final routine here, once I get it working well, if anyone cares.
-
Script-side stuff makes sense, as I don't think that there was much of that in the development branch update, and there was talk of an option that needed to be turned on. An update here with some additional info would be great!
-
Brilliant! Thank you!
-
I had a routine in a previous version of the engine, which would draw a rotated bitmap:
See old code.png attached.
Things changed, and the old code didn't work any more, so I tried to rewrite it, and got it mostly working, except for part of the bitmap, which isn't drawing correctly:
See New code.png attached
I'm not able to figure out what I need to do to get this new routine working like the old one, though I think the difference is just the fact that I had to use GFXTriangleStrip instead of GL_TRIANGLE_FAN
If someone who understands this stuff could look at these routines, and help me, it would be much appreciated.
old code:
// JSL - added for the HUD //********* void dglDrawBitmapRotated(TextureObject *texture,const RectI& dstRect,const RectI& srcRect,const U32 in_flip,F32 spinAngle) { AssertFatal(texture != NULL, "GSurface::drawBitmapStretchSR: NULL Handle"); if(!dstRect.isValidRect()) return; AssertFatal(srcRect.isValidRect() == true, "GSurface::drawBitmapRotated: routines assume normal rects"); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture->texGLName); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_LIGHTING); F32 texLeft = F32(srcRect.point.x) / F32(texture->texWidth); F32 texRight = F32(srcRect.point.x + srcRect.extent.x) / F32(texture->texWidth); F32 texTop = F32(srcRect.point.y) / F32(texture->texHeight); F32 texBottom = F32(srcRect.point.y + srcRect.extent.y) / F32(texture->texHeight); F32 screenLeft = dstRect.point.x; F32 screenRight = dstRect.point.x + dstRect.extent.x; F32 screenTop = dstRect.point.y; F32 screenBottom = dstRect.point.y + dstRect.extent.y; if(in_flip & GFlip_X) { F32 temp = texLeft; texLeft = texRight; texRight = temp; } if(in_flip & GFlip_Y) { F32 temp = texTop; texTop = texBottom; texBottom = temp; } glColor4ub(sg_bitmapModulation.red, sg_bitmapModulation.green, sg_bitmapModulation.blue, sg_bitmapModulation.alpha); F32 X = 0; // calculate the centroid of the rectangle (to use as rotation pivot) if (screenLeft < screenRight) { X = screenLeft + ((screenRight - screenLeft)*0.5f); } else { X = screenRight + ((screenLeft - screenRight)*0.5f); }; F32 Y = 0; if (screenTop < screenBottom) { Y = screenTop + ((screenBottom - screenTop)*0.5f); } else { Y = screenBottom + ((screenTop - screenBottom)*0.5f); }; // spin angle is in degree's so convert to radians..radians = degrees * pi /180 spinAngle = spinAngle * 3.14 / 180.0f; Point2F screenPoint(X,Y); F32 width = dstRect.extent.x; width *= 0.5; MatrixF rotMatrix( EulerF( 0.0, 0.0, spinAngle ) ); Point3F offset( screenPoint.x, screenPoint.y, 0.0 ); Point3F points[4]; points[0] = Point3F(-width, -width, 0.0); points[1] = Point3F(-width, width, 0.0); points[2] = Point3F( width, width, 0.0); points[3] = Point3F( width, -width, 0.0); for( int i=0; i<4; i++ ) { rotMatrix.mulP( points[i] ); points[i] += offset; } glBegin(GL_TRIANGLE_FAN); glTexCoord2f(texLeft,texTop); glVertex2fv(points[0]); glTexCoord2f(texLeft, texBottom); glVertex2fv(points[1]); glTexCoord2f(texRight, texBottom); glVertex2fv(points[2]); glTexCoord2f(texRight, texTop); glVertex2fv(points[3]); glEnd(); glDisable(GL_BLEND); glDisable(GL_TEXTURE_2D); }New code :
// // JSL - added for the HUD //********* void GFXDrawUtil::drawBitmapRotated(GFXTextureObject *texture,const RectI& dstRect,const RectI& srcRect,F32 spinAngle) { // Sanity if no texture is specified. if (!texture) return; GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, 4, GFXBufferTypeVolatile ); verts.lock(); F32 texLeft = (srcRect.point.x) / (texture->mTextureSize.x); F32 texRight = (srcRect.point.x + srcRect.extent.x) / (texture->mTextureSize.x); F32 texTop = (srcRect.point.y) / (texture->mTextureSize.y); F32 texBottom = (srcRect.point.y + srcRect.extent.y) / (texture->mTextureSize.y); F32 screenLeft = dstRect.point.x; F32 screenRight = dstRect.point.x + dstRect.extent.x; F32 screenTop = dstRect.point.y; F32 screenBottom = dstRect.point.y + dstRect.extent.y; // calculate the centroid of the rectangle (to use as rotation pivot) F32 X = 0; if (screenLeft < screenRight) { X = screenLeft + ((screenRight - screenLeft)*0.5f); } else { X = screenRight + ((screenLeft - screenRight)*0.5f); }; F32 Y = 0; if (screenTop < screenBottom) { Y = screenTop + ((screenBottom - screenTop)*0.5f); } else { Y = screenBottom + ((screenTop - screenBottom)*0.5f); }; // spin angle is in degree's so convert to radians..radians = degrees * pi /180 spinAngle = spinAngle * 3.14 / 180.0f; Point2F screenPoint(X,Y); F32 width = dstRect.extent.x; width *= 0.5; MatrixF rotMatrix( EulerF( 0.0, 0.0, spinAngle) ); Point3F offset(screenPoint.x, screenPoint.y, 0.0 ); Point3F points[4]; points[0] = Point3F(-width, -width, 0.0); points[1] = Point3F(-width, width, 0.0); points[2] = Point3F( width, width, 0.0); points[3] = Point3F( width, -width, 0.0); for( int i=0; i<4; i++ ) { rotMatrix.mulP( points[i] ); points[i] += offset; } const F32 fillConv = mDevice->getFillConventionOffset(); verts[0].point.set( points[0].x - fillConv, points[0].y - fillConv, 0.f ); verts[1].point.set( points[1].x - fillConv, points[1].y - fillConv, 0.f ); verts[2].point.set( points[2].x - fillConv, points[2].y - fillConv, 0.f ); verts[3].point.set( points[3].x - fillConv, points[3].y - fillConv, 0.f ); verts[0].color = verts[1].color = verts[2].color = verts[3].color = mBitmapModulation; verts[0].texCoord.set( texLeft, texTop ); verts[1].texCoord.set( texLeft, texBottom ); verts[2].texCoord.set( texRight, texBottom ); verts[3].texCoord.set( texRight, texTop ); verts.unlock(); mDevice->setVertexBuffer( verts ); mDevice->setStateBlock(mBitmapStretchWrapLinearSB); mDevice->setTexture( 0, texture ); mDevice->setupGenericShaders( GFXDevice::GSModColorTexture ); mDevice->drawPrimitive( GFXTriangleStrip, 0, 2 ); } -
So I've update our project to include the Basic OpenVR support code checked in a few days ago by Areloch, I've added the openVR files into the project, as well as openvr_api.lib, I turned on TORQUE_OPENVR, and everything is compiling and linking. I have a DK2, which is still working mostly. I removed all the Oculus specific files. Everything is compiling and linking. What do I have to do to get my project to just echo what it shows to the rift? Is there a lot of development that I am missing, or just some option I have forgotten to turn on?
Thanks for any advice
-
I have some very old code from the TGE that was a routine in tsShapeInstance that just returned an image of the object as a bitmap on a white background. I find myself needing the same behavior in T3D, and I had thought I would be able to port the old code to the T3D engine, but I am finding that very difficult. Does anyone know of a resource, or if there is some functionality built into the engine that I am missing, that will provide me with this behavior? What I want to be able to accomplish is to specify an object in the 3D engine, and get a snapshot of it that I can display on a dialog. The old routine had width and height args, and specified a camera rotation, so I could spin the object before taking the snapshot if desired. If someone is curious, I could post the old code here.



sound system crash
in C++
Posted
Just for anyone who might have the same issue, I found the difference that was causing this crash. I had 'treat WChar_t as build in type' set to true in my project, and the t3d engine seems to be be unhappy with this setting.
Once I set this option to false in my project, this crash seems to be resolved.
(I also had some incorrect casts that were hiding what would have been a valid compiler complaint.)
Thanks for your help, Azaezel.