glCompressedTexImage2D is an ARB extension in OpenGL 1.2.1
This commit is contained in:
parent
c40d3a007d
commit
86dd5dd2b2
10
GL/texture.c
10
GL/texture.c
|
@ -168,7 +168,7 @@ void APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
|
|||
glTexEnvi(target, pname, param);
|
||||
}
|
||||
|
||||
void APIENTRY glCompressedTexImage2D(GLenum target,
|
||||
void APIENTRY glCompressedTexImage2DARB(GLenum target,
|
||||
GLint level,
|
||||
GLenum internalFormat,
|
||||
GLsizei width,
|
||||
|
@ -179,10 +179,10 @@ void APIENTRY glCompressedTexImage2D(GLenum target,
|
|||
TRACE();
|
||||
|
||||
if(target != GL_TEXTURE_2D)
|
||||
_glKosThrowError(GL_INVALID_ENUM, "glCompressedTexImage2D");
|
||||
_glKosThrowError(GL_INVALID_ENUM, __func__);
|
||||
|
||||
if(level < 0 || border)
|
||||
_glKosThrowError(GL_INVALID_VALUE, "glCompressedTexImage2D");
|
||||
_glKosThrowError(GL_INVALID_VALUE, __func__);
|
||||
|
||||
switch(internalFormat) {
|
||||
case GL_COMPRESSED_ARGB_1555_VQ_KOS:
|
||||
|
@ -193,11 +193,11 @@ void APIENTRY glCompressedTexImage2D(GLenum target,
|
|||
case GL_COMPRESSED_RGB_565_VQ_TWID_KOS:
|
||||
break;
|
||||
default:
|
||||
_glKosThrowError(GL_INVALID_OPERATION, "glCompressedTexImage2D");
|
||||
_glKosThrowError(GL_INVALID_OPERATION, __func__);
|
||||
}
|
||||
|
||||
if(TEXTURE_UNITS[ACTIVE_TEXTURE] == NULL) {
|
||||
_glKosThrowError(GL_INVALID_OPERATION, "glCompressedTexImage2D");
|
||||
_glKosThrowError(GL_INVALID_OPERATION, __func__);
|
||||
}
|
||||
|
||||
if(_glKosHasError()) {
|
||||
|
|
17
include/gl.h
17
include/gl.h
|
@ -510,23 +510,6 @@ GLAPI void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalForma
|
|||
GLsizei width, GLsizei height, GLint border,
|
||||
GLenum format, GLenum type, const GLvoid *data);
|
||||
|
||||
/* Loads VQ compressed texture from SH4 RAM into PVR VRAM */
|
||||
/* internalformat must be one of the following constants:
|
||||
GL_UNSIGNED_SHORT_5_6_5_VQ
|
||||
GL_UNSIGNED_SHORT_5_6_5_VQ_TWID
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_VQ
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_VQ_TWID
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_VQ
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_VQ_TWID
|
||||
*/
|
||||
GLAPI void APIENTRY glCompressedTexImage2D(GLenum target,
|
||||
GLint level,
|
||||
GLenum internalformat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLint border,
|
||||
GLsizei imageSize,
|
||||
const GLvoid *data);
|
||||
|
||||
/* GL Array API - Only GL_TRIANGLES, GL_TRIANGLE_STRIP, and GL_QUADS are supported */
|
||||
GLAPI void APIENTRY glVertexPointer(GLint size, GLenum type,
|
||||
|
|
|
@ -126,6 +126,24 @@ GLAPI void APIENTRY glGenerateMipmapEXT(GLenum target);
|
|||
GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT(GLenum target);
|
||||
GLAPI GLboolean APIENTRY glIsFramebufferEXT(GLuint framebuffer);
|
||||
|
||||
/* Loads VQ compressed texture from SH4 RAM into PVR VRAM */
|
||||
/* internalformat must be one of the following constants:
|
||||
GL_UNSIGNED_SHORT_5_6_5_VQ
|
||||
GL_UNSIGNED_SHORT_5_6_5_VQ_TWID
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_VQ
|
||||
GL_UNSIGNED_SHORT_4_4_4_4_VQ_TWID
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_VQ
|
||||
GL_UNSIGNED_SHORT_1_5_5_5_VQ_TWID
|
||||
*/
|
||||
GLAPI void APIENTRY glCompressedTexImage2DARB(GLenum target,
|
||||
GLint level,
|
||||
GLenum internalformat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLint border,
|
||||
GLsizei imageSize,
|
||||
const GLvoid *data);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !__GL_GLEXT_H */
|
||||
|
|
|
@ -125,7 +125,7 @@ void LoadGLTextures() {
|
|||
|
||||
// 2d texture, level of detail 0 (normal), 3 components (red, green, blue), x size from image, y size from image,
|
||||
// border 0 (normal), rgb color data, unsigned byte data, and finally the data itself.
|
||||
glCompressedTexImage2D(
|
||||
glCompressedTexImage2DARB(
|
||||
GL_TEXTURE_2D, 0, image1->internalFormat, image1->sizeX, image1->sizeY, 0,
|
||||
image1->dataSize, image1->data
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user