Loading libs/rs/java/Samples/src/com/android/samples/rsbench.rs +4 −4 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ static void updateModelMatrix(rs_matrix4x4 *matrix, void *buffer) { if (buffer == 0) { rsgProgramVertexLoadModelMatrix(matrix); } else { rsAllocationMarkDirty(rsGetAllocation(buffer)); rsgAllocationSyncAll(rsGetAllocation(buffer)); } } Loading Loading @@ -409,7 +409,7 @@ static void setupCustomShaderLights() { gVSConstants->light1_Diffuse = 1.0f; gVSConstants->light1_Specular = 0.7f; gVSConstants->light1_CosinePower = 25.0f; rsAllocationMarkDirty(rsGetAllocation(gVSConstants)); rsgAllocationSyncAll(rsGetAllocation(gVSConstants)); // Update fragment shader constants // Set light 0 colors Loading @@ -418,7 +418,7 @@ static void setupCustomShaderLights() { // Set light 1 colors gFSConstants->light1_DiffuseColor = light1DiffCol; gFSConstants->light1_SpecularColor = light1SpecCol; rsAllocationMarkDirty(rsGetAllocation(gFSConstants)); rsgAllocationSyncAll(rsGetAllocation(gFSConstants)); // Set light 0 properties for per pixel lighting gFSConstPixel->light0_Posision = light0Pos; Loading @@ -434,7 +434,7 @@ static void setupCustomShaderLights() { gFSConstPixel->light1_CosinePower = 25.0f; gFSConstPixel->light1_DiffuseColor = light1DiffCol; gFSConstPixel->light1_SpecularColor = light1SpecCol; rsAllocationMarkDirty(rsGetAllocation(gFSConstPixel)); rsgAllocationSyncAll(rsGetAllocation(gFSConstPixel)); } static void displayCustomShaderSamples(int numMeshes) { Loading libs/rs/java/Samples/src/com/android/samples/rsrenderstates.rs +1 −1 Original line number Diff line number Diff line Loading @@ -526,7 +526,7 @@ static void displayCubemapShaderSample() { // Setup the projectioni matrix float aspect = (float)rsgGetWidth() / (float)rsgGetHeight(); rsMatrixLoadPerspective(&gVSConstants->proj, 30.0f, aspect, 0.1f, 100.0f); rsAllocationMarkDirty(rsGetAllocation(gFSConstants)); rsgAllocationSyncAll(rsGetAllocation(gFSConstants)); rsgBindProgramVertex(gProgVertexCube); Loading Loading
libs/rs/java/Samples/src/com/android/samples/rsbench.rs +4 −4 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ static void updateModelMatrix(rs_matrix4x4 *matrix, void *buffer) { if (buffer == 0) { rsgProgramVertexLoadModelMatrix(matrix); } else { rsAllocationMarkDirty(rsGetAllocation(buffer)); rsgAllocationSyncAll(rsGetAllocation(buffer)); } } Loading Loading @@ -409,7 +409,7 @@ static void setupCustomShaderLights() { gVSConstants->light1_Diffuse = 1.0f; gVSConstants->light1_Specular = 0.7f; gVSConstants->light1_CosinePower = 25.0f; rsAllocationMarkDirty(rsGetAllocation(gVSConstants)); rsgAllocationSyncAll(rsGetAllocation(gVSConstants)); // Update fragment shader constants // Set light 0 colors Loading @@ -418,7 +418,7 @@ static void setupCustomShaderLights() { // Set light 1 colors gFSConstants->light1_DiffuseColor = light1DiffCol; gFSConstants->light1_SpecularColor = light1SpecCol; rsAllocationMarkDirty(rsGetAllocation(gFSConstants)); rsgAllocationSyncAll(rsGetAllocation(gFSConstants)); // Set light 0 properties for per pixel lighting gFSConstPixel->light0_Posision = light0Pos; Loading @@ -434,7 +434,7 @@ static void setupCustomShaderLights() { gFSConstPixel->light1_CosinePower = 25.0f; gFSConstPixel->light1_DiffuseColor = light1DiffCol; gFSConstPixel->light1_SpecularColor = light1SpecCol; rsAllocationMarkDirty(rsGetAllocation(gFSConstPixel)); rsgAllocationSyncAll(rsGetAllocation(gFSConstPixel)); } static void displayCustomShaderSamples(int numMeshes) { Loading
libs/rs/java/Samples/src/com/android/samples/rsrenderstates.rs +1 −1 Original line number Diff line number Diff line Loading @@ -526,7 +526,7 @@ static void displayCubemapShaderSample() { // Setup the projectioni matrix float aspect = (float)rsgGetWidth() / (float)rsgGetHeight(); rsMatrixLoadPerspective(&gVSConstants->proj, 30.0f, aspect, 0.1f, 100.0f); rsAllocationMarkDirty(rsGetAllocation(gFSConstants)); rsgAllocationSyncAll(rsGetAllocation(gFSConstants)); rsgBindProgramVertex(gProgVertexCube); Loading