draw(type, 0, primitiveCount);
}
- void Device::setPixelShader(PixelShader *pixelShader)
+ void Device::setPixelShader(const PixelShader *pixelShader)
{
this->pixelShader = pixelShader;
pixelShaderDirty = true;
scissorRect = rect;
}
- void Device::setVertexShader(VertexShader *vertexShader)
+ void Device::setVertexShader(const VertexShader *vertexShader)
{
this->vertexShader = vertexShader;
vertexShaderDirty = true;
egl::Image *createRenderTarget(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool lockable);
void drawIndexedPrimitive(sw::DrawType type, unsigned int indexOffset, unsigned int primitiveCount);
void drawPrimitive(sw::DrawType type, unsigned int primiveCount);
- void setPixelShader(sw::PixelShader *shader);
+ void setPixelShader(const sw::PixelShader *shader);
void setPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count);
void setScissorEnable(bool enable);
void setRenderTarget(int index, egl::Image *renderTarget);
void setDepthBuffer(egl::Image *depthBuffer);
void setStencilBuffer(egl::Image *stencilBuffer);
void setScissorRect(const sw::Rect &rect);
- void setVertexShader(sw::VertexShader *shader);
+ void setVertexShader(const sw::VertexShader *shader);
void setVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count);
void setViewport(const Viewport &viewport);
sw::Rect scissorRect;
bool scissorEnable;
- sw::PixelShader *pixelShader;
- sw::VertexShader *vertexShader;
+ const sw::PixelShader *pixelShader;
+ const sw::VertexShader *vertexShader;
bool pixelShaderDirty;
unsigned int pixelShaderConstantsFDirty;
loadConstants(shader);
}
- void Renderer::setPixelShaderConstantF(int index, const float value[4], int count)
+ void Renderer::setPixelShaderConstantF(unsigned int index, const float value[4], unsigned int count)
{
- for(int i = 0; i < DRAW_COUNT; i++)
+ for(unsigned int i = 0; i < DRAW_COUNT; i++)
{
if(drawCall[i]->psDirtyConstF < index + count)
{
}
}
- for(int i = 0; i < count; i++)
+ for(unsigned int i = 0; i < count; i++)
{
PixelProcessor::setFloatConstant(index + i, value);
value += 4;
}
}
- void Renderer::setPixelShaderConstantI(int index, const int value[4], int count)
+ void Renderer::setPixelShaderConstantI(unsigned int index, const int value[4], unsigned int count)
{
- for(int i = 0; i < DRAW_COUNT; i++)
+ for(unsigned int i = 0; i < DRAW_COUNT; i++)
{
if(drawCall[i]->psDirtyConstI < index + count)
{
}
}
- for(int i = 0; i < count; i++)
+ for(unsigned int i = 0; i < count; i++)
{
PixelProcessor::setIntegerConstant(index + i, value);
value += 4;
}
}
- void Renderer::setPixelShaderConstantB(int index, const int *boolean, int count)
+ void Renderer::setPixelShaderConstantB(unsigned int index, const int *boolean, unsigned int count)
{
- for(int i = 0; i < DRAW_COUNT; i++)
+ for(unsigned int i = 0; i < DRAW_COUNT; i++)
{
if(drawCall[i]->psDirtyConstB < index + count)
{
}
}
- for(int i = 0; i < count; i++)
+ for(unsigned int i = 0; i < count; i++)
{
PixelProcessor::setBooleanConstant(index + i, *boolean);
boolean++;
}
}
- void Renderer::setVertexShaderConstantF(int index, const float value[4], int count)
+ void Renderer::setVertexShaderConstantF(unsigned int index, const float value[4], unsigned int count)
{
- for(int i = 0; i < DRAW_COUNT; i++)
+ for(unsigned int i = 0; i < DRAW_COUNT; i++)
{
if(drawCall[i]->vsDirtyConstF < index + count)
{
}
}
- for(int i = 0; i < count; i++)
+ for(unsigned int i = 0; i < count; i++)
{
VertexProcessor::setFloatConstant(index + i, value);
value += 4;
}
}
- void Renderer::setVertexShaderConstantI(int index, const int value[4], int count)
+ void Renderer::setVertexShaderConstantI(unsigned int index, const int value[4], unsigned int count)
{
- for(int i = 0; i < DRAW_COUNT; i++)
+ for(unsigned int i = 0; i < DRAW_COUNT; i++)
{
if(drawCall[i]->vsDirtyConstI < index + count)
{
}
}
- for(int i = 0; i < count; i++)
+ for(unsigned int i = 0; i < count; i++)
{
VertexProcessor::setIntegerConstant(index + i, value);
value += 4;
}
}
- void Renderer::setVertexShaderConstantB(int index, const int *boolean, int count)
+ void Renderer::setVertexShaderConstantB(unsigned int index, const int *boolean, unsigned int count)
{
- for(int i = 0; i < DRAW_COUNT; i++)
+ for(unsigned int i = 0; i < DRAW_COUNT; i++)
{
if(drawCall[i]->vsDirtyConstB < index + count)
{
}
}
- for(int i = 0; i < count; i++)
+ for(unsigned int i = 0; i < count; i++)
{
VertexProcessor::setBooleanConstant(index + i, *boolean);
boolean++;
Resource* vUniformBuffers[MAX_UNIFORM_BUFFER_BINDINGS];
Resource* transformFeedbackBuffers[MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS];
- int vsDirtyConstF;
- int vsDirtyConstI;
- int vsDirtyConstB;
+ unsigned int vsDirtyConstF;
+ unsigned int vsDirtyConstI;
+ unsigned int vsDirtyConstB;
- int psDirtyConstF;
- int psDirtyConstI;
- int psDirtyConstB;
+ unsigned int psDirtyConstF;
+ unsigned int psDirtyConstI;
+ unsigned int psDirtyConstB;
std::list<Query*> *queries;
void setPixelShader(const PixelShader *shader);
void setVertexShader(const VertexShader *shader);
- void setPixelShaderConstantF(int index, const float value[4], int count = 1);
- void setPixelShaderConstantI(int index, const int value[4], int count = 1);
- void setPixelShaderConstantB(int index, const int *boolean, int count = 1);
+ void setPixelShaderConstantF(unsigned int index, const float value[4], unsigned int count = 1);
+ void setPixelShaderConstantI(unsigned int index, const int value[4], unsigned int count = 1);
+ void setPixelShaderConstantB(unsigned int index, const int *boolean, unsigned int count = 1);
- void setVertexShaderConstantF(int index, const float value[4], int count = 1);
- void setVertexShaderConstantI(int index, const int value[4], int count = 1);
- void setVertexShaderConstantB(int index, const int *boolean, int count = 1);
+ void setVertexShaderConstantF(unsigned int index, const float value[4], unsigned int count = 1);
+ void setVertexShaderConstantI(unsigned int index, const int value[4], unsigned int count = 1);
+ void setVertexShaderConstantB(unsigned int index, const int *boolean, unsigned int count = 1);
// Viewport & Clipper
void setViewport(const Viewport &viewport);