Window Stretching.
in
Programming Questions
•
2 years ago
Hi everyone, i'm decinoge. I'm using processing over 3 years and i was around the old forums.
First timer here.
Recently i've picked up my first big processing project, and decided to do a home edition of it.
However, to attain the desired effect i need a stretched window.
The original program had the 256x240 window resolution, but for a person to see at home, that is very unconfortable.
Since the project itself is a video game (vertical shoot'em up), that window would also be unplayable.
What i am looking to attain is a 768x720 window (or 512x480).
For the time come i can achieve it using this code:
First and most unimportant is the speed problem, this aint exactly a fast method on _my_ pc, and i get a bit of showdown from 60fps, but i have a generic graphic card.
Another is the linear filter applied to the render texture when resized. I wish to take those off, but neither noSmooth() nor hint(DISABLE_OPENGL_2X_SMOOTH) are able to get it to make a nearest neighbour resize filter.
So the objective is having all the game engine run on a small 256x240 space, "pick up" those pixels, and resize them bigger into... whatever window size i may want.
Having that i could also have big chunky pixels, and that would be very much the objective of the entire aesthetic.
I've recently used the openframeworks, and that had to be done with a small hack to the source code. is that necessary as well under processing?
I also have some modest experience under opengl, and the fact is that this project is running OPENGL environment. I knew from some tutorials that textures could simply be resized using nearest neighbour.
Will the nearest neighbour resize increase the render velocity?
Is there any "opengl way" to get this entire process to go faster?
Thank you in advance for any help.
First timer here.
Recently i've picked up my first big processing project, and decided to do a home edition of it.
However, to attain the desired effect i need a stretched window.
The original program had the 256x240 window resolution, but for a person to see at home, that is very unconfortable.
Since the project itself is a video game (vertical shoot'em up), that window would also be unplayable.
What i am looking to attain is a 768x720 window (or 512x480).
For the time come i can achieve it using this code:
Copy code
- PImage render;
render = get(center_x, center_y, 256, 240);
image(render, 0, 0, width, heigh );
First and most unimportant is the speed problem, this aint exactly a fast method on _my_ pc, and i get a bit of showdown from 60fps, but i have a generic graphic card.
Another is the linear filter applied to the render texture when resized. I wish to take those off, but neither noSmooth() nor hint(DISABLE_OPENGL_2X_SMOOTH) are able to get it to make a nearest neighbour resize filter.
So the objective is having all the game engine run on a small 256x240 space, "pick up" those pixels, and resize them bigger into... whatever window size i may want.
Having that i could also have big chunky pixels, and that would be very much the objective of the entire aesthetic.
I've recently used the openframeworks, and that had to be done with a small hack to the source code. is that necessary as well under processing?
I also have some modest experience under opengl, and the fact is that this project is running OPENGL environment. I knew from some tutorials that textures could simply be resized using nearest neighbour.
Will the nearest neighbour resize increase the render velocity?
Is there any "opengl way" to get this entire process to go faster?
Thank you in advance for any help.
1