mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
material: splits out all the state flushing code
This moves the code supporting _cogl_material_flush_gl_state into cogl-material-opengl.c as part of an effort to reduce the size of cogl-material.c to keep it manageable.
This commit is contained in:
parent
ddb9016be4
commit
5e66970385
@ -31,6 +31,7 @@
|
|||||||
#include "cogl-journal-private.h"
|
#include "cogl-journal-private.h"
|
||||||
#include "cogl-texture-private.h"
|
#include "cogl-texture-private.h"
|
||||||
#include "cogl-material-private.h"
|
#include "cogl-material-private.h"
|
||||||
|
#include "cogl-material-opengl-private.h"
|
||||||
#include "cogl-vertex-buffer-private.h"
|
#include "cogl-vertex-buffer-private.h"
|
||||||
#include "cogl-framebuffer-private.h"
|
#include "cogl-framebuffer-private.h"
|
||||||
#include "cogl-profile.h"
|
#include "cogl-profile.h"
|
||||||
|
@ -144,5 +144,12 @@ _cogl_bind_gl_texture_transient (GLenum gl_target,
|
|||||||
void
|
void
|
||||||
_cogl_delete_gl_texture (GLuint gl_texture);
|
_cogl_delete_gl_texture (GLuint gl_texture);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_gl_use_program_wrapper (GLuint program);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_material_flush_gl_state (CoglMaterial *material,
|
||||||
|
gboolean skip_gl_state);
|
||||||
|
|
||||||
#endif /* __COGL_MATERIAL_OPENGL_PRIVATE_H */
|
#endif /* __COGL_MATERIAL_OPENGL_PRIVATE_H */
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,7 @@
|
|||||||
#include "cogl-material.h"
|
#include "cogl-material.h"
|
||||||
#include "cogl-matrix.h"
|
#include "cogl-matrix.h"
|
||||||
#include "cogl-handle.h"
|
#include "cogl-handle.h"
|
||||||
|
#include "cogl-profile.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@ -551,6 +552,9 @@ typedef enum
|
|||||||
COGL_MATERIAL_PROGRAM_TYPE_FIXED
|
COGL_MATERIAL_PROGRAM_TYPE_FIXED
|
||||||
} CoglMaterialProgramType;
|
} CoglMaterialProgramType;
|
||||||
|
|
||||||
|
extern const CoglMaterialBackend *
|
||||||
|
_cogl_material_backends[COGL_MATERIAL_N_BACKENDS];
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_material_init_default_material (void);
|
_cogl_material_init_default_material (void);
|
||||||
|
|
||||||
@ -681,6 +685,8 @@ _cogl_use_program (CoglHandle program_handle, CoglMaterialProgramType type);
|
|||||||
unsigned int
|
unsigned int
|
||||||
_cogl_get_n_args_for_combine_func (GLint func);
|
_cogl_get_n_args_for_combine_func (GLint func);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_material_set_backend (CoglMaterial *material, int backend);
|
||||||
|
|
||||||
CoglMaterial *
|
CoglMaterial *
|
||||||
_cogl_material_get_parent (CoglMaterial *material);
|
_cogl_material_get_parent (CoglMaterial *material);
|
||||||
@ -689,9 +695,9 @@ void
|
|||||||
_cogl_material_get_colorubv (CoglMaterial *material,
|
_cogl_material_get_colorubv (CoglMaterial *material,
|
||||||
guint8 *color);
|
guint8 *color);
|
||||||
|
|
||||||
void
|
unsigned long
|
||||||
_cogl_material_flush_gl_state (CoglMaterial *material,
|
_cogl_material_compare_differences (CoglMaterial *material0,
|
||||||
gboolean skip_gl_state);
|
CoglMaterial *material1);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_cogl_material_equal (CoglMaterial *material0,
|
_cogl_material_equal (CoglMaterial *material0,
|
||||||
@ -704,6 +710,17 @@ _cogl_material_journal_ref (CoglMaterial *material);
|
|||||||
void
|
void
|
||||||
_cogl_material_journal_unref (CoglMaterial *material);
|
_cogl_material_journal_unref (CoglMaterial *material);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_material_layer_get_wrap_modes (CoglMaterialLayer *layer,
|
||||||
|
CoglMaterialWrapModeInternal *wrap_mode_s,
|
||||||
|
CoglMaterialWrapModeInternal *wrap_mode_t,
|
||||||
|
CoglMaterialWrapModeInternal *wrap_mode_r);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_material_layer_get_filters (CoglMaterialLayer *layer,
|
||||||
|
CoglMaterialFilter *min_filter,
|
||||||
|
CoglMaterialFilter *mag_filter);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_material_set_user_program (CoglMaterial *material,
|
_cogl_material_set_user_program (CoglMaterial *material,
|
||||||
CoglHandle program);
|
CoglHandle program);
|
||||||
@ -714,9 +731,6 @@ _cogl_material_texture_storage_change_notify (CoglHandle texture);
|
|||||||
void
|
void
|
||||||
_cogl_material_apply_legacy_state (CoglMaterial *material);
|
_cogl_material_apply_legacy_state (CoglMaterial *material);
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_gl_use_program_wrapper (GLuint program);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_material_apply_overrides (CoglMaterial *material,
|
_cogl_material_apply_overrides (CoglMaterial *material,
|
||||||
CoglMaterialFlushOptions *options);
|
CoglMaterialFlushOptions *options);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,7 @@
|
|||||||
#include "cogl-context.h"
|
#include "cogl-context.h"
|
||||||
#include "cogl-journal-private.h"
|
#include "cogl-journal-private.h"
|
||||||
#include "cogl-material-private.h"
|
#include "cogl-material-private.h"
|
||||||
|
#include "cogl-material-opengl-private.h"
|
||||||
#include "cogl-framebuffer-private.h"
|
#include "cogl-framebuffer-private.h"
|
||||||
#include "cogl-path-private.h"
|
#include "cogl-path-private.h"
|
||||||
#include "cogl-texture-private.h"
|
#include "cogl-texture-private.h"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "cogl-journal-private.h"
|
#include "cogl-journal-private.h"
|
||||||
#include "cogl-texture-private.h"
|
#include "cogl-texture-private.h"
|
||||||
#include "cogl-material-private.h"
|
#include "cogl-material-private.h"
|
||||||
|
#include "cogl-material-opengl-private.h"
|
||||||
#include "cogl-vertex-buffer-private.h"
|
#include "cogl-vertex-buffer-private.h"
|
||||||
#include "cogl-framebuffer-private.h"
|
#include "cogl-framebuffer-private.h"
|
||||||
|
|
||||||
|
@ -137,6 +137,7 @@
|
|||||||
#include "cogl-vertex-buffer-private.h"
|
#include "cogl-vertex-buffer-private.h"
|
||||||
#include "cogl-texture-private.h"
|
#include "cogl-texture-private.h"
|
||||||
#include "cogl-material-private.h"
|
#include "cogl-material-private.h"
|
||||||
|
#include "cogl-material-opengl-private.h"
|
||||||
#include "cogl-primitives.h"
|
#include "cogl-primitives.h"
|
||||||
#include "cogl-framebuffer-private.h"
|
#include "cogl-framebuffer-private.h"
|
||||||
#include "cogl-journal-private.h"
|
#include "cogl-journal-private.h"
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "cogl-util.h"
|
#include "cogl-util.h"
|
||||||
#include "cogl-context.h"
|
#include "cogl-context.h"
|
||||||
#include "cogl-material-private.h"
|
#include "cogl-material-private.h"
|
||||||
|
#include "cogl-material-opengl-private.h"
|
||||||
#include "cogl-winsys.h"
|
#include "cogl-winsys.h"
|
||||||
#include "cogl-framebuffer-private.h"
|
#include "cogl-framebuffer-private.h"
|
||||||
#include "cogl-matrix-private.h"
|
#include "cogl-matrix-private.h"
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "cogl-handle.h"
|
#include "cogl-handle.h"
|
||||||
#include "cogl-context.h"
|
#include "cogl-context.h"
|
||||||
#include "cogl-journal-private.h"
|
#include "cogl-journal-private.h"
|
||||||
|
#include "cogl-material-opengl-private.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user