mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 11:28:17 -04:00
Some comment and formatiing changes.
This commit is contained in:
parent
ef9dfea9df
commit
e62c1cb763
@ -436,8 +436,7 @@ apply_vertex_buffer(VertexBufferContext *vbc, CLP(ShaderContext) *shader_context
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shader_context == 0)
|
if (shader_context == 0) {
|
||||||
{
|
|
||||||
// FVF MODE
|
// FVF MODE
|
||||||
if (set_stream_source) {
|
if (set_stream_source) {
|
||||||
hr = _d3d_device->SetStreamSource
|
hr = _d3d_device->SetStreamSource
|
||||||
@ -460,8 +459,7 @@ apply_vertex_buffer(VertexBufferContext *vbc, CLP(ShaderContext) *shader_context
|
|||||||
_last_fvf = dvbc->_fvf;
|
_last_fvf = dvbc->_fvf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// SHADER MODE
|
// SHADER MODE
|
||||||
if (set_stream_source) {
|
if (set_stream_source) {
|
||||||
if (dvbc -> _direct_3d_vertex_declaration) {
|
if (dvbc -> _direct_3d_vertex_declaration) {
|
||||||
@ -482,12 +480,10 @@ apply_vertex_buffer(VertexBufferContext *vbc, CLP(ShaderContext) *shader_context
|
|||||||
VertexElementArray *vertex_element_array;
|
VertexElementArray *vertex_element_array;
|
||||||
|
|
||||||
vertex_element_array = shader_context -> _vertex_element_array;
|
vertex_element_array = shader_context -> _vertex_element_array;
|
||||||
if (vertex_element_array)
|
if (vertex_element_array) {
|
||||||
{
|
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
for (index = 0; index < vertex_element_array->total_elements; index++)
|
for (index = 0; index < vertex_element_array->total_elements; index++) {
|
||||||
{
|
|
||||||
VERTEX_ELEMENT_TYPE *vertex_element_type;
|
VERTEX_ELEMENT_TYPE *vertex_element_type;
|
||||||
VERTEX_ELEMENT_TYPE *source_vertex_element_type;
|
VERTEX_ELEMENT_TYPE *source_vertex_element_type;
|
||||||
|
|
||||||
@ -1162,17 +1158,15 @@ begin_draw_primitives(const Geom *geom, const GeomMunger *munger,
|
|||||||
_vertex_array_shader_expansion = _current_shader_expansion;
|
_vertex_array_shader_expansion = _current_shader_expansion;
|
||||||
_vertex_array_shader_context = _current_shader_context;
|
_vertex_array_shader_context = _current_shader_context;
|
||||||
|
|
||||||
|
|
||||||
// const GeomVertexFormat *format = _vertex_data->get_format();
|
// const GeomVertexFormat *format = _vertex_data->get_format();
|
||||||
|
|
||||||
const GeomVertexArrayData *data;
|
const GeomVertexArrayData *data;
|
||||||
|
|
||||||
if (_current_shader_context && _vertex_data->get_num_arrays ( ) > 1)
|
// use the original data if possible
|
||||||
{
|
if (_current_shader_context && _vertex_data->get_num_arrays ( ) > 1) {
|
||||||
data = _vertex_data->get_array(1);
|
data = _vertex_data->get_array(1);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// The munger should have put the FVF data in the first array.
|
// The munger should have put the FVF data in the first array.
|
||||||
data = _vertex_data->get_array(0);
|
data = _vertex_data->get_array(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user