Implement applyPrimitiveType for Renderer11.

TRAC #22153 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1532 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent a2f9fbe3
......@@ -473,10 +473,24 @@ bool Renderer11::setViewport(const gl::Rectangle &viewport, float zNear, float z
bool Renderer11::applyPrimitiveType(GLenum mode, GLsizei count)
{
// TODO
UNIMPLEMENTED();
mPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED;
return false;
switch (mode)
{
case GL_POINTS: mPrimitiveTopology = D3D11_PRIMITIVE_TOPOLOGY_POINTLIST; break;
case GL_LINES: mPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINELIST; break;
case GL_LINE_LOOP: UNIMPLEMENTED(); /* TODO */ break;
case GL_LINE_STRIP: mPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; break;
case GL_TRIANGLES: mPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; break;
case GL_TRIANGLE_STRIP: mPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; break;
case GL_TRIANGLE_FAN: UNIMPLEMENTED(); /* TODO */ break;
default:
return error(GL_INVALID_ENUM, false);
}
mVertexCount = count;
return count > 0;
}
bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer)
......
......@@ -192,6 +192,9 @@ class Renderer11 : public Renderer
float mCurNear;
float mCurFar;
D3D11_PRIMITIVE_TOPOLOGY mPrimitiveTopology;
UINT mVertexCount;
ID3D11Device *mDevice;
D3D_FEATURE_LEVEL mFeatureLevel;
ID3D11DeviceContext *mDeviceContext;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment