Skip to content

Commit

Permalink
Refactor|Texture: Dumped Texture's now redundant C wrapper API
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Dec 23, 2012
1 parent b91988f commit 883476d
Show file tree
Hide file tree
Showing 13 changed files with 204 additions and 350 deletions.
16 changes: 8 additions & 8 deletions doomsday/engine/include/gl/gl_texmanager.h
Expand Up @@ -129,7 +129,7 @@ void GL_ReleaseTexturesByScheme(char const *schemeName);
* Release all textures associated with the specified @a texture.
* @param texture Logical Texture. Can be @c NULL, in which case this is a null-op.
*/
void GL_ReleaseGLTexturesByTexture(Texture *texture);
void GL_ReleaseGLTexturesByTexture(struct texture_s *texture);

/**
* Release all textures associated with the specified variant @a texture.
Expand All @@ -142,7 +142,7 @@ void GL_ReleaseVariantTexture(struct texturevariant_s *texture);
* @param texture Logical Texture to process. Can be @c NULL, in which case this is a null-op.
* @param spec Specification to match. Comparision mode is exact and not fuzzy.
*/
void GL_ReleaseVariantTexturesBySpec(Texture *tex, texturevariantspecification_t *spec);
void GL_ReleaseVariantTexturesBySpec(struct texture_s *tex, texturevariantspecification_t *spec);

/// Release all textures associated with the identified colorpalette @a paletteId.
void GL_ReleaseTexturesByColorPalette(colorpaletteid_t paletteId);
Expand Down Expand Up @@ -262,14 +262,14 @@ typedef enum {
*
* @return GL-name of the prepared texture if successful else @c 0
*/
DGLuint GL_PrepareTexture2(Texture *tex, texturevariantspecification_t *spec, preparetextureresult_t *returnOutcome);
DGLuint GL_PrepareTexture(Texture *tex, texturevariantspecification_t *spec/*, returnOutcome = 0 */);
DGLuint GL_PrepareTexture2(struct texture_s *tex, texturevariantspecification_t *spec, preparetextureresult_t *returnOutcome);
DGLuint GL_PrepareTexture(struct texture_s *tex, texturevariantspecification_t *spec/*, returnOutcome = 0 */);

/**
* Same as GL_PrepareTexture(2) except for visibility of TextureVariant.
*/
struct texturevariant_s *GL_PrepareTextureVariant2(Texture *tex, texturevariantspecification_t *spec, preparetextureresult_t *returnOutcome);
struct texturevariant_s *GL_PrepareTextureVariant(Texture *tex, texturevariantspecification_t *spec/*, returnOutcome = 0 */);
struct texturevariant_s *GL_PrepareTextureVariant2(struct texture_s *tex, texturevariantspecification_t *spec, preparetextureresult_t *returnOutcome);
struct texturevariant_s *GL_PrepareTextureVariant(struct texture_s *tex, texturevariantspecification_t *spec/*, returnOutcome = 0 */);

/**
* Bind this texture to the currently active texture unit.
Expand Down Expand Up @@ -310,8 +310,8 @@ DGLuint GL_PrepareLightmap(Uri const *path);
DGLuint GL_PrepareLSTexture(lightingtexid_t which);
DGLuint GL_PrepareRawTexture(rawtex_t *rawTex);

struct texturevariant_s *GL_PreparePatchTexture2(Texture *tex, int wrapS, int wrapT);
struct texturevariant_s *GL_PreparePatchTexture(Texture *tex);
struct texturevariant_s *GL_PreparePatchTexture2(struct texture_s *tex, int wrapS, int wrapT);
struct texturevariant_s *GL_PreparePatchTexture(struct texture_s *tex);

/**
* Attempt to locate and prepare a flare texture.
Expand Down
8 changes: 4 additions & 4 deletions doomsday/engine/include/render/r_draw.h
Expand Up @@ -39,11 +39,11 @@ void R_SetBorderGfx(Uri const *const *paths);
*/
void R_DrawViewBorder(void);

void R_DrawPatch(Texture *texture, int x, int y);
void R_DrawPatch2(Texture *texture, int x, int y, int w, int h);
void R_DrawPatch3(Texture *texture, int x, int y, int w, int h, boolean useOffsets);
void R_DrawPatch(struct texture_s *texture, int x, int y);
void R_DrawPatch2(struct texture_s *texture, int x, int y, int w, int h);
void R_DrawPatch3(struct texture_s *texture, int x, int y, int w, int h, boolean useOffsets);

void R_DrawPatchTiled(Texture *texture, int x, int y, int w, int h, int wrapS, int wrapT);
void R_DrawPatchTiled(struct texture_s *texture, int x, int y, int w, int h, int wrapS, int wrapT);

#ifdef __cplusplus
} // extern "C"
Expand Down
7 changes: 3 additions & 4 deletions doomsday/engine/include/resource/r_data.h
Expand Up @@ -26,9 +26,8 @@
#include "dd_def.h"
#include "thinker.h"
#include "def_data.h"
#include "textures.h"
#include "resource/textures.h"

struct texture_s;
struct font_s;

/**
Expand Down Expand Up @@ -87,8 +86,8 @@ AutoStr *R_ComposePatchPath(patchid_t id);
#endif

#ifdef __cplusplus
struct texture_s *R_DefineTexture(de::String schemeName, de::Uri const &resourceUri, QSize const &dimensions);
struct texture_s *R_DefineTexture(de::String schemeName, de::Uri const &resourceUri);
de::Texture *R_DefineTexture(de::String schemeName, de::Uri const &resourceUri, QSize const &dimensions);
de::Texture *R_DefineTexture(de::String schemeName, de::Uri const &resourceUri);
#endif

#endif /// LIBDENG_REFRESH_DATA_H

0 comments on commit 883476d

Please sign in to comment.