Added test texture and testing vitasdk caching (2)
This commit is contained in:
@ -19,12 +19,22 @@ namespace Dawn {
|
|||||||
UILabel *label;
|
UILabel *label;
|
||||||
UIImage *image;
|
UIImage *image;
|
||||||
BitmapFont font;
|
BitmapFont font;
|
||||||
|
Texture test;
|
||||||
|
|
||||||
void stage() override {
|
void stage() override {
|
||||||
camera = Camera::create(this);
|
camera = Camera::create(this);
|
||||||
camera->transform->lookAt(glm::vec3(3, 3, 3), glm::vec3(0, 0, 0));
|
camera->transform->lookAt(glm::vec3(3, 3, 3), glm::vec3(0, 0, 0));
|
||||||
|
|
||||||
|
|
||||||
cube = SimpleSpinningCubePrefab::create(this);
|
cube = SimpleSpinningCubePrefab::create(this);
|
||||||
|
cube->material->texture = &test;
|
||||||
|
struct Color colors[] = {
|
||||||
|
COLOR_RED, COLOR_BLUE, COLOR_GREEN,
|
||||||
|
COLOR_MAGENTA, COLOR_DARK_GREY, COLOR_WHITE,
|
||||||
|
COLOR_BLACK, COLOR_CORNFLOWER_BLUE, COLOR_RED
|
||||||
|
};
|
||||||
|
test.setSize(3, 3);
|
||||||
|
test.buffer(colors);
|
||||||
|
|
||||||
canvas = UICanvas::create(this);
|
canvas = UICanvas::create(this);
|
||||||
|
|
||||||
|
@ -36,10 +36,10 @@ void Texture::setSize(int32_t width, int32_t height) {
|
|||||||
// Setup our preferred texture params, later this will be configurable.
|
// Setup our preferred texture params, later this will be configurable.
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||||
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
|
||||||
// Initialize the texture to blank
|
// Initialize the texture to blank
|
||||||
glTexImage2D(
|
glTexImage2D(
|
||||||
|
Reference in New Issue
Block a user