예제 #1
0
파일: student.c 프로젝트: v-bayer/bcFIT
void studrenClearBuffers(S_Renderer *pRenderer)
{
    S_StudentRenderer   * renderer;

	int minus = -1;

    IZG_ASSERT(pRenderer);

    /* ukazatel na studentsky renderer */
    renderer = (S_StudentRenderer *)pRenderer;

    /* vymazeme a inicializujeme buffery */
    /* ??? */


	for (int i = 0; i < renderer->base.frame_h * renderer->base.frame_w; i++)
	{
		vecSet(renderer->vecHeadBuff, i, &minus);
	}

	renderer->vecNodeBuff = fragvecCreateEmpty();

    /* zavolame take puvodni funkci */
    renClearBuffers(pRenderer);
}
예제 #2
0
void studrenCreateBuffers(S_Renderer *pRenderer, int width, int height)
{
    S_StudentRenderer   * renderer;

    IZG_ASSERT(pRenderer && width > 0 && height > 0);

    /* ukazatel na studentsky renderer */
    renderer = (S_StudentRenderer *)pRenderer;

    /* alokace pameti pro buffery a vymazani obsahu bufferu */
    renderer->nBuffer = fragvecCreateEmpty();
    renderer->hBuffer = (int *)realloc(pRenderer->frame_buffer, width * height * sizeof(int));
    memset(renderer->hBuffer, -1, width * height * sizeof(int));

    /* zavolame take puvodni funkci */
    renCreateBuffers(pRenderer, width, height);
}
예제 #3
0
파일: student.c 프로젝트: v-bayer/bcFIT
void studrenCreateBuffers(S_Renderer *pRenderer, int width, int height)
{
    S_StudentRenderer   * renderer;

    IZG_ASSERT(pRenderer && width > 0 && height > 0);

    /* ukazatel na studentsky renderer */
    renderer = (S_StudentRenderer *)pRenderer;

    /* alokace pameti pro buffery a vymazani obsahu bufferu */
    /* ??? */

	renderer->vecHeadBuff = vecCreate(width * height, sizeof(int));
	renderer->vecNodeBuff = fragvecCreateEmpty();

    /* zavolame take puvodni funkci */
    renCreateBuffers(pRenderer, width, height);
}