hillbilly

Members
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

133 Neutral

About hillbilly

  • Rank
    Member
  1. Should I switch to Open GL?

    Quote:Original post by Palidine openGL isn't really any simpler than DirectX. In my experience the only really confusing part about the APIs comes about if you don't know how rendering works or if you don't know the ins and outs of Linear Algebra. i.e. it's not really the API that's confusing but it's the concepts of rendering itself that's the confusing part. What in particular is confusing you about DirextX? -me yes, I couldn't agree with any more! API is not the problem! so, Stick to DirectX:)
  2. Should I switch to Open GL?

    Quote:Original post by Palidine openGL isn't really any simpler than DirectX. In my experience the only really confusing part about the APIs comes about if you don't know how rendering works or if you don't know the ins and outs of Linear Algebra. i.e. it's not really the API that's confusing but it's the concepts of rendering itself that's the confusing part. What in particular is confusing you about DirextX? -me yes, I couldn't agree with any more! API is not the problem! so, Stick to DirectX:)
  3. hi there MTclip, the following code demonstrates how to set up a window with four subwindows with winAPI, It seems quite like what you want.:) And If I don't use Directx, say I use OpenGL, I should create four "RENDER-CONTEX"s for four subwindows, then I can draw the front view with the first "RENDER-CONTEX", and draw the top view with the second "RENDER-CONTEX", and so on. I think there must be something similar to the "RENDER-CONTEX" in opengl or "DEVICE" in d3d, and it's "WINDOW-RELATED"(I don't konw what exactly it is :p), so you can create two subwindows in your program and create a "SOME-DXDRAW" object for each subwindow, then you can render what you want with them... I use this method in my previous OpenGL-based program, and it really work well. maybe there are some better way I don't know:) //------------------- #include "main.h" HWND g_hWnd = NULL; HINSTANCE g_hInst = NULL; TCHAR g_szAppClass[] = TEXT("HELLO GAMEDEV"); LRESULT WINAPI MsgProc(HWND, UINT, WPARAM, LPARAM); HRESULT CreateSubWindows(); int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX wndclass; HRESULT hr; HWND hWnd; MSG msg; wndclass.cbSize = sizeof(wndclass); wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_DBLCLKS; wndclass.lpfnWndProc = MsgProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInst; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = g_szAppClass; wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); if(RegisterClassEx(&wndclass) == 0) return 0; if (!(hWnd = CreateWindowEx(NULL, g_szAppClass, "Main window", WS_OVERLAPPEDWINDOW | WS_VISIBLE, GetSystemMetrics(SM_CXSCREEN)/2 , GetSystemMetrics(SM_CYSCREEN)/2 , 380, 280, NULL, NULL, hInst, NULL))) return 0; g_hWnd = hWnd; g_hInst = hInst; CreateSubWindows(); while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } UnregisterClass(g_szAppClass, hInst); return (int)msg.wParam; } LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_KEYDOWN: { switch (wParam) { case VK_ESCAPE: { PostMessage(hWnd, WM_CLOSE, 0, 0); return 0; } break; } } break; case WM_DESTROY: { PostQuitMessage(0); return 1; } break; default: break; } return DefWindowProc(hWnd, msg, wParam, lParam); } /** * Create subwindows */ HRESULT CreateSubWindows() { HWND hWnd3D[4]; RECT rcWnd; int x=0,y=0; GetClientRect(g_hWnd, &rcWnd); for (int i=0; i<4; i++) { if ( (i==0) || (i==2) ) x = 10; else x = rcWnd.right/2 + 10; if ( (i==0) || (i==1) ) y = 10; else y = rcWnd.bottom/2 + 10; hWnd3D[i] = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("static"), NULL, WS_CHILD | SS_BLACKRECT | WS_VISIBLE, x, y, rcWnd.right/2-20, rcWnd.bottom/2-20, g_hWnd, NULL, g_hInst, NULL); } return S_OK; }
  4. hi kingpinzs and MTclip, I don't know directDraw, but I'm working on a editor too:D I've realized that the popular tool "MilkShape 3D" has four separate windows on its main panel, so I decided to implement my tool with this style. I use MFC, so I can split my main window into four subwindows easily by using CSplitterWnd class, and I set up a SWAP CHAIN to draw the individual view. if your program could use swap chain, I think it will be more convenient to operate something in a exclusive view. I hope this could be helpful. about [swap chain] http://www.codesampler.com/dx9src/dx9src_1.htm
  5. how to pick up a line?

    Quote:Original post by Armadon Hi there HillBilly, how are you doing? [The Problem] "Picking" items in DirectX [The Solution] The technique you are refering to is named picking, it involves translating the mouse coordinates to world space so that you can see if the mouse coordinates are in the bounding box/sphere of a object. If you google for "picking" you will find some resources. If you don't come right, please do not hesitate to reply here and I shall happily assist you in the finer details. I hope this helps. Keep cool. hi warm-hearted guy! I get a lot by searching for the keyword "picking", it's what I really want, your reply is indeed helpful! thank you Amadon!
  6. hi guys, I'm wondering how to pick up something in dx9? just like a line, or a sphere, bucause I'm working on my scenec editor, and it seems that I have to konw it. I've googled for hours, but get nothing..., so any handy methods or samples are welcomed. thank you very much!:)
  7. thank you, FlowingOoze ! your reply make things clear, so I can begin my project soon!:D thanks again!
  8. hi guys, I'm a newbie on game programming, I've read some books recently, yes, I think I can implement some algorithm under the guide of the books, but I don't konw exacctly where and when to use them.:( I plan to create a simple 3d game engin to drive my game - a RPG game, the roles can run through the streets of the city, and they can also walk in the rooms of some bulidings, It's a kind of indoor-outdoor mixed game? My puzzles are: 1) in the in-door part of my game, should I use a Portal engine? I was told that the Portal has some superiorities than the BSP algorithm. I'm also wondering if there is a new technology does the same thing? 2) does the BSP algorithm do nothing more than the collision detection under the circumstance of the emergence of the powerful vido hardware? 3) who does the frustum culling, game engin or the hardware? Is the frustum culling a standard and necessary capability of an engine? 4) in the out-dorr part of my game, are there some techniques like Portal in in-door part to accelerate the game? I only konw LOD on terrain rendering:( I will deeply appreciate you if you can indicate some things to me. thanks a lot! :)
  9. First program you have ever written

    QBasic : A bouncing ball in a rectangle... : )
  10. how to model a pice of cotton?

    Quote:Original post by SneftelWhat do you mean by "growing procedure of a cotton"? The manufacturing of a cotton ball? A cotton boll growing in a field? not really, the cotton ball is just one of the organs of the plant, I'm also interested in a new breed like that:D. Quote: Well, you implement it as a fragment shader, using the standard shader methods for your toolkit. Code for a fur shader should be available online; do a websearch. I know there's a fur shader included as one of the examples in RenderMonkey. thank you! warm-hearted guy!
  11. how to model a pice of cotton?

    Quote:Original post by Sneftel A densely connected spring mesh with a high damping factor should suffice for animation. As for rendering, any recent fur shader should be sufficient (especially since a lot of fur shaders tend to make things look like they're covered in cotton balls [wink]). hi, Snefetel, I'm intersted to what you say about animation and rendering, because what i'm doing is mimicing the whole period of an growing procedure of a cotton, so animation and rendering are all indispensable. but I still have one qustion: Is the Fur Shader embeded in Opengl or DirectX? I am using Java3D, I can't find any classes or method to implement fur shader. should I write this effect by myself? thanks a lot!
  12. how to model a pice of cotton?

    Quote:Original post by SmooJ If performance is your major concern then it may be worthwhile looking into image based rendering methods. These include methods such as billboards, imposters and slicing. thank you for your detailed directions, SmooJ, but reality is also necessary, I've add these URLs to my Favorite, I think it will be helpful in another of my project.:)
  13. hi guys! I want to create a 3D cotton model, but I have no idea about it, and I need implement this by coding instead of any 3D modeling tools,I don't konw how to make the soft, white, downy fibers, considering the need of fast rendering speed,I think I can't draw the thousands of fibers one by one. Any algorithm or hint is welcome. thank you very much!