mirror of
https://github.com/overte-org/overte.git
synced 2025-07-25 11:26:33 +02:00
Add glTexParamteri to GLBackend/Batch
This commit is contained in:
parent
51570aac68
commit
0770f88606
3 changed files with 21 additions and 1 deletions
|
@ -143,7 +143,8 @@ public:
|
|||
|
||||
void _glBindTexture(GLenum target, GLuint texture);
|
||||
void _glActiveTexture(GLenum texture);
|
||||
|
||||
void _glTexParameteri(GLenum target, GLenum pname, GLint param);
|
||||
|
||||
void _glDrawBuffers(GLsizei n, const GLenum* bufs);
|
||||
|
||||
void _glUseProgram(GLuint program);
|
||||
|
@ -201,6 +202,7 @@ public:
|
|||
|
||||
COMMAND_glBindTexture,
|
||||
COMMAND_glActiveTexture,
|
||||
COMMAND_glTexParameteri,
|
||||
|
||||
COMMAND_glDrawBuffers,
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ GLBackend::CommandCall GLBackend::_commandCalls[Batch::NUM_COMMANDS] =
|
|||
|
||||
(&::gpu::GLBackend::do_glBindTexture),
|
||||
(&::gpu::GLBackend::do_glActiveTexture),
|
||||
(&::gpu::GLBackend::do_glTexParameteri),
|
||||
|
||||
(&::gpu::GLBackend::do_glDrawBuffers),
|
||||
|
||||
|
@ -381,6 +382,22 @@ void GLBackend::do_glActiveTexture(Batch& batch, uint32 paramOffset) {
|
|||
(void) CHECK_GL_ERROR();
|
||||
}
|
||||
|
||||
void Batch::_glTexParameteri(GLenum target, GLenum pname, GLint param) {
|
||||
ADD_COMMAND_GL(glTexParameteri);
|
||||
|
||||
_params.push_back(param);
|
||||
_params.push_back(pname);
|
||||
_params.push_back(target);
|
||||
|
||||
DO_IT_NOW(glTexParameteri, 3);
|
||||
}
|
||||
void GLBackend::do_glTexParameteri(Batch& batch, uint32 paramOffset) {
|
||||
glTexParameteri(batch._params[paramOffset + 2]._uint,
|
||||
batch._params[paramOffset + 1]._uint,
|
||||
batch._params[paramOffset + 0]._int);
|
||||
(void) CHECK_GL_ERROR();
|
||||
}
|
||||
|
||||
void Batch::_glDrawBuffers(GLsizei n, const GLenum* bufs) {
|
||||
ADD_COMMAND_GL(glDrawBuffers);
|
||||
|
||||
|
|
|
@ -358,6 +358,7 @@ protected:
|
|||
|
||||
void do_glBindTexture(Batch& batch, uint32 paramOffset);
|
||||
void do_glActiveTexture(Batch& batch, uint32 paramOffset);
|
||||
void do_glTexParameteri(Batch& batch, uint32 paramOffset);
|
||||
|
||||
void do_glDrawBuffers(Batch& batch, uint32 paramOffset);
|
||||
|
||||
|
|
Loading…
Reference in a new issue