No, I'm not using Managed DirectX. I am still using MFC to create the main application window, and using the HDC handle to use OpenGL libraries directly. This is identical to what I was doing in the "native" MFC app.
Do you think that my native OpenGL calls are somehow bogged down in the "It Just Works" model of mixing managed and native code? I've never used DirectX graphics before. How much time/effort do you think would be involved in learning DirectX, knowing that I at least have a decent background in OpenGL? And do you think using Managed Direct X would make much of an improvement?
BTW, just as a point of interest, I'm using a GeForce 5900FX card. I don't know what it's rating is in triangles-per-second, but I know it's in the millions. My terrain only contains 6100 triangles, which at 10FPS = 0.06 million triangles per second. So that means something is getting SEVERLY bogged down somewhere.
No, because right now because almost everything is unmanaged. All of my base classes are still unmanaged. I just changed a couple of the containers to managed. But I have found the problem which I'll post as a reply to myself on the main thread.
I have found that the issue is not handles vs. pointers, Managed DirectX vs. native OpenGL calls, or anything like that. It's IDE vs. executable! What I mean is that when I just build the EXE and then run it outside of the IDE, my framerate jumps up to 40FPS. Running in the IDE it immediately drops back to 5FPS.
So then the next logical question is... Does anyone know of any IDE optimizations I can make in order to reduce the problem?
That's probably because you are running in debug mode. if you press ctrl+F5 instad only F5. You will run it without the debbugging mode. When you came at the problem, and you are using debug build, then yust use atach process, to connect to IDE debugger
I have this application of mine which works well. It even used to work on Vista. (I work on XP most of the time).
There are some ManagedC++ assemblies in the project.
Now when I try to start the project under vista, when I try to access classes in the ManagedC++ assemblies I get this error:
Exception : System.IO.FileLoadException
Message : Could not load file or assembly 'NScribe, Version=1.0.2553.30928, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
Source : NovaMindEditor
OSVersion : Microsoft Windows NT 6.0.5600.0
at NovaQuickStart.Program.StartApp(String args)
at NovaQuickStart.Program.Main(String args) in C:\Development\Development\Windows\NovaQuickStart\Program.cs:line 59
-------- Caused by Exception --------
Exception : System.Runtime.InteropServices.COMException
Message : The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
I know I don't spend much time in the CP forums talking or maybe even not at all I do allot of browsing here, I recently found a tut from RegistryKey. After adding the code to my project it had said that the namespace did not exist, for example 'Microsoft': class or namespace does not exist. I don't know what to do im completely lost as to where to go from here, I have the most recent as far as i know its recent, SDK 2.0 installed along with VS .NET '03. For this project I am using C++/CLi.
// DevLdr.cpp : Defines the entry point for the console application.<br />//<br />
#include "stdafx.h"<br />
usingnamespace Microsoft::Win32;<br />
int _tmain(int argc, _TCHAR* argv)<br />
rkey = Registry.CurrentUser;<br />
//The second parameter tells it to open the key as writable<br />
rkey1 = rkey.OpenSubKey("Software",true);<br />
// Now we create our sub key [assuming you have enough <br />// rights to edit this area of the registry]<br />
RegistryKey rkey2 = rkey1.CreateSubKey("Tweety");<br />
//Setting the various values is done using SetValue()<br />//I couldn't figure out how to set the value type yet <br />
Oh dear ! you are not using managed C++, I fear.
If you want to use this code in unmanaged c++, go to project properties-->configuration properties-->Project defaults-->common language runtime support and set it to commong language runtime support(/clr).
Or better of starting new project with type VC++-->CLR-->CLR console application.
it wasn't giving me that option, although I did notice what you were talking about. so im just removed all of my sdk components and reinstalled my sdk. but also i do want to thank you and you helped allot.
It would be better, if know what project type you have used for creating this console application, If you had selected VC++-->CLR , error you have mentioned should not come at all. If its VC++-->win32 application , you need to select option I mentioned earlier.
for each (String ^tempStr in arrTableUsers_NORMAL)
if (firstColumn == true)
sql += tempStr;
sql += ", "+tempStr;
case USER_POWER: // Errors, get here
If i have enabled for each block in a switch statment, i get errors:
Warning 1 The type initializer for '<Module>' threw an exception. 0 0
Warning 2 The variable 'lstListUsers' is either undeclared or was never assigned. 0 0
Error 3 error C2360: initialization of '$S3' is skipped by 'case' label c:\projects\cddvdorganizer\cddvdorganizer\syntaxBuilder.h 379