本文整理汇总了C++中GL_EXTCALL函数的典型用法代码示例。如果您正苦于以下问题:C++ GL_EXTCALL函数的具体用法?C++ GL_EXTCALL怎么用?C++ GL_EXTCALL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GL_EXTCALL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: wined3d_volume_download_data
/* Context activation is done by the caller. */
static void wined3d_volume_download_data(struct wined3d_volume *volume,
const struct wined3d_context *context, const struct wined3d_bo_address *data)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_format *format = volume->resource.format;
if (format->convert)
{
FIXME("Attempting to download a converted volume, format %s.\n",
debug_d3dformat(format->id));
return;
}
if (data->buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data->buffer_object));
checkGLcall("glBindBufferARB");
}
gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_3D, volume->texture_level,
format->glFormat, format->glType, data->addr);
checkGLcall("glGetTexImage");
if (data->buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0));
checkGLcall("glBindBufferARB");
}
}
开发者ID:alexwgo,项目名称:wine,代码行数:31,代码来源:volume.c
示例2: wined3d_volume_upload_data
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_bo_address *data)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_format *format = volume->resource.format;
TRACE("volume %p, context %p, level %u, format %s (%#x).\n",
volume, context, volume->texture_level, debug_d3dformat(format->id),
format->id);
if (data->buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, data->buffer_object));
checkGLcall("glBindBufferARB");
}
GL_EXTCALL(glTexSubImage3DEXT(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0,
volume->resource.width, volume->resource.height, volume->resource.depth,
format->glFormat, format->glType, data->addr));
checkGLcall("glTexSubImage3D");
if (data->buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("glBindBufferARB");
}
}
开发者ID:Kelimion,项目名称:wine,代码行数:29,代码来源:volume.c
示例3: wined3d_resource_release_map_ptr
void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context)
{
const struct wined3d_gl_info *gl_info;
switch (resource->map_binding)
{
case WINED3D_LOCATION_BUFFER:
gl_info = context->gl_info;
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, resource->map_buffer->name));
GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("Unmap GL buffer");
return;
case WINED3D_LOCATION_SYSMEM:
case WINED3D_LOCATION_DIB:
case WINED3D_LOCATION_USER_MEMORY:
return;
default:
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
return;
}
}
开发者ID:zalcyon,项目名称:wine,代码行数:25,代码来源:resource.c
示例4: wined3d_volume_unmap
HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
{
TRACE("volume %p.\n", volume);
if (!(volume->flags & WINED3D_VFLAG_LOCKED))
{
WARN("Trying to unlock unlocked volume %p.\n", volume);
return WINED3DERR_INVALIDCALL;
}
if (volume->flags & WINED3D_VFLAG_PBO)
{
struct wined3d_device *device = volume->resource.device;
struct wined3d_context *context = context_acquire(device, NULL);
const struct wined3d_gl_info *gl_info = context->gl_info;
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("Unmap PBO");
context_release(context);
}
volume->flags &= ~WINED3D_VFLAG_LOCKED;
return WINED3D_OK;
}
开发者ID:Kelimion,项目名称:wine,代码行数:28,代码来源:volume.c
示例5: swapchain_update_surface
void swapchain_update_surface(struct wined3d_swapchain *swapchain)
{
const struct wined3d_gl_info *gl_info = &swapchain->device->adapter->gl_info;
if (gl_info->supported[WGL_WINE_SURFACE])
{
HDC hdc;
if (swapchain->surface && !GL_EXTCALL(wglDestroySurfaceWINE(swapchain->surface)))
ERR("wglDestroySurfaceWINE failed to destroy surface %p\n", swapchain->surface);
if (swapchain->desc.windowed)
hdc = GetDC(swapchain->win_handle);
else
hdc = CreateDCW(swapchain->device->adapter->DeviceName, swapchain->device->adapter->DeviceName, NULL, NULL);
swapchain->surface = GL_EXTCALL(wglCreateSurfaceWINE(hdc, swapchain->win_handle));
if (!swapchain->surface)
WARN("wglCreateSurfaceWINE failed to create surface for window %p\n",
swapchain->desc.windowed ? swapchain->win_handle : NULL);
if (swapchain->desc.windowed)
ReleaseDC(swapchain->win_handle, hdc);
else
DeleteDC(hdc);
}
}
开发者ID:coreyoconnor,项目名称:wine,代码行数:26,代码来源:swapchain.c
示例6: wined3d_volume_unmap
HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
{
TRACE("volume %p.\n", volume);
if (!volume->resource.map_count)
{
WARN("Trying to unlock an unlocked volume %p.\n", volume);
return WINED3DERR_INVALIDCALL;
}
if (volume->resource.map_binding == WINED3D_LOCATION_BUFFER)
{
struct wined3d_device *device = volume->resource.device;
struct wined3d_context *context = context_acquire(device, NULL);
const struct wined3d_gl_info *gl_info = context->gl_info;
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("Unmap PBO");
context_release(context);
}
volume->resource.map_count--;
return WINED3D_OK;
}
开发者ID:karolherbst,项目名称:wine,代码行数:28,代码来源:volume.c
示例7: wined3d_timestamp_query_ops_get_data
static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
void *data, DWORD size, DWORD flags)
{
struct wined3d_timestamp_query *tq = query->extendedData;
struct wined3d_device *device = query->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_context *context;
GLuint available;
GLuint64 timestamp;
HRESULT res;
TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
if (!tq->context)
query->state = QUERY_CREATED;
if (query->state == QUERY_CREATED)
{
/* D3D allows GetData on a new query, OpenGL doesn't. So just invent the data ourselves. */
TRACE("Query wasn't yet started, returning S_OK.\n");
timestamp = 0;
fill_query_data(data, size, ×tamp, sizeof(timestamp));
return S_OK;
}
if (tq->context->tid != GetCurrentThreadId())
{
FIXME("%p Wrong thread, returning 1.\n", query);
timestamp = 1;
fill_query_data(data, size, ×tamp, sizeof(timestamp));
return S_OK;
}
context = context_acquire(query->device, tq->context->current_rt);
GL_EXTCALL(glGetQueryObjectuiv(tq->id, GL_QUERY_RESULT_AVAILABLE, &available));
checkGLcall("glGetQueryObjectuiv(GL_QUERY_RESULT_AVAILABLE)");
TRACE("available %#x.\n", available);
if (available)
{
if (size)
{
GL_EXTCALL(glGetQueryObjectui64v(tq->id, GL_QUERY_RESULT, ×tamp));
checkGLcall("glGetQueryObjectui64v(GL_QUERY_RESULT)");
TRACE("Returning timestamp %s.\n", wine_dbgstr_longlong(timestamp));
fill_query_data(data, size, ×tamp, sizeof(timestamp));
}
res = S_OK;
}
else
{
res = S_FALSE;
}
context_release(context);
return res;
}
开发者ID:kernelOfTruth,项目名称:wine,代码行数:59,代码来源:query.c
示例8: wined3d_volume_upload_data
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_texture *texture = volume->container;
const struct wined3d_format *format = texture->resource.format;
unsigned int width, height, depth;
const void *mem = data->addr;
void *converted_mem = NULL;
TRACE("volume %p, context %p, level %u, format %s (%#x).\n",
volume, context, volume->texture_level, debug_d3dformat(format->id),
format->id);
width = wined3d_texture_get_level_width(texture, volume->texture_level);
height = wined3d_texture_get_level_height(texture, volume->texture_level);
depth = wined3d_texture_get_level_depth(texture, volume->texture_level);
if (format->convert)
{
UINT dst_row_pitch, dst_slice_pitch;
UINT src_row_pitch, src_slice_pitch;
if (data->buffer_object)
ERR("Loading a converted volume from a PBO.\n");
if (texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS)
ERR("Converting a block-based format.\n");
dst_row_pitch = width * format->conv_byte_count;
dst_slice_pitch = dst_row_pitch * height;
wined3d_texture_get_pitch(texture, volume->texture_level, &src_row_pitch, &src_slice_pitch);
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
dst_row_pitch, dst_slice_pitch, width, height, depth);
mem = converted_mem;
}
if (data->buffer_object)
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, data->buffer_object));
checkGLcall("glBindBuffer");
}
GL_EXTCALL(glTexSubImage3D(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0,
width, height, depth,
format->glFormat, format->glType, mem));
checkGLcall("glTexSubImage3D");
if (data->buffer_object)
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("glBindBuffer");
}
HeapFree(GetProcessHeap(), 0, converted_mem);
}
开发者ID:kholia,项目名称:wine,代码行数:59,代码来源:volume.c
示例9: wined3d_volume_upload_data
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_bo_address *data)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_format *format = volume->resource.format;
UINT width = volume->resource.width;
UINT height = volume->resource.height;
UINT depth = volume->resource.depth;
BYTE *mem = data->addr;
TRACE("volume %p, context %p, level %u, format %s (%#x).\n",
volume, context, volume->texture_level, debug_d3dformat(format->id),
format->id);
if (format->convert)
{
UINT dst_row_pitch, dst_slice_pitch;
UINT src_row_pitch, src_slice_pitch;
UINT alignment = volume->resource.device->surface_alignment;
if (data->buffer_object)
ERR("Loading a converted volume from a PBO.\n");
if (format->flags & WINED3DFMT_FLAG_BLOCKS)
ERR("Converting a block-based format.\n");
dst_row_pitch = width * format->conv_byte_count;
dst_row_pitch = (dst_row_pitch + alignment - 1) & ~(alignment - 1);
dst_slice_pitch = dst_row_pitch * height;
wined3d_volume_get_pitch(volume, &src_row_pitch, &src_slice_pitch);
mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
format->convert(data->addr, mem, src_row_pitch, src_slice_pitch,
dst_row_pitch, dst_slice_pitch, width, height, depth);
}
if (data->buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, data->buffer_object));
checkGLcall("glBindBufferARB");
}
GL_EXTCALL(glTexSubImage3DEXT(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0,
width, height, depth,
format->glFormat, format->glType, mem));
checkGLcall("glTexSubImage3D");
if (data->buffer_object)
{
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("glBindBufferARB");
}
if (mem != data->addr)
HeapFree(GetProcessHeap(), 0, mem);
}
开发者ID:alexwgo,项目名称:wine,代码行数:57,代码来源:volume.c
示例10: wined3d_event_query_issue
void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDeviceImpl *device)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
if (query->context)
{
if (!query->context->gl_info->supported[ARB_SYNC] && query->context->tid != GetCurrentThreadId())
{
#ifdef VBOX_WINE_WITH_SINGLE_CONTEXT
ERR("unexpected\n");
#endif
context_free_event_query(query);
context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
context_alloc_event_query(context, query);
}
else
{
context = context_acquire(device, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
}
}
else
{
context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
context_alloc_event_query(context, query);
}
gl_info = context->gl_info;
ENTER_GL();
if (gl_info->supported[ARB_SYNC])
{
if (query->object.sync) GL_EXTCALL(glDeleteSync(query->object.sync));
checkGLcall("glDeleteSync");
query->object.sync = GL_EXTCALL(glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0));
checkGLcall("glFenceSync");
}
else if (gl_info->supported[APPLE_FENCE])
{
GL_EXTCALL(glSetFenceAPPLE(query->object.id));
checkGLcall("glSetFenceAPPLE");
}
else if (gl_info->supported[NV_FENCE])
{
GL_EXTCALL(glSetFenceNV(query->object.id, GL_ALL_COMPLETED_NV));
checkGLcall("glSetFenceNV");
}
LEAVE_GL();
context_release(context);
}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:53,代码来源:query.c
示例11: wined3d_volume_prepare_pbo
/* Context activation is done by the caller. */
static void wined3d_volume_prepare_pbo(struct wined3d_volume *volume, struct wined3d_context *context)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
if (volume->pbo)
return;
GL_EXTCALL(glGenBuffersARB(1, &volume->pbo));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.size, NULL, GL_STREAM_DRAW_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("Create PBO");
TRACE("Created PBO %u for volume %p.\n", volume->pbo, volume);
}
开发者ID:Kelimion,项目名称:wine,代码行数:16,代码来源:volume.c
示例12: wined3d_volume_allocate_texture
/* Context activation is done by the caller. */
static void wined3d_volume_allocate_texture(struct wined3d_volume *volume,
const struct wined3d_context *context, BOOL srgb)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_format *format = volume->resource.format;
void *mem = NULL;
if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert
&& volume_prepare_system_memory(volume))
{
TRACE("Enabling GL_UNPACK_CLIENT_STORAGE_APPLE for volume %p\n", volume);
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)");
mem = volume->resource.heap_memory;
volume->flags |= WINED3D_VFLAG_CLIENT_STORAGE;
}
GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, volume->texture_level,
srgb ? format->glGammaInternal : format->glInternal,
volume->resource.width, volume->resource.height, volume->resource.depth,
0, format->glFormat, format->glType, mem));
checkGLcall("glTexImage3D");
if (mem)
{
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)");
}
}
开发者ID:alexwgo,项目名称:wine,代码行数:30,代码来源:volume.c
示例13: wined3d_unordered_access_view_set_counter
void wined3d_unordered_access_view_set_counter(struct wined3d_unordered_access_view *view,
unsigned int value)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
if (!view->counter_bo)
return;
context = context_acquire(view->resource->device, NULL, 0);
gl_info = context->gl_info;
GL_EXTCALL(glBindBuffer(GL_ATOMIC_COUNTER_BUFFER, view->counter_bo));
GL_EXTCALL(glBufferSubData(GL_ATOMIC_COUNTER_BUFFER, 0, sizeof(value), &value));
checkGLcall("set atomic counter");
context_release(context);
}
开发者ID:Moteesh,项目名称:reactos,代码行数:16,代码来源:view.c
示例14: wined3d_shader_resource_view_create_texture_view
static void wined3d_shader_resource_view_create_texture_view(struct wined3d_shader_resource_view *view,
const struct wined3d_shader_resource_view_desc *desc, struct wined3d_texture *texture,
const struct wined3d_format *view_format)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
struct gl_texture *gl_texture;
context = context_acquire(texture->resource.device, NULL);
gl_info = context->gl_info;
if (!gl_info->supported[ARB_TEXTURE_VIEW])
{
context_release(context);
FIXME("OpenGL implementation does not support texture views.\n");
return;
}
wined3d_texture_prepare_texture(texture, context, FALSE);
gl_texture = wined3d_texture_get_gl_texture(texture, FALSE);
gl_info->gl_ops.gl.p_glGenTextures(1, &view->object);
GL_EXTCALL(glTextureView(view->object, view->target, gl_texture->name, view_format->glInternal,
desc->u.texture.level_idx, desc->u.texture.level_count,
desc->u.texture.layer_idx, desc->u.texture.layer_count));
checkGLcall("Create texture view");
context_release(context);
}
开发者ID:vindo-app,项目名称:wine,代码行数:29,代码来源:view.c
示例15: IWineD3DVolumeImpl_LoadTexture
static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_level) {
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
const PixelFormatDesc *formatEntry = getFormatDescEntry(This->resource.format);
if(GL_SUPPORT(EXT_TEXTURE3D)) {
TRACE("Calling glTexImage3D %x level=%d, intfmt=%x, w=%d, h=%d,d=%d, 0=%d, glFmt=%x, glType=%x, Mem=%p\n",
GL_TEXTURE_3D,
gl_level,
formatEntry->glInternal,
This->currentDesc.Width,
This->currentDesc.Height,
This->currentDesc.Depth,
0,
formatEntry->glFormat,
formatEntry->glType,
This->resource.allocatedMemory);
GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D,
gl_level,
formatEntry->glInternal,
This->currentDesc.Width,
This->currentDesc.Height,
This->currentDesc.Depth,
0,
formatEntry->glFormat,
formatEntry->glType,
This->resource.allocatedMemory));
checkGLcall("glTexImage3D");
} else
WARN("This OpenGL implementation doesn't support 3D textures\n");
return WINED3D_OK;
}
开发者ID:howard5888,项目名称:wineT,代码行数:33,代码来源:volume.c
示例16: wined3d_unordered_access_view_cs_init
static void wined3d_unordered_access_view_cs_init(void *object)
{
struct wined3d_unordered_access_view *view = object;
struct wined3d_resource *resource = view->resource;
struct wined3d_view_desc *desc = &view->desc;
const struct wined3d_gl_info *gl_info;
gl_info = &resource->device->adapter->gl_info;
if (resource->type == WINED3D_RTYPE_BUFFER)
{
struct wined3d_buffer *buffer = buffer_from_resource(resource);
struct wined3d_context *context;
context = context_acquire(resource->device, NULL, 0);
gl_info = context->gl_info;
create_buffer_view(&view->gl_view, context, desc, buffer, view->format);
if (desc->flags & (WINED3D_VIEW_BUFFER_COUNTER | WINED3D_VIEW_BUFFER_APPEND))
{
static const GLuint initial_value = 0;
GL_EXTCALL(glGenBuffers(1, &view->counter_bo));
GL_EXTCALL(glBindBuffer(GL_ATOMIC_COUNTER_BUFFER, view->counter_bo));
GL_EXTCALL(glBufferData(GL_ATOMIC_COUNTER_BUFFER,
sizeof(initial_value), &initial_value, GL_STATIC_DRAW));
checkGLcall("create atomic counter buffer");
}
context_release(context);
}
else
{
struct wined3d_texture *texture = texture_from_resource(resource);
unsigned int depth_or_layer_count;
if (resource->type == WINED3D_RTYPE_TEXTURE_3D)
depth_or_layer_count = wined3d_texture_get_level_depth(texture, desc->u.texture.level_idx);
else
depth_or_layer_count = texture->layer_count;
if (desc->u.texture.layer_idx || desc->u.texture.layer_count != depth_or_layer_count)
{
create_texture_view(&view->gl_view, get_texture_view_target(gl_info, desc, texture),
desc, texture, view->format);
}
}
wined3d_resource_release(resource);
}
开发者ID:Moteesh,项目名称:reactos,代码行数:47,代码来源:view.c
示例17: wined3d_event_query_issue
void wined3d_event_query_issue(struct wined3d_event_query *query, const struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
if (query->context)
{
if (!query->context->gl_info->supported[ARB_SYNC] && query->context->tid != GetCurrentThreadId())
{
context_free_event_query(query);
context = context_acquire(device, NULL);
context_alloc_event_query(context, query);
}
else
{
context = context_acquire(device, query->context->current_rt);
}
}
else
{
context = context_acquire(device, NULL);
context_alloc_event_query(context, query);
}
gl_info = context->gl_info;
if (gl_info->supported[ARB_SYNC])
{
if (query->object.sync) GL_EXTCALL(glDeleteSync(query->object.sync));
checkGLcall("glDeleteSync");
query->object.sync = GL_EXTCALL(glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0));
checkGLcall("glFenceSync");
}
else if (gl_info->supported[APPLE_FENCE])
{
GL_EXTCALL(glSetFenceAPPLE(query->object.id));
checkGLcall("glSetFenceAPPLE");
}
else if (gl_info->supported[NV_FENCE])
{
GL_EXTCALL(glSetFenceNV(query->object.id, GL_ALL_COMPLETED_NV));
checkGLcall("glSetFenceNV");
}
context_release(context);
}
开发者ID:pombredanne,项目名称:wine,代码行数:46,代码来源:query.c
示例18: wined3d_sampler_destroy
void wined3d_sampler_destroy(struct wined3d_sampler *sampler)
{
struct wined3d_context *context = context_acquire(sampler->device, NULL);
const struct wined3d_gl_info *gl_info = context->gl_info;
GL_EXTCALL(glDeleteSamplers(1, &sampler->name));
context_release(context);
HeapFree(GetProcessHeap(), 0, sampler);
}
开发者ID:grandhuit,项目名称:wine-patched,代码行数:10,代码来源:sampler.c
示例19: switch
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context, DWORD flags)
{
const struct wined3d_gl_info *gl_info;
BYTE *ptr;
switch (resource->map_binding)
{
case WINED3D_LOCATION_BUFFER:
gl_info = context->gl_info;
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, resource->map_buffer->name));
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
{
GLbitfield mapflags = wined3d_resource_gl_map_flags(flags);
mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT;
ptr = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER,
0, resource->size, mapflags));
}
else
{
GLenum access = wined3d_resource_gl_legacy_map_flags(flags);
ptr = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, access));
}
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
checkGLcall("Map GL buffer");
return ptr;
case WINED3D_LOCATION_SYSMEM:
return resource->map_heap_memory;
case WINED3D_LOCATION_DIB:
return resource->bitmap_data;
case WINED3D_LOCATION_USER_MEMORY:
return resource->user_memory;
default:
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
return NULL;
}
}
开发者ID:zalcyon,项目名称:wine,代码行数:43,代码来源:resource.c
示例20: wined3d_volume_free_pbo
static void wined3d_volume_free_pbo(struct wined3d_volume *volume)
{
struct wined3d_context *context = context_acquire(volume->resource.device, NULL);
const struct wined3d_gl_info *gl_info = context->gl_info;
TRACE("Deleting PBO %u belonging to volume %p.\n", volume->pbo, volume);
GL_EXTCALL(glDeleteBuffersARB(1, &volume->pbo));
checkGLcall("glDeleteBuffersARB");
volume->pbo = 0;
context_release(context);
}
开发者ID:Kelimion,项目名称:wine,代码行数:11,代码来源:volume.c
注:本文中的GL_EXTCALL函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论