Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Dec 30, 2023
1 parent 4de8ba1 commit 1379514
Show file tree
Hide file tree
Showing 8 changed files with 699 additions and 100 deletions.
510 changes: 447 additions & 63 deletions Plugins/Renderer/gl_draw.cpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Plugins/Renderer/gl_draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct gl_loadtexture_state_s
filter = 0;
mipmap = false;

format = 0;
internalformat = 0;
compressed = false;
}

Expand All @@ -69,7 +69,7 @@ typedef struct gl_loadtexture_state_s
bool mipmap;

//Loader field
GLuint format;
GLuint internalformat;
bool compressed;
std::vector<gl_mipmap_texture_data_t> mipmaps;

Expand Down
7 changes: 6 additions & 1 deletion Plugins/Renderer/gl_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ entity_state_t *R_GetPlayerState(int index);
bool CL_IsDevOverviewMode(void);
int CL_FxBlend(cl_entity_t *entity);
void R_DrawCurrentEntity(bool bTransparent);
void R_DrawEntitiesOnList(void);
void R_DrawTEntitiesOnList(int onlyClientDraw);
void R_DrawEntitiesForViewModel(void);
void R_DrawTEntitiesForViewModel(void);
void R_AddTEntity(cl_entity_t *pEnt);
void GL_Shutdown(void);
void GL_Init(void);
Expand Down Expand Up @@ -441,7 +444,7 @@ void GL_FrameBufferColorTextureOITBlend(FBO_Container_t *s);

int GL_LoadTextureEx(const char* identifier, GL_TEXTURETYPE textureType, gl_loadtexture_state_t* state);
int R_LoadTextureFromFile(const char *filename, const char * identifier, int *width, int *height, GL_TEXTURETYPE type, bool mipmap, bool throw_warning_on_missing);
int R_LoadRGBATextureFromMemory(const char* identifier, void* data, int width, int height, GL_TEXTURETYPE type, bool mipmap);
int R_LoadRGBA8TextureFromMemory(const char* identifier, void* data, int width, int height, GL_TEXTURETYPE type, bool mipmap);

bool LoadDDS(const char* filename, const char* pathId, byte* buf, size_t bufsize, gl_loadtexture_state_t* state, bool throw_warning_on_missing);
bool LoadImageGeneric(const char* filename, const char* pathId, byte* buf, size_t bufSize, gl_loadtexture_state_t* state, bool throw_warning_on_missing);
Expand Down Expand Up @@ -524,6 +527,8 @@ extern GLint r_viewport[4];
extern float r_entity_matrix[4][4];
extern float r_entity_color[4];

extern bool r_draw_predrawviewmodel;
extern bool r_draw_drawviewmodel;
extern bool r_draw_analyzingstudio;
extern bool r_draw_deferredtrans;
extern bool r_draw_hasalpha;
Expand Down
Loading

0 comments on commit 1379514

Please sign in to comment.