Part: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:06:48 +01:00
parent a057e5486d
commit 6d2d45ceb7
155 changed files with 1504 additions and 1504 deletions

View File

@@ -1035,25 +1035,25 @@ void SoBrepFaceSet::generatePrimitives(SoAction * action)
if (doTextures) {
if (tb.isFunction() && !tb.needIndices()) {
tbind = NONE;
tindices = NULL;
tindices = nullptr;
}
// FIXME: just call inherited::areTexCoordsIndexed() instead of
// the if-check? 20020110 mortene.
else if (SoTextureCoordinateBindingElement::get(state) ==
SoTextureCoordinateBindingElement::PER_VERTEX) {
tbind = PER_VERTEX;
tindices = NULL;
tindices = nullptr;
}
else {
tbind = PER_VERTEX_INDEXED;
if (tindices == NULL) tindices = cindices;
if (tindices == nullptr) tindices = cindices;
}
}
if (nbind == PER_VERTEX_INDEXED && nindices == NULL) {
if (nbind == PER_VERTEX_INDEXED && nindices == nullptr) {
nindices = cindices;
}
if (mbind == PER_VERTEX_INDEXED && mindices == NULL) {
if (mbind == PER_VERTEX_INDEXED && mindices == nullptr) {
mindices = cindices;
}
@@ -1410,8 +1410,8 @@ void SoBrepFaceSet::VBO::render(SoGLRenderAction * action,
SbBool texture)
{
(void)texcoords; (void)texindices; (void)texture;
const SbVec3f * coords3d = NULL;
SbVec3f * cur_coords3d = NULL;
const SbVec3f * coords3d = nullptr;
SbVec3f * cur_coords3d = nullptr;
coords3d = vertexlist->getArrayPtr3();
cur_coords3d = ( SbVec3f *)coords3d;
@@ -1429,8 +1429,8 @@ void SoBrepFaceSet::VBO::render(SoGLRenderAction * action,
int matnr = 0;
int trinr = 0;
float * vertex_array = NULL;
GLuint * index_array = NULL;
float * vertex_array = nullptr;
GLuint * index_array = nullptr;
SbColor mycolor1,mycolor2,mycolor3;
SbVec3f *mynormal1 = (SbVec3f *)currnormal;
SbVec3f *mynormal2 = (SbVec3f *)currnormal;
@@ -1706,11 +1706,11 @@ void SoBrepFaceSet::VBO::render(SoGLRenderAction * action,
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glVertexPointer(3,GL_FLOAT,10*sizeof(GLfloat),0);
glVertexPointer(3,GL_FLOAT,10*sizeof(GLfloat),nullptr);
glNormalPointer(GL_FLOAT,10*sizeof(GLfloat),(GLvoid *)(3*sizeof(GLfloat)));
glColorPointer(4,GL_FLOAT,10*sizeof(GLfloat),(GLvoid *)(6*sizeof(GLfloat)));
glDrawElements(GL_TRIANGLES, this->indice_array, GL_UNSIGNED_INT, (void *)0);
glDrawElements(GL_TRIANGLES, this->indice_array, GL_UNSIGNED_INT, (void *)nullptr);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
@@ -1753,7 +1753,7 @@ void SoBrepFaceSet::renderShape(SoGLRenderAction * action,
int texidx = 0;
const SbVec3f * coords3d = NULL;
const SbVec3f * coords3d = nullptr;
coords3d = vertexlist->getArrayPtr3();
const int32_t *viptr = vertexindices;