This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.navigation.NavType | |
import androidx.navigation.compose.navArgument | |
abstract class MovieDetailsEntry : AggregateFeatureEntry { | |
final override val featureRoute = "movie-details?movieId={movieId}" | |
final override val arguments = listOf( | |
navArgument("movieId") { | |
type = NavType.IntType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.navigation.compose.NamedNavArgument | |
interface FeatureEntry { | |
val featureRoute: String | |
val arguments: List<NamedNavArgument> | |
get() = emptyList() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MovieSearchEntryImpl @Inject constructor() : MovieSearchEntry() { | |
@Composable | |
override fun Composable( | |
navController: NavHostController, | |
destinations: Destinations, | |
backStackEntry: NavBackStackEntry | |
) { | |
// Build your feature UI here. | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface FeatureEntry { | |
val featureRoute: String | |
... | |
@Composable | |
fun Composable( | |
navController: NavHostController, | |
destinations: Destinations, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// triangle/shaders/shader.frag | |
#version 450 | |
layout(location = 0) in vec3 fragColor; | |
layout(location = 0) out vec4 outColor; | |
void main() { | |
outColor = vec4(fragColor, 1.0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// triangle/main.cpp | |
... | |
void createGraphicsPipeline() { | |
auto vertShaderCode = readFile("triangle/shaders/shader.vert.spv"); | |
auto fragShaderCode = readFile("triangle/shaders/shader.frag.spv"); | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# triangle/BUILD | |
load("@rules_cc//cc:defs.bzl", "cc_binary") | |
cc_binary( | |
name = "triangle", | |
srcs = glob(["*.cpp"]), | |
data = [ | |
"//triangle/shaders:vert_shader", | |
"//triangle/shaders:frag_shader", | |
], |