Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

121 Neutral

About f12dude

  • Rank
  1. I've enabled back face culling and only half of the triangles get rendered.  I've also reverted my view matrix back to what I originally had it set to.  I'm still new to this but in DirectX, I would specify CullMode= CCW; in the shader to do backface culling which worked correctly. I still have no idea how to get the text rendered correctly without flipping the view matrix. Inverting the U component of the texture coordinates does this(without culling):   int x = character % 16; // Column int y = (character / 16); // Row glm::vec2 topLeft(1.0f - (x / 16.0f),y / 16.0f); glm::vec2 bottomRight(1.0f - ((x+1) / 16.0f),(y+1) / 16.0f);      
  2. I figured a solution to the problem by changing my view matrix, but I'm not sure if this is the correct way to go about this:   glm::lookAt(glm::vec3(0.0f,0.0f,-10.0f),glm::vec3(0.0f,0.0f,0.0f),glm::vec3(0.0f,1.0f,0.0f));     Changed to:   glm::lookAt(glm::vec3(0.0f,0.0f,10.0f),glm::vec3(0.0f,0.0f,0.0f),glm::vec3(0.0f,1.0f,0.0f));
  3. This is what the flipping looks like when rendering "1234567890"   The code is essentially the same as the DirectX version which treats the origin in the top left.  
  4. I'm converting my DirectX text renderer to OpenGL, and I've run into an issue with the texture coordinates. My problem is that the text that gets rendered in OpenGL is flipped horizontally. I was wondering how this came to be as after reading about how OpenGL texture corrdinates work, I would have thought that I would have needed to invert the V component of the texture coordinates, but this seems to be not the case.
  5. This does not seem to fix the lag I'm experiencing. For input, I'm using a combination of Raw Input for the mouse along with the keyboard messages from the windows msg queue. Edit: It seems that creating the directx device with D3DCREATE_SOFTWARE_VERTEXPROCESSING, tends to reduce the input lag. Interesting...
  6. I have vsync enabled in my game. In windowed mode, input lag seems to be much less than compared to fullscreen mode. I've tried to pinpoint where this input lag is coming from while in fullscreen, but I just don't know where to look anymore.   This is my windows message loop:   do { MSG msg; while(PeekMessage(&msg,0,0,0,PM_REMOVE) > 0) { if(msg.message == WM_QUIT) { return false; } TranslateMessage( &msg ); DispatchMessage( &msg ); } if(m_bPaused) { Sleep(20); } } while(m_bPaused); return true;     And this is how I init directx 9:   D3DPRESENT_PARAMETERS m_D3DParameters; m_D3DParameters.BackBufferWidth = width; m_D3DParameters.BackBufferHeight = height; m_D3DParameters.BackBufferFormat = D3DFMT_X8R8G8B8; m_D3DParameters.BackBufferCount = 1; m_D3DParameters.MultiSampleType = D3DMULTISAMPLE_NONE; m_D3DParameters.MultiSampleQuality = 0; m_D3DParameters.SwapEffect = D3DSWAPEFFECT_DISCARD; m_D3DParameters.hDeviceWindow = windowHandle; m_D3DParameters.Windowed = false; m_D3DParameters.EnableAutoDepthStencil = true; m_D3DParameters.AutoDepthStencilFormat = D3DFMT_D24S8; m_D3DParameters.Flags = 0; m_D3DParameters.FullScreen_RefreshRateInHz = RefreshRate; m_D3DParameters.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;    
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!