mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibGL: Implement glBindTexture()
Textures are now initialized with a nullptr upon generation. They are only actually created once they are bound to a target. Currently only the GL_TEXTURE_2D target is supported. The software rasterizer now allows rendering with or without a bound TEXTURE_2D.
This commit is contained in:
parent
fde0045ebe
commit
755393e684
8 changed files with 85 additions and 4 deletions
|
@ -68,6 +68,7 @@ public:
|
|||
virtual void gl_read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) override;
|
||||
virtual void gl_tex_image_2d(GLenum target, GLint level, GLint internal_format, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* data) override;
|
||||
virtual void gl_tex_coord(GLfloat s, GLfloat t, GLfloat r, GLfloat q) override;
|
||||
virtual void gl_bind_texture(GLenum target, GLuint texture) override;
|
||||
|
||||
virtual void present() override;
|
||||
|
||||
|
@ -128,6 +129,8 @@ private:
|
|||
|
||||
GLenum m_current_read_buffer = GL_BACK;
|
||||
|
||||
GLuint m_bound_texture_2d = 0;
|
||||
|
||||
NonnullRefPtr<Gfx::Bitmap> m_frontbuffer;
|
||||
|
||||
Clipper m_clipper;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue