fill in the texture_setimage function, fill in a few other functions, and change certain names to be a little more consistent
This commit is contained in:
@@ -133,7 +133,7 @@ EXPORT void texture_destroy(texture_t tex);
|
||||
EXPORT uint32_t texture_getwidth(texture_t tex);
|
||||
EXPORT uint32_t texture_getheight(texture_t tex);
|
||||
EXPORT enum gs_color_format texture_getcolorformat(texture_t tex);
|
||||
EXPORT bool texture_map(texture_t tex, void **ptr, uint32_t *byte_width);
|
||||
EXPORT bool texture_map(texture_t tex, void **ptr, uint32_t *row_bytes);
|
||||
EXPORT void texture_unmap(texture_t tex);
|
||||
|
||||
EXPORT void cubetexture_destroy(texture_t cubetex);
|
||||
@@ -151,7 +151,7 @@ EXPORT uint32_t stagesurface_getwidth(stagesurf_t stagesurf);
|
||||
EXPORT uint32_t stagesurface_getheight(stagesurf_t stagesurf);
|
||||
EXPORT enum gs_color_format stagesurface_getcolorformat(stagesurf_t stagesurf);
|
||||
EXPORT bool stagesurface_map(stagesurf_t stagesurf, const void **data,
|
||||
uint32_t *byte_width);
|
||||
uint32_t *row_bytes);
|
||||
EXPORT void stagesurface_unmap(stagesurf_t stagesurf);
|
||||
|
||||
EXPORT void zstencil_destroy(zstencil_t zstencil);
|
||||
|
@@ -1438,7 +1438,7 @@ enum gs_color_format texture_getcolorformat(texture_t tex)
|
||||
return static_cast<gs_texture_2d*>(tex)->format;
|
||||
}
|
||||
|
||||
bool texture_map(texture_t tex, void **ptr, uint32_t *byte_width)
|
||||
bool texture_map(texture_t tex, void **ptr, uint32_t *row_bytes)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1454,7 +1454,7 @@ bool texture_map(texture_t tex, void **ptr, uint32_t *byte_width)
|
||||
return false;
|
||||
|
||||
*ptr = map.pData;
|
||||
*byte_width = map.RowPitch;
|
||||
*row_bytes = map.RowPitch;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1543,7 +1543,7 @@ enum gs_color_format stagesurface_getcolorformat(stagesurf_t stagesurf)
|
||||
}
|
||||
|
||||
bool stagesurface_map(stagesurf_t stagesurf, const void **data,
|
||||
uint32_t *byte_width)
|
||||
uint32_t *row_bytes)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE map;
|
||||
if (FAILED(stagesurf->device->context->Map(stagesurf->texture, 0,
|
||||
@@ -1551,7 +1551,7 @@ bool stagesurface_map(stagesurf_t stagesurf, const void **data,
|
||||
return false;
|
||||
|
||||
*data = map.pData;
|
||||
*byte_width = map.RowPitch;
|
||||
*row_bytes = map.RowPitch;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user