Skip to content

implement repeating textures #133

Description

@processing-bugs

Original author: b...@processing.org (June 07, 2010 01:03:15)

This bug automatically added from:
http://dev.processing.org/bugs/show_bug.cgi?id=753

Comment from taifunbrowser, 2008-04-03 18:49

revision: .135
os: Windows Vista, NVIDEA graphics driver (also tested on Windows XP with
crappy driver)

PGraphics.java
void textureVertex(float u, float v)

For renderers such as OPENGL (and maybe later the pXd), "repeating
textures" are very very useful.

Think of a checkerboard: (Note that the u/v values would be multiplied by
the image dimensions, I've simplified them in this example.)

image(check,0,0,width,height,0,0,14,14); //Would render 14x14 grid!

or even cooler:

image(check,0,0,width,height,0,0,14-(frameCount/40f)%1,14);

^ would render a sliding 14/14 checkerboard. This is very annoying to code,
and its nice if the opengl renderer can do it for us!

Proposed fix:
Remove the offending lines of code. Allow u/v values that exeed image
coordinates, and then throw exceptions in the subclasses of PGraphics if
they don't support it.

Proof of concept:
I did so, re-exported core.jar, and now have a very very nice sliding
checkerboard in OPengl renderer.

Original issue: http://code.google.com/p/processing/issues/detail?id=94

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions