* Alexander von Gluck IV, kallisti5@unixzen.com
*/
+#include "hgl_context.h"
-#include "GLView.h"
+#include <stdio.h>
#include "pipe/p_format.h"
#include "util/u_atomic.h"
#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
+#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */
-#include "hgl_context.h"
+#include "GLView.h"
#ifdef DEBUG
// Perform a safe void to hgl_context cast
-static INLINE struct hgl_context*
+static inline struct hgl_context*
hgl_st_context(struct st_context_iface *stctxi)
{
struct hgl_context* context;
// Perform a safe void to hgl_buffer cast
-static INLINE struct hgl_buffer*
+static inline struct hgl_buffer*
hgl_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
struct hgl_buffer* buffer;
#if 0
struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
- pipe_mutex_lock(stwfb->fb->mutex);
+ mtx_lock(&stwfb->fb->mutex);
struct pipe_resource* resource = textures[statt];
if (resource)
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_resource_reference(&buffer->textures[i], NULL);
}
-
+
memset(&templat, 0, sizeof(templat));
templat.target = buffer->target;
templat.width0 = width;
//}
}
- for (i = 0; i < count; i++) {
- out[i] = NULL;
+ for (i = 0; i < count; i++)
pipe_resource_reference(&out[i], buffer->textures[statts[i]]);
- }
return TRUE;
}
}
+struct st_api*
+hgl_create_st_api()
+{
+ CALLED();
+ return st_gl_api_create();
+}
+
+
struct st_manager *
hgl_create_st_manager(struct hgl_context* context)
{