change texture2d to texture
This commit is contained in:
parent
97c02b2425
commit
1c829e7b81
9 changed files with 73 additions and 73 deletions
|
|
@ -49,7 +49,7 @@ int main(void)
|
|||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Model model = LoadModel("resources/models/barracks.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/barracks_diffuse.png"); // Load model texture (diffuse map)
|
||||
Texture texture = LoadTexture("resources/models/barracks_diffuse.png"); // Load model texture (diffuse map)
|
||||
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ int main(void)
|
|||
} break;
|
||||
case DEFERRED_POSITION:
|
||||
{
|
||||
DrawTextureRec((Texture2D){
|
||||
DrawTextureRec((Texture){
|
||||
.id = gBuffer.positionTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
|
|
@ -287,7 +287,7 @@ int main(void)
|
|||
} break;
|
||||
case DEFERRED_NORMAL:
|
||||
{
|
||||
DrawTextureRec((Texture2D){
|
||||
DrawTextureRec((Texture){
|
||||
.id = gBuffer.normalTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
|
|
@ -297,7 +297,7 @@ int main(void)
|
|||
} break;
|
||||
case DEFERRED_ALBEDO:
|
||||
{
|
||||
DrawTextureRec((Texture2D){
|
||||
DrawTextureRec((Texture){
|
||||
.id = gBuffer.albedoSpecTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ int main(void)
|
|||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Model model = LoadModel("resources/models/watermill.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/watermill_diffuse.png"); // Load model texture
|
||||
Texture texture = LoadTexture("resources/models/watermill_diffuse.png"); // Load model texture
|
||||
|
||||
// Load shader for model
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ int main(void)
|
|||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Model model = LoadModel("resources/models/church.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/church_diffuse.png"); // Load model texture (diffuse map)
|
||||
Texture texture = LoadTexture("resources/models/church_diffuse.png"); // Load model texture (diffuse map)
|
||||
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shapes and texture shaders");
|
||||
|
||||
Texture2D fudesumi = LoadTexture("resources/fudesumi.png");
|
||||
Texture fudesumi = LoadTexture("resources/fudesumi.png");
|
||||
|
||||
// Load shader to be used on some parts drawing
|
||||
// NOTE 1: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int main(void)
|
|||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - texture drawing");
|
||||
|
||||
Image imBlank = GenImageColor(1024, 1024, BLANK);
|
||||
Texture2D texture = LoadTextureFromImage(imBlank); // Load blank texture to fill on shader
|
||||
Texture texture = LoadTextureFromImage(imBlank); // Load blank texture to fill on shader
|
||||
UnloadImage(imBlank);
|
||||
|
||||
// NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - Apply an outline to a texture");
|
||||
|
||||
Texture2D texture = LoadTexture("resources/fudesumi.png");
|
||||
Texture texture = LoadTexture("resources/fudesumi.png");
|
||||
|
||||
Shader shdrOutline = LoadShader(0, TextFormat("resources/shaders/glsl%i/outline.fs", GLSL_VERSION));
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ int main(void)
|
|||
Model model = LoadModelFromMesh(cube);
|
||||
|
||||
// Load a texture and assign to cube model
|
||||
Texture2D texture = LoadTexture("resources/cubicmap_atlas.png");
|
||||
Texture texture = LoadTexture("resources/cubicmap_atlas.png");
|
||||
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
|
||||
|
||||
// Set the texture tiling using a shader
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ int main(void)
|
|||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - texture waves");
|
||||
|
||||
// Load texture texture to apply shaders
|
||||
Texture2D texture = LoadTexture("resources/space.png");
|
||||
Texture texture = LoadTexture("resources/space.png");
|
||||
|
||||
// Load shader and setup location points and values
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/wave.fs", GLSL_VERSION));
|
||||
|
|
|
|||
Loading…
Reference in a new issue