• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

223 Neutral

About AverageMidget

  • Rank
  1. This may be a stupid question but I've search my little butt off and can't find anything about it. I know in a game loop you want continuous rendering because there's usually action happening but in a cad (computer aided design) system, there's no need for that, right? You really only need to redraw the window when the user moves the camera or modifies the content.    Maybe I'm over-thinking it and I should just do it the game way. I figured I could save some CPU cycles if it wasn't trying to constantly render.   Has anyone programmed a CAD application and, if so, how did you set up your message loop?
  2. debug error in DX(

    [quote name='nchannon' timestamp='1321475643' post='4884682'] Hi I am getting a brakepoint error for some reason and im not sure what it means as I see no reason for my code not to work [code] [font="Consolas"][size="2"][font="Consolas"][size="2"]LPDIRECT3DSURFACE9 g_BackBuffer; g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); g_pd3dDevice->GetBackBuffer(0,0, D3DBACKBUFFER_TYPE_MONO, &g_BackBuffer); hr = D3DXLoadSurfaceFromSurface(g_BackBuffer, NULL, NULL, g_LogoSurface, NULL, NULL, D3DX_FILTER_LINEAR, 0); g_BackBuffer->Release(); g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); g_BackBuffer->Release();[/size][/font][/size][/font] [/code] [font="Consolas"][size="1"][font="Consolas"][size="1"]CCDFaceMgr.exe has triggered a breakpoint Direct3D9: (ERROR) :************************************************************ Direct3D9: (ERROR) :ASSERTION FAILED! File e:\dxsdk\wggt_apr07\private\multimedia\directx\dxg\d3d9\fw\d3dobj.cpp Line 63: m_cRef > 0 Direct3D9: (ERROR) :************************************************************ Its strange as I do not have a E:\ partition and when I hit F5 to continue my image loads anyone got any idea why im getting this error Thanks[/size][/font][/size][/font] [/quote] [url="http://www.gamedev.net/topic/523835-directx9-assertion-failure/"]http://www.gamedev.net/topic/523835-directx9-assertion-failure/[/url]
  3. binary string to decimal

    [quote name='phil67rpg' timestamp='1320016956' post='4878721']I am attempting to convert a string binary to a decimal value. [font="Consolas"][font="Consolas"][size="2"][color="#0000ff"]...[/color][/size][/font][/font] [font="Consolas"][font="Consolas"][size="2"]thanks for your help in advance.[/size][/font][/font][/quote] Help with what? I don't see a question. I'm pretty sure I know what you're asking, but still, no question. Did you try searching for this? It's not exactly a hard to find answer. Google returns 10,500,000 results for [i][url="http://www.google.com/search?gcx=c&sourceid=chrome&ie=UTF-8&q=std%3A%3Abitset#sclient=psy-ab&hl=en&safe=off&source=hp&q=binary+string+to+decimal&pbx=1&oq=binary+string+to+decimal&aq=f&aqi=g3g-j1&aql=1&gs_sm=e&gs_upl=716450l721730l0l722371l24l23l0l0l0l0l232l3718l4.10.9l23l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=19557f1f637173eb&biw=1357&bih=922"]binary string to decimal[/url][/i] [url="http://www.cplusplus.com/forum/general/13492/"]http://www.cplusplus.../general/13492/[/url] Sixth post down. EDIT: Ninja'd by several people!
  4. win32 - Purpose of string table?

    It's a way to have all your strings in one location. Say you have a bunch of different strings that get displayed to your user (labels, message boxes, etc.). Instead of having them peppered throughout your code, you can put them in a string table and use the [b]LoadString()[/b] function in your code, where you wanted the string to appear. If it's practical or not, you can decide. It would, however, come in very handy if you ever wanted to ship your software in other languages, though.
  5. maya to physX

    I assume you looked on page 41 (the section on exporting) of [url="http://developer.download.nvidia.com/PhysX/tools/dcc-plugins/maya/PhysX_Maya_User_Guide.pdf"]the PhysX plugin[/url] pdf and decided that isn't what you want?
  6. PHP cant see directory?

    Two things to look at... There use to be a [url="https://bugs.php.net/bug.php?id=48535"]bug[/url] in php 5.3 (you didn't say what version you are running), under windows and [url="http://stackoverflow.com/questions/1832181/php-file-exists-return-false-on-some-directory-on-iis"]this[/url] stackoverflow question which claims the parent directory needs read permissions.
  7. WM_SHOWWINDOW question

    [quote name='latent' timestamp='1319414113' post='4876162']As AverageMidget pointed out, it's common practice to call an On* function as your message handler in the WndProc, but in that case you would NEVER send the message ID as well - after all, what's the point?[/quote] I got a little crazy with the copy/paste, without giving it much thought.
  8. WM_SHOWWINDOW question

    I haven't read the [url="http://functionx.com/win32/Lesson05.htm"]article in question[/url], so there might be an explanation as to why they're putting it that way. The OnCreate, OnActivate, On***** are commonly used to separate implementation code from the WndProc. It would look a little like this... [code]//--------------------------------------------------------------------------- LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_CREATE: OnCreate(hWnd, Msg, wParam, lParam); break; case WM_SHOWWINDOW: OnShowWindow(hWnd, Msg, wParam, lParam); break; case WM_DESTROY: OnDestroy(hWnd, Msg, wParam, lParam); PostQuitMessage(WM_QUIT); break; default: return DefWindowProc(hWnd, Msg, wParam, lParam); } return 0; } //--------------------------------------------------------------------------- OnCreate(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { // Handle message here } OnShowWindow(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { // Handle message here } OnDestroy(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { // Handle message here }[/code] Maybe they explained that in a different tutorial?
  9. Linker Nightmares

    [quote name='pmachin' timestamp='1319348995' post='4875537']...(However, the call that I'm making is: bool D3DModel::Load(LPCTSTR xFileName, LPDIRECT3DDEVICE9 dev) so I'm a bit confused how the D3DXLoadMeshFromX function is being called). What am I doing wrong?[/quote] I would imagine that [b]D3DXLoadMeshFromX[/b] is being called from within the [b]D3DModel::Load[/b] method. I, however, am having a hard time finding that. It seems like that method (and most of the other methods listed in your linker errors) are from some DirectX SDK samples. Not actual documented Microsoft source. [quote name='pmachin' timestamp='1319348995' post='4875537'][color="#1C2837"][size="2"]From reading some other posts it seems that sometimes you have to also add external .cpp files to the project such as d3dapp.cpp (not just headers and libraries), could that be the case here?[/size][/color][/quote] That is sometimes the case. If the author of the code you're trying to use left it as a plain .cpp file (not compiled into a .dll or .lib), you would add that to your project and include the header, where you want to use the code. In my poking around, I found the [b][color="#1C2837"][size="2"]CD3DMesh[/size][/color][/b][color="#1C2837"][size="2"] and [/size][/color][b][color="#1C2837"][size="2"]CD3DFrame[/size][/color][/b][color="#1C2837"][size="2"] classes defined in a file named [b]d3dfile.cpp[/b]. Also, these samples appear to be part of the DirectX 9 SDK samples.[/size][/color]
  10. PHP cant see directory?

    A few guesses would be, you're either running in php's safe mode, or the privileges on the "Site" folder make it so php can't access it.
  11. Linker Nightmares

    I'll try and help in a way that'll help you figure these things out for yourself. If you look at the [url="http://msdn.microsoft.com/en-us/library/windows/desktop/bb172890(v=vs.85).aspx"]msdn entry[/url] for D3DXLoadMeshFromX function (which is one of your linker errors) and you scroll down, you'll see the requirments. The library is [b]D3dx9.lib[/b] Is that lib included in your dependencies list? EDIT: I'll add that [b]unresolved external symbol[/b] basically means it can't find the proper signature of the following function(s), so you have to tell the linker where to find it. In case you were confused by that part.
  12. Another c++ error

    Well, one problem is with your [b]class_player.h[/b] file[code]#ifndef CLASS_PLAYER_H #define CLAS_PLAYER_H[/code]
  13. Another c++ error

    The inclusion of [b]main.h[/b] could very well be the issue. I, having nothing better to do , threw together a minimal example project and, if I include [b]main.h[/b] in my [b]tile.h[/b], I get the same errors as you... [code]main.h(7): error C2143: syntax error : missing ';' before '*' main.h(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int main.h(7): error C2065: 'TOTAL_TILES' : undeclared identifier main.h(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int[/code] Here are the files, if you want to test it out. tile.h[code]#ifndef TILE_H #define TILE_H #include <iostream> //#include "main.h" const int TOTAL_TILES = 225; class Tile { public: Tile(const std::string name); ~Tile(); std::string GetName(); private: std::string name_; }; #endif // TILE_H[/code] tile.cpp[code]#include "tile.h" Tile::Tile(const std::string name) : name_(name) { //std::cout << name_.c_str() << std::endl; } Tile::~Tile() { } std::string Tile::GetName() { return name_; }[/code] main.h[code]#ifndef MAIN_H #define MAIN_H #include <iostream> #include "tile.h" extern Tile *tiles[TOTAL_TILES]; #endif // MAIN_H[/code] main.cpp[code]#include "main.h" Tile *tiles[TOTAL_TILES]; int main() { tiles[0] = new Tile("One"); std::cout << tiles[0]->GetName().c_str(); delete tiles[0]; // quick and dirty way to keep the cmd window open. int i; std::cin >> i; return 0; }[/code] Compile it and test, then un-comment the [b]//#include "main.h"[/b] in [b]tile.h[/b] and re-compile it.
  14. Another c++ error

    What is the reason behind your [b]tile_load.h[/b] including [b]main.h[/b]? I don't see a reason for it to be included. Also, your [b]main.h[/b] and [b]main.cpp[/b] both include [b]tile_load.h[/b]. Not saying that's going to be a miracle fix, but if your include guards or #pragma once...es aren't doing their job, you're going to get cyclical inclusion.
  15. Another c++ error

    Anyone else thinking this needs a psychic debugger? I don't know if it's possible, or if you even want to, but maybe you could zip up your whole project and post it? It seems like this back-and-forth exchange isn't going anywhere at all.
  • Advertisement