Home | History | Annotate | Download | only in osmesa

Lines Matching full:osmesa

45  * In general, the OSMesa interface is pretty ugly and not a good match
53 #include "GL/osmesa.h"
120 * We have to do this to be compatible with the original OSMesa implementation
311 OSMesaContext osmesa = OSMesaGetCurrentContext();
322 if (osmesa->pp) {
341 pp_run(osmesa->pp, res, res, zsbuf);
355 if (osmesa->user_row_length)
356 dst_stride = bpp * osmesa->user_row_length;
361 if (osmesa->y_up) {
571 OSMesaContext osmesa;
646 osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context);
647 if (!osmesa)
652 osmesa->accum_format = PIPE_FORMAT_R16G16B16A16_SNORM;
655 osmesa->depth_stencil_format = PIPE_FORMAT_Z24_UNORM_S8_UINT;
658 osmesa->depth_stencil_format = PIPE_FORMAT_S8_UINT;
661 osmesa->depth_stencil_format = PIPE_FORMAT_Z24X8_UNORM;
664 osmesa->depth_stencil_format = PIPE_FORMAT_Z16_UNORM;
685 osmesa->depth_stencil_format,
686 osmesa->accum_format);
688 osmesa->stctx = stapi->create_context(stapi, get_st_manager(),
690 if (!osmesa->stctx) {
691 FREE(osmesa);
695 osmesa->stctx->st_manager_private = osmesa;
697 osmesa->format = format;
698 osmesa->user_row_length = 0;
699 osmesa->y_up = GL_TRUE;
701 return osmesa;
709 * \param osmesa the context to destroy
712 OSMesaDestroyContext(OSMesaContext osmesa)
714 if (osmesa) {
715 pp_free(osmesa->pp);
716 osmesa->stctx->destroy(osmesa->stctx);
717 FREE(osmesa);
735 * Input: osmesa - the rendering context
741 * Return: GL_TRUE if success, GL_FALSE if error because of invalid osmesa,
745 OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type,
752 if (!osmesa || !buffer || width < 1 || height < 1) {
756 if (osmesa->format == OSMESA_RGB_565 && type != GL_UNSIGNED_SHORT_5_6_5) {
760 color_format = osmesa_choose_format(osmesa->format, type);
768 osmesa->depth_stencil_format,
769 osmesa->accum_format, width, height);
773 osmesa->depth_stencil_format,
774 osmesa->accum_format);
784 osmesa->current_buffer = osbuffer;
785 osmesa->type = type;
787 stapi->make_current(stapi, osmesa->stctx, osbuffer->stfb, osbuffer->stfb);
789 if (!osmesa->ever_used) {
794 for (i = 0; i < ARRAY_SIZE(osmesa->pp_enabled); i++) {
795 if (osmesa->pp_enabled[i]) {
802 osmesa->pp = pp_init(osmesa->stctx->pipe,
803 osmesa->pp_enabled,
804 osmesa->stctx->cso_context);
806 pp_init_fbos(osmesa->pp, width, height);
809 osmesa->ever_used = TRUE;
830 OSMesaContext osmesa = OSMesaGetCurrentContext();
834 osmesa->user_row_length = value;
837 osmesa->y_up = value ? GL_TRUE : GL_FALSE;
849 OSMesaContext osmesa = OSMesaGetCurrentContext();
850 struct osmesa_buffer *osbuffer = osmesa ? osmesa->current_buffer : NULL;
860 *value = osmesa->format;
864 *value = osmesa->type;
867 *value = osmesa->user_row_length;
870 *value = osmesa->y_up;
890 * Return information about the depth buffer associated with an OSMesa context.
891 * Input: c - the OSMesa context
935 * Return the color buffer associated with an OSMesa context.
936 * Input: c - the OSMesa context
943 OSMesaGetColorBuffer(OSMesaContext osmesa, GLint *width,
946 struct osmesa_buffer *osbuffer = osmesa->current_buffer;
951 *format = osmesa->format;
1012 OSMesaPostprocess(OSMesaContext osmesa, const char *filter,
1015 if (!osmesa->ever_used) {
1023 osmesa->pp_enabled[i] = enable_value;