JimmyRose

Members
  • Content count

    25
  • Joined

  • Last visited

Community Reputation

109 Neutral

About JimmyRose

  • Rank
    Member
  1. OpenGL Start Guide Help

    I have no doubt that his instructions work, one reason I wanted to follow his tutorials is because of his explanation of whom the tutorials were targeted for. I can't get Premake 4 to work or to tell you the truth I'm really confused on how to use it. If someone could fully explain how to get it setup I have no qualms that I'll be able to breeze through the tutorials.
  2. OpenGL Start Guide Help

    Hello,   I've been wanting to start OpenGL for quite a while now and I've been searching for the best place to start. I recently purchased OpenGL Programming Guide 5th Edition aka The Red Book which covers OpenGL 2.0, but recently I was told that I was learning depreciated code and I would be wise to find a more recent book or tutorial on OpenGL. I personally loved The Red Book, it didn't take me long to get things on the screen, it was easy to read, and I understood everything while I was breezing through the book.   So my questions start: Would I gain anything from reading The Red Book? or Would I just be shooting myself in the foot? If learning from The Red Book is a bad idea is there anything comparable, as far as text books? What's the ideal API to use while "LEARNING" OpenGL?   There are a few tutorials online I've been reading one of them seem to be rather popular: http://www.opengl-tutorial.org/ It was recommended on NeHe website. I was going to use it but when reading the tutorials it is advertise as using "Easy C++" and I don't want to be protected from learning something that may be easy from me but is left out to be more friendly to those who may not understand C++. To those who have used it or have read it, would you recommend it?   Another website that seems to be very popular and is also organize very much like a text book, is http://www.arcsynthesis.org/gltut/index.html Reading the introductory I was very convinced this was the best path for me learning OpenGL and Modern Graphics Programming. But it was difficult for me to get started I was unable to get Premake 4 to work and there seems to be little to no real walkthrough on how to use it. I'm not an expert on using the command line but it was a tutorial I really wanted to get started on. To those who have used it or have read it, would you recommend it? Can anyone walk me through using Premake 4? I tried the walkthrough on the website and I get errors.   As far as text books go OpenGL Shading Language 3rd Edition seems to be a highly rated book on current OpenGL. Is this book comparable to The Red Book?   I hate to post questions that may have already been answered but I've been searching and I was unable to find answers to my questions. Thanks for any help!
  3. I'm wondering what is the difference between to the two I understand that time_t is based off time but clock_t is based off clock ticks??? I just need some clarification.
  4. Hello I'm just wondering how would you change a mesh to be transparent?
  5. Need SkyBox Textures

    Hello I'm building a program and I'm looking for SkyBox textures, ones with six sides (N,S,E,W,UP,DOWN). I'm mainly looking for something like a volcano or the surface of the sun. Thanks!
  6. Is there a website or something out there that has Skybox pictures ready? Thanks for any help.
  7. Device values do not carry between classes.

    ///// ///// This is from Device.h ///// class Device { public: Device(void); ~Device(void); D3DPRESENT_PARAMETERS d3dpp; IDirect3DDevice9* gd3dDevice; // D3D Device IDirect3D9* md3dObject; // D3D Object LPDIRECT3DVERTEXBUFFER9 t_buffer; // the pointer to the particle's vertex buffer void Init(HWND hWnd, HINSTANCE hInst,int nWidth, int nHeight, bool bWindowed); }; ///// ///// This is from Device.cpp ///// void Device::Init(HWND hWnd, HINSTANCE hInst, int nWidth, int nHeight, bool bWindowed) { // Create the D3D Object md3dObject = Direct3DCreate9(D3D_SDK_VERSION); // Verifying HAL Support //IDirect3D9::CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFORMAT, D3DFORMAT, true); // The device's parameters ZeroMemory( &d3dpp, sizeof( d3dpp ) ); // Set Parameters d3dpp.Windowed = true; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.hDeviceWindow = hWnd; d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8; d3dpp.BackBufferWidth = SCREEN_WIDTH; d3dpp.BackBufferHeight = SCREEN_HEIGHT; d3dpp.EnableAutoDepthStencil = TRUE; d3dpp.AutoDepthStencilFormat = D3DFMT_D16; // Create the device md3dObject->CreateDevice( D3DADAPTER_DEFAULT, // Adapter D3DDEVTYPE_HAL, // Device Type hWnd, // Focus Window D3DCREATE_SOFTWARE_VERTEXPROCESSING, // Behavior Flags &d3dpp, // Presentation Params &gd3dDevice); // D3D Device gd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); } ///// ///// This is from DirectX.h ///// public: CDirectX(void); ~CDirectX(void); Device *device; // This is where the Device is passed from the class void Init(HWND hWnd, HINSTANCE hInst,int nWidth, int nHeight, bool bWindowed); void Update(); void Render(); void Run_Particles(); void Shutdown(); }; ///// ///// This is from DirectX.cpp ///// void CDirectX::Init(HWND hWnd, HINSTANCE hInst, int nWidth, int nHeight, bool bWindowed) { ////////////////////////////////////////////////////////////////////// ///// Initialize Graphics ////////////////////////////////////////////////////////////////////// // load the texture we will use D3DXCreateTextureFromFile(device->gd3dDevice, "fire.png", &texture); This is how I'm passing on the device.
  8. Hello I have a particle effect and when I try to use it the particle makes every model on the screen disappear, or it seems because the models are still their but the go all black. When I comment out this line gd3dDevice->SetTexture(0, texture); or basically when I don't apply the texture everything is normal but the particle looks horrible. What am I doing wrong? Thanks for any help.
  9. Okay I'm using DirectX and I have several classes that need to use the device so the device has its own class so every other class could call on that device. This is where it's breaking; I call on the class using the class name like for example: DeviceClass *Device; then I use that Device class I created to use the values from that class like this: Device->d3dDevice->SetRenderState(.... but the weird thing is the device is never created even though I created in the Device class even weirder when I put a break point in the Device class after the device is created it has values in that class but when I use it outside that class it breaks. I know this might be an easier answer so please bare with me. FYI I categorized this as a C++ problem then a DirectX problem because I think I’m transferring the values incorrectly not anything really to do with DirectX. Thanks for any help.
  10. Quaternions or Vector Math

    Hello, I'm creating a class that controls a planes movement where depending on the planes position and angle the plane will rotate and simulate realistic plane movement. I've been designing on how to construct a class for the program and I was planning on using vector math for creating the plane's movement but someone told me that Quaternion’s is a better option. What would be the best option and why? Thanks for helping!!!
  11. Plane Movement

    Hello, Thanks for your concern and suggestion I actually started with C# and move my way to C++ but then I quit programming and did other things that interested me more but I'm trying to get back into programming and game programming interest me so many of my older posts was me just trying to get back into the groove of things. I usually always have a broad idea on how to do something and I'm surrounded by a lot of talented programmers I just use these threads to bounce ideas off other people to see if something else comes more interesting.
  12. Plane Movement

    Hello, I’m making a game that revolves around planes and I'm trying to figure out the best method to create somewhat of a realistic plane movement and I don't mean something like MS Plane Sim but something like Star Fox. Also what would be the best way to initiate them without just putting the code under something like press this key and this happens I’m more looking for something that is called every time that won't change the planes movement unless the plane changes movement. I'm obviously using DirectX so any shortcuts they may provide would helpful and any tutorials you know of would be great too.
  13. Joystick Problem

    After using some help from else where I got this and now it's a new problem. In the header: static BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pDIInst, VOID* pContext); In the cpp: BOOL CDirectX::EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext) { CDirectX* pThis = (CDirectX*)pContext; // Obtain an interface to the enumerated joystick. if(FAILED (pThis->din->CreateDevice(pdidInstance->guidInstance, pThis->&joystick, NULL))) { //ONMESSAGE("cannont obtain joystick intefaces","error:dxinput"); return DIENUM_STOP; } return DIENUM_CONTINUE; } These are the errors I'm getting: I know it starts all right here I have no idea why is wont recognize '&' error C2059: syntax error : '&' error C2143: syntax error : missing ';' before '{' error C2039: 'HINSTANCE' : is not a member of 'CDirectX'see declaration of 'CDirectX' error C2146: syntax error : missing ')' before identifier 'hInstance' error C2761: 'void CDirectX::initDInput(HINSTANCE,HWND)' : member function redeclaration not allowed error C2059: syntax error : ')' error C2143: syntax error : missing ';' before '{' error C2447: '{' : missing function header (old-style formal list?)
  14. Joystick Problem

    Hello, I'm trying to use DirectInput to use a PS3 Controller in my game but I'm getting stuck I've had some help but I still don't understand it. Here's the code: BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext) { HRESULT hr; // Obtain an interface to the enumerated joystick. hr = din->CreateDevice(pdidInstance->guidInstance, &joystick, NULL); if(FAILED(hr)) return DIENUM_CONTINUE; return DIENUM_STOP; } // Look for the first simple joystick we can find. hr = din->EnumDevices( DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback, this, DIEDFL_ATTACHEDONLY); // Make sure we got a joystick if (joystick == NULL) { printf("Joystick not found.\n"); } error C3867: 'CDirectX::EnumJoysticksCallback': function call missing argument list; use '&CDirectX::EnumJoysticksCallback' to create a pointer to member Can anyone help me please.
  15. Writing Text

    I'm making a game with a chat client and I'm using DirectX as my wrapper that's why I wrote it here just because DirectX may have a way of doing it. I never heard of (GDI) DrawText if that works that would be great. I just wanted to get on the right path, I'll look it up thanks.