Browse Source

REVIEWED: Some old TODOs

pull/3026/head
Ray 1 year ago
parent
commit
838fc7e303
4 changed files with 8 additions and 12 deletions
  1. +1
    -1
      src/raudio.c
  2. +3
    -4
      src/rlgl.h
  3. +3
    -4
      src/rmodels.c
  4. +1
    -3
      src/rtextures.c

+ 1
- 1
src/raudio.c View File

@ -1389,7 +1389,7 @@ Music LoadMusicStream(const char *fileName)
else if (music.ctxType == MUSIC_AUDIO_MP3) { drmp3_uninit((drmp3 *)music.ctxData); RL_FREE(music.ctxData); }
#endif
#if defined(SUPPORT_FILEFORMAT_QOA)
else if (music.ctxType == MUSIC_AUDIO_QOA) p">{ /*TODO: Release QOA context data*/ RL_FREE(music.ctxData); }
else if (music.ctxType == MUSIC_AUDIO_QOA) n">qoaplay_close((qoaplay_desc *)music.ctxData);
#endif
#if defined(SUPPORT_FILEFORMAT_FLAC)
else if (music.ctxType == MUSIC_AUDIO_FLAC) drflac_free((drflac *)music.ctxData, NULL);

+ 3
- 4
src/rlgl.h View File

@ -1416,8 +1416,7 @@ void rlVertex3f(float x, float y, float z)
RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].texcoords[2*RLGL.State.vertexCounter] = RLGL.State.texcoordx;
RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].texcoords[2*RLGL.State.vertexCounter + 1] = RLGL.State.texcoordy;
// TODO: Add current normal
// By default rlVertexBuffer type does not store normals
// WARNING: By default rlVertexBuffer struct does not store normals
// Add current color
RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].colors[4*RLGL.State.vertexCounter] = RLGL.State.colorr;
@ -2047,7 +2046,7 @@ void rlglInit(int width, int height)
if ((glDebugMessageCallback != NULL) && (glDebugMessageControl != NULL))
{
glDebugMessageCallback(rlDebugMessageCallback, 0);
// glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DEBUG_SEVERITY_HIGH, 0, 0, GL_TRUE); // TODO: Filter message
// glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DEBUG_SEVERITY_HIGH, 0, 0, GL_TRUE);
// Debug context options:
// - GL_DEBUG_OUTPUT - Faster version but not useful for breakpoints
@ -2648,7 +2647,7 @@ void rlDrawRenderBatch(rlRenderBatch *batch)
// Update batch vertex buffers
//------------------------------------------------------------------------------------------------------------
// NOTE: If there is not vertex data, buffers doesn't need to be updated (vertexCount > 0)
// TODO: If no data changed on the CPU arrays --> No need to re-update GPU arrays (change flag required)
// TODO: If no data changed on the CPU arrays --> No need to re-update GPU arrays (use a change detector flag?)
if (RLGL.State.vertexCounter > 0)
{
// Activate elements VAO

+ 3
- 4
src/rmodels.c View File

@ -4525,7 +4525,7 @@ static ModelAnimation *LoadModelAnimationsIQM(const char *fileName, unsigned int
animations[a].boneCount = iqmHeader->num_poses;
animations[a].bones = RL_MALLOC(iqmHeader->num_poses*sizeof(BoneInfo));
animations[a].framePoses = RL_MALLOC(anim[a].num_frames*sizeof(Transform *));
// animations[a].framerate = anim.framerate; // TODO: Use framerate?
// animations[a].framerate = anim.framerate; // TODO: Use animation framerate data?
for (unsigned int j = 0; j < iqmHeader->num_poses; j++)
{
@ -4825,7 +4825,7 @@ static Model LoadGLTF(const char *fileName)
TRACELOG(LOG_DEBUG, " > Textures count: %i", data->textures_count);
// Force reading data buffers (fills buffer_view->buffer->data)
// NOTE: If an uri is defined to base64 data or external path, it's automatically loaded -> TODO: Verify this assumption
// NOTE: If an uri is defined to base64 data or external path, it's automatically loaded
result = cgltf_load_buffers(&options, data, fileName);
if (result != cgltf_result_success) TRACELOG(LOG_INFO, "MODEL: [%s] Failed to load mesh/material buffers", fileName);
@ -5517,7 +5517,6 @@ static Model LoadVOX(const char *fileName)
memcpy(pmesh->vertices, pvertices, size);
// Copy indices
// TODO: Compute globals indices array
size = voxarray.indices.used*sizeof(unsigned short);
pmesh->indices = RL_MALLOC(size);
memcpy(pmesh->indices, pindices, size);
@ -5803,7 +5802,7 @@ static Model LoadM3D(const char *fileName)
model.bindPose[i].rotation.z = m3d->vertex[m3d->bone[i].ori].z;
model.bindPose[i].rotation.w = m3d->vertex[m3d->bone[i].ori].w;
// TODO: k">if the orientation quaternion not normalized, then that's encoding scaling
// TODO: n">If the orientation quaternion is not normalized, then that's encoding scaling
model.bindPose[i].rotation = QuaternionNormalize(model.bindPose[i].rotation);
model.bindPose[i].scale.x = model.bindPose[i].scale.y = model.bindPose[i].scale.z = 1.0f;

+ 1
- 3
src/rtextures.c View File

@ -326,8 +326,6 @@ Image LoadImageAnim(const char *fileName, int *frames)
frameCount = 1;
}
// TODO: Support APNG animated images
*frames = frameCount;
return image;
}
@ -1252,6 +1250,7 @@ Image ImageText(const char *text, int fontSize, Color color)
}
// Create an image from text (custom sprite font)
// WARNING: Module required: rtext
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint)
{
Image imText = { 0 };
@ -1305,7 +1304,6 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
// Using nearest-neighbor scaling algorithm for default font
// TODO: Allow defining the preferred scaling mechanism externally
// WARNING: Module required: rtext
if (font.texture.id == GetFontDefault().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor));
else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor));
}

Loading…
Cancel
Save