ソースを参照

Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop

pull/131/head
victorfisac 8年前
コミット
8d2de09f3d
2個のファイルの変更29行の追加11行の削除
  1. +1
    -9
      src/core.c
  2. +28
    -2
      src/rlgl.c

+ 1
- 9
src/core.c ファイルの表示

@ -564,7 +564,7 @@ void CloseOculusDevice(void)
void UpdateOculusTracking(void)
{
frameIndex++;
ovrPosef eyePoses[2];
ovr_GetEyePoses(session, frameIndex, ovrTrue, layer.viewScaleDesc.HmdToEyeOffset, eyePoses, &layer.eyeLayer.SensorSampleTime);
@ -643,14 +643,6 @@ void BeginDrawing(void)
previousTime = currentTime;
#if defined(PLATFORM_OCULUS)
frameIndex++;
ovrPosef eyePoses[2];
ovr_GetEyePoses(session, frameIndex, ovrTrue, layer.viewScaleDesc.HmdToEyeOffset, eyePoses, &layer.eyeLayer.SensorSampleTime);
layer.eyeLayer.RenderPose[0] = eyePoses[0];
layer.eyeLayer.RenderPose[1] = eyePoses[1];
SetOculusBuffer(session, buffer);
#endif

+ 28
- 2
src/rlgl.c ファイルの表示

@ -159,9 +159,17 @@ typedef struct {
// Draw call type
// NOTE: Used to track required draw-calls, organized by texture
typedef struct {
GLuint textureId;
int vertexCount;
// TODO: Store draw state -> blending mode, shader
GLuint vaoId;
GLuint textureId;
GLuint shaderId;
Matrix projection;
Matrix modelview;
// TODO: Store additional draw state data
//int blendMode;
//Guint fboId;
} DrawCall;
//----------------------------------------------------------------------------------
@ -2099,6 +2107,24 @@ void *rlglReadTexturePixels(Texture2D texture)
return pixels;
}
/*
// TODO: Record draw calls to be processed in batch
// NOTE: Global state must be kept
void rlglRecordDraw(void)
{
// TODO: Before adding a new draw, check if anything changed from last stored draw
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
draws[drawsCounter].vaoId = currentState.vaoId; // lines.id, trangles.id, quads.id?
draws[drawsCounter].textureId = currentState.textureId; // whiteTexture?
draws[drawsCounter].shaderId = currentState.shaderId; // defaultShader.id
draws[drawsCounter].projection = projection;
draws[drawsCounter].modelview = modelview;
draws[drawsCounter].vertexCount = currentState.vertexCount;
drawsCounter++;
#endif
}
*/
//----------------------------------------------------------------------------------
// Module Functions Definition - Shaders Functions

読み込み中…
キャンセル
保存