Jump to content

  • Log In with Google      Sign In   
  • Create Account

f12dude

Member Since 13 Jan 2013
Offline Last Active Private

Posts I've Made

In Topic: Texture Coordinates Problem

25 March 2013 - 03:29 PM

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);

 

 

 

23r1lb7.jpg


In Topic: Texture Coordinates Problem

25 March 2013 - 01:26 PM

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));

In Topic: Texture Coordinates Problem

25 March 2013 - 10:52 AM

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.

 

wu1gsm.png


In Topic: Vsync lag in DirectX 9 Fullscreen

14 January 2013 - 12:51 AM

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...

PARTNERS