mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
sync with glgsg
This commit is contained in:
parent
fe27f456ee
commit
091b08b97f
@ -37,7 +37,6 @@
|
|||||||
#include "cr_glwrapper.h"
|
#include "cr_glwrapper.h"
|
||||||
#include "cr_applications.h"
|
#include "cr_applications.h"
|
||||||
#include "cr_spu.h"
|
#include "cr_spu.h"
|
||||||
///////#include "cr_glstate.h"
|
|
||||||
extern SPUDispatchTable chromium;
|
extern SPUDispatchTable chromium;
|
||||||
|
|
||||||
#include <geomNodeContext.h>
|
#include <geomNodeContext.h>
|
||||||
|
@ -1037,23 +1037,7 @@ get_current_alpha_scale() const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE GLenum CRGraphicsStateGuardian::get_light_id(int index) const
|
INLINE GLenum CRGraphicsStateGuardian::get_light_id(int index) const
|
||||||
{
|
{
|
||||||
switch( index )
|
return GL_LIGHT0 + index;
|
||||||
{
|
|
||||||
case 0: return GL_LIGHT0;
|
|
||||||
case 1: return GL_LIGHT1;
|
|
||||||
case 2: return GL_LIGHT2;
|
|
||||||
case 3: return GL_LIGHT3;
|
|
||||||
case 4: return GL_LIGHT4;
|
|
||||||
case 5: return GL_LIGHT5;
|
|
||||||
case 6: return GL_LIGHT6;
|
|
||||||
case 7: return GL_LIGHT7;
|
|
||||||
default:
|
|
||||||
crgsg_cat.error()
|
|
||||||
<< "get_light_id() - we don't currently support ids "
|
|
||||||
<< "> 8" << endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return GL_LIGHT0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -1088,9 +1072,9 @@ get_clip_plane_id(int index) const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void CRGraphicsStateGuardian::
|
INLINE void CRGraphicsStateGuardian::
|
||||||
issue_scene_graph_color() {
|
issue_scene_graph_color() {
|
||||||
if (_issued_color_stale) {
|
if (_scene_graph_color_stale) {
|
||||||
issue_transformed_color(_scene_graph_color);
|
issue_transformed_color(_scene_graph_color);
|
||||||
_issued_color_stale = false;
|
_scene_graph_color_stale = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2507,7 +2507,7 @@ issue_color_transform(const ColorMatrixTransition *attrib) {
|
|||||||
_color_transform_enabled = true;
|
_color_transform_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_issued_color_stale = _has_scene_graph_color;
|
_scene_graph_color_stale = _has_scene_graph_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -2526,7 +2526,7 @@ issue_alpha_transform(const AlphaTransformTransition *attrib) {
|
|||||||
_alpha_transform_enabled = true;
|
_alpha_transform_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_issued_color_stale = _has_scene_graph_color;
|
_scene_graph_color_stale = _has_scene_graph_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -2560,21 +2560,21 @@ issue_color(const ColorTransition *attrib) {
|
|||||||
_scene_graph_color = attrib->get_color();
|
_scene_graph_color = attrib->get_color();
|
||||||
_has_scene_graph_color = true;
|
_has_scene_graph_color = true;
|
||||||
_vertex_colors_enabled = false;
|
_vertex_colors_enabled = false;
|
||||||
_issued_color_stale = true;
|
_scene_graph_color_stale = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// The color attribute is "on" but not "real": it specifies that
|
// The color attribute is "on" but not "real": it specifies that
|
||||||
// no scene graph color is in effect, but vertex color is not
|
// no scene graph color is in effect, but vertex color is not
|
||||||
// important either.
|
// important either.
|
||||||
_has_scene_graph_color = false;
|
_has_scene_graph_color = false;
|
||||||
_issued_color_stale = false;
|
_scene_graph_color_stale = false;
|
||||||
_vertex_colors_enabled = false;
|
_vertex_colors_enabled = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// The color attribute is "off": it specifies that vertex color
|
// The color attribute is "off": it specifies that vertex color
|
||||||
// should be revealed.
|
// should be revealed.
|
||||||
_has_scene_graph_color = false;
|
_has_scene_graph_color = false;
|
||||||
_issued_color_stale = false;
|
_scene_graph_color_stale = false;
|
||||||
_vertex_colors_enabled = true;
|
_vertex_colors_enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
#include "cr_glwrapper.h"
|
#include "cr_glwrapper.h"
|
||||||
#include "cr_applications.h"
|
#include "cr_applications.h"
|
||||||
#include "cr_spu.h"
|
#include "cr_spu.h"
|
||||||
///////#include "cr_glstate.h"
|
|
||||||
extern SPUDispatchTable chromium;
|
extern SPUDispatchTable chromium;
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ extern SPUDispatchTable chromium;
|
|||||||
class PlaneNode;
|
class PlaneNode;
|
||||||
class Light;
|
class Light;
|
||||||
|
|
||||||
#ifdef GSG_VERBOSE
|
#if !defined(WIN32) && defined(GSG_VERBOSE)
|
||||||
ostream &output_cr_enum(ostream &out, GLenum v);
|
ostream &output_cr_enum(ostream &out, GLenum v);
|
||||||
INLINE ostream &operator << (ostream &out, GLenum v) {
|
INLINE ostream &operator << (ostream &out, GLenum v) {
|
||||||
return output_cr_enum(out, v);
|
return output_cr_enum(out, v);
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "cr_glwrapper.h"
|
#include "cr_glwrapper.h"
|
||||||
#include "cr_applications.h"
|
#include "cr_applications.h"
|
||||||
#include "cr_spu.h"
|
#include "cr_spu.h"
|
||||||
///////#include "cr_glstate.h"
|
|
||||||
extern SPUDispatchTable chromium;
|
extern SPUDispatchTable chromium;
|
||||||
|
|
||||||
#include <textureContext.h>
|
#include <textureContext.h>
|
||||||
|
@ -40,7 +40,6 @@ conversion=(
|
|||||||
#include "cr_glwrapper.h"
|
#include "cr_glwrapper.h"
|
||||||
#include "cr_applications.h"
|
#include "cr_applications.h"
|
||||||
#include "cr_spu.h"
|
#include "cr_spu.h"
|
||||||
///////#include "cr_glstate.h"
|
|
||||||
extern SPUDispatchTable chromium;
|
extern SPUDispatchTable chromium;
|
||||||
"""),
|
"""),
|
||||||
("(TypeHandle CRGraphicsStateGuardian::_type_handle;)", "\\1\nSPUDispatchTable chromium;"),
|
("(TypeHandle CRGraphicsStateGuardian::_type_handle;)", "\\1\nSPUDispatchTable chromium;"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user