swrast: Set RowStride, remove Viewport hook
This commit is contained in:
parent
ca55f49062
commit
1044ebb29c
@ -115,7 +115,6 @@ MesaSoftwareRenderer::MesaSoftwareRenderer(BGLView* view, ulong options,
|
|||||||
functions.UpdateState = _UpdateState;
|
functions.UpdateState = _UpdateState;
|
||||||
functions.GetBufferSize = NULL;
|
functions.GetBufferSize = NULL;
|
||||||
functions.Error = _Error;
|
functions.Error = _Error;
|
||||||
functions.Viewport = _Viewport;
|
|
||||||
functions.Flush = _Flush;
|
functions.Flush = _Flush;
|
||||||
|
|
||||||
// create core context
|
// create core context
|
||||||
@ -495,23 +494,6 @@ MesaSoftwareRenderer::_GetString(gl_context* ctx, GLenum name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
MesaSoftwareRenderer::_Viewport(gl_context* ctx, GLint x, GLint y, GLsizei w,
|
|
||||||
GLsizei h)
|
|
||||||
{
|
|
||||||
CALLED();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
//gl_framebuffer* draw = ctx->WinSysDrawBuffer;
|
|
||||||
//gl_framebuffer* read = ctx->WinSysReadBuffer;
|
|
||||||
|
|
||||||
//struct swrast_renderbuffer* msr = haikuFrameBuffer(draw);
|
|
||||||
|
|
||||||
//_mesa_resize_framebuffer(ctx, draw, msr->width, msr->height);
|
|
||||||
//_mesa_resize_framebuffer(ctx, read, msr->width, msr->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MesaSoftwareRenderer::_UpdateState(gl_context* ctx, GLuint new_state)
|
MesaSoftwareRenderer::_UpdateState(gl_context* ctx, GLuint new_state)
|
||||||
{
|
{
|
||||||
@ -536,6 +518,9 @@ MesaSoftwareRenderer::_RenderBufferStorage(gl_context* ctx,
|
|||||||
render->Width = width;
|
render->Width = width;
|
||||||
render->Height = height;
|
render->Height = height;
|
||||||
|
|
||||||
|
struct swrast_renderbuffer *swRenderBuffer = swrast_renderbuffer(render);
|
||||||
|
swRenderBuffer->RowStride = width * _mesa_get_format_bytes(render->Format);
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,7 +553,6 @@ MesaSoftwareRenderer::_NewRenderBuffer(bool front)
|
|||||||
|
|
||||||
_mesa_init_renderbuffer(&swRenderBuffer->Base, 0);
|
_mesa_init_renderbuffer(&swRenderBuffer->Base, 0);
|
||||||
|
|
||||||
//swRenderBuffer->Base.ClassID = OSMESA_RENDERBUFFER_CLASS;
|
|
||||||
swRenderBuffer->Base.RefCount = 1;
|
swRenderBuffer->Base.RefCount = 1;
|
||||||
swRenderBuffer->Base.Delete = _RenderBufferDelete;
|
swRenderBuffer->Base.Delete = _RenderBufferDelete;
|
||||||
swRenderBuffer->Base.AllocStorage = _RenderBufferStorage;
|
swRenderBuffer->Base.AllocStorage = _RenderBufferStorage;
|
||||||
|
@ -49,8 +49,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
static void _Error(gl_context* ctx);
|
static void _Error(gl_context* ctx);
|
||||||
static const GLubyte* _GetString(gl_context* ctx, GLenum name);
|
static const GLubyte* _GetString(gl_context* ctx, GLenum name);
|
||||||
static void _Viewport(gl_context* ctx, GLint x, GLint y,
|
|
||||||
GLsizei w, GLsizei h);
|
|
||||||
void _CheckResize();
|
void _CheckResize();
|
||||||
static void _UpdateState(gl_context* ctx, GLuint newState);
|
static void _UpdateState(gl_context* ctx, GLuint newState);
|
||||||
static void _Flush(gl_context *ctx);
|
static void _Flush(gl_context *ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user