I am trying to use [GEMglBindTexture] for texturing but the associated GL objects doesn't work with the last GEM version for windows:
GEMglLoadName crashes
GEMglGenTextures crashes
then I don't understand how to associate an image to texture integer in second input of glBindTexture.
Any help appreciated
Patco
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
On Jul 11, 2006, at 4:15 AM, patco wrote:
I am trying to use [GEMglBindTexture] for texturing but the
associated GL objects doesn't work with the last GEM version for
windows:GEMglLoadName crashes
GEMglGenTextures crashes
then I don't understand how to associate an image to texture integer in second input of glBindTexture.
Any help appreciated
...which version of Gem are you using? GEMglLoadName doesn't crash
with cvs, but nothing has changed with that object since it was first
committed, I think...I've attached a small patch that worked here...
...as far as GEMglGenTextures, I'll look into that (don't have time
to try it out right now)
Hello, your attached patch doesn't crash pd, it just seems to work even if I don't know yet what to do with it, because I would like to open an image file for texturing the openGL geos.
I might have been confused during all the tests I've done because [GEMglLoadName] doesn't crash.
I also believed that glLoadName could solve this image loading for glBindTexture problem, but apparently it's related to something else.
[GEMglGenTexture] crashes after object creation with the patch I have attached (I've added a "_" to not crash).
Without having any GEM documentation for openGL huge set of functions, it's very difficult to find out how to make them working, then I am trying to follow openGL scripting tutorials and re-interpret them with GEM objects.
This method often brings some errors, and these errors are making harder to do something expected.
I am suspecting that GEM is able to change openGL configuration, is that right?
It would be very sympathic to have a place where we could share openGL patches, or a cvs folder, or a more consistent openGL folder in GEM doc...
I am using the last windows version of gem, downloaded from official site, and didn't make some tests yet with the linux version.
Also if any developper of Win32 last version of GEM is reading, [hsv2rgb] doesn't work anymore.
many thanks for the attention, and for the attached patch.
Patco.
james tittle tigital@mac.com a écrit : On Jul 11, 2006, at 4:15 AM, patco wrote:
I am trying to use [GEMglBindTexture] for texturing but the
associated GL objects doesn't work with the last GEM version for
windows:GEMglLoadName crashes
GEMglGenTextures crashes
then I don't understand how to associate an image to texture integer in second input of glBindTexture.
Any help appreciated
...which version of Gem are you using? GEMglLoadName doesn't crash
with cvs, but nothing has changed with that object since it was first
committed, I think...I've attached a small patch that worked here...
...as far as GEMglGenTextures, I'll look into that (don't have time
to try it out right now)
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
#N canvas 542 23 486 660 10; #X obj 152 315 GEMglBindTexture; #X obj 213 255 GLdefine GL_TEXTURE_2D; #X obj 213 231 loadbang; #X obj 152 164 GEMglRotatef 1 0 0; #X obj 152 184 GEMglRotatef 0 1 0; #X obj 152 203 GEMglRotatef 0 0 1; #X obj 152 350 GEMglBegin; #X obj -1 6 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 22 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 4 45 pd gemwin; #X msg 4 26 create; #X text 0 5 Create window:; #X obj 152 141 GEMglTranslatef 0 0 -12 0; #X obj 152 401 GEMglTexCoord2f; #X obj 152 472 GEMglTexCoord2f; #X obj 152 539 GEMglTexCoord2f; #X obj 152 611 GEMglEnd; #X obj 152 435 GEMglVertex3f -1 -1 0; #X obj 152 506 GEMglVertex3f 1 -1 0; #X obj 152 573 GEMglVertex3f -1 1 0; #X obj 311 319 GLdefine GL_QUADS; #X obj 316 288 loadbang; #X obj 384 289 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 152 117 GEMglPolygonMode; #X obj 197 57 GLdefine GL_BACK; #X obj 244 91 GLdefine GL_FILL; #X obj 229 18 loadbang; #X obj 297 19 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 151 11 gemhead 1; #X msg 262 283 1; #X obj 339 426 GEMglIsTexture; #X obj 314 478 GEMglCopyTexImage2D; #X msg 224 283 0; #X obj 336 529 GEMglTexSubImage2D; #X obj 337 571 GEMglGenTexture_; #X connect 0 0 6 0; #X connect 1 0 0 1; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 6 0 12 0; #X connect 8 0 9 0; #X connect 9 0 8 0; #X connect 11 0 3 0; #X connect 12 0 16 0; #X connect 13 0 17 0; #X connect 14 0 18 0; #X connect 16 0 13 0; #X connect 17 0 14 0; #X connect 18 0 15 0; #X connect 19 0 6 1; #X connect 20 0 19 0; #X connect 21 0 19 0; #X connect 22 0 11 0; #X connect 23 0 22 1; #X connect 24 0 22 2; #X connect 25 0 23 0; #X connect 25 0 24 0; #X connect 26 0 23 0; #X connect 26 0 24 0; #X connect 27 0 22 0; #X connect 28 0 0 2; #X connect 31 0 0 2;
hiya,
On Jul 11, 2006, at 12:50 PM, patco wrote:
your attached patch doesn't crash pd, it just seems to work even
if I don't know yet what to do with it, because I would like to
open an image file for texturing the openGL geos.I might have been confused during all the tests I've done because
[GEMglLoadName] doesn't crash.I also believed that glLoadName could solve this image loading for glBindTexture problem, but apparently it's related to something else.
...yeh, glLoadName has nothing to do with loading textures from disk,
if that's what you were thinking: use [pix_image] & [pix_texture]
for that...
[GEMglGenTexture] crashes after object creation with the patch I
have attached (I've added a "_" to not crash).
...yeh, I got a crash when trying it: I'll have to look into why a
bit later...
Without having any GEM documentation for openGL huge set of functions, it's very difficult to find out how to make them working, then I am trying to follow openGL scripting tutorials and re- interpret them with GEM objects.
...well, there are two example patches in examples/09.openGL, but we
sure could use more...I've often wanted to create something like a
port of the "nehe" tutorials, but just haven't gotten around to
it...Ultimately, the best documentation for gem's opengl functions is
the "red book": you won't get far without knowing the basics of Open
GL, and it's really well written...
This method often brings some errors, and these errors are making harder to do something expected.
I am suspecting that GEM is able to change openGL configuration, is that right?
...sure, the open gl wrapper objects allow for extremely rapid
prototyping, without recompilation...the other objects in Gem can
perhaps best be viewed as "shorthand": they provide simplified,
abstracted interfaces to a whole series of typical graphics tasks,
like opening media (images, movies, models, shaders, etc.) and
setting up texturing and viewpoints...
It would be very sympathic to have a place where we could share openGL patches, or a cvs folder, or a more consistent openGL folder in GEM
doc...
...I've always thought that this is a very powerful side of GEM, but
it's true that it's under-documented...but then Gem in general is
under-documented, and it's a big to-do for us...of course, any help
is welcome!
I am using the last windows version of gem, downloaded from
official site, and didn't make some tests yet with the linux version.
...unfortunately, that version is waaaaay outta date: we are
seriously remiss in not releasing "early and often"...so, your best
bet is to grab cvs and compile it yourself...
Also if any developper of Win32 last version of GEM is reading, [hsv2rgb] doesn't work anymore.
...I think this was fixed in cvs a bit ago...
many thanks for the attention, and for the attached patch.
enjoy, jamie
james tittle tigital@mac.com a écrit :>use [pix_image] & [pix_texture]
for that...
Yeah, that's it!!
...well, there are two example patches in examples/09.openGL, but we
sure could use more...I've often wanted to create something like a
port of the "nehe" tutorials, but just haven't gotten around to
it...
...I've always thought that this is a very powerful side of GEM, but
it's true that it's under-documented...but then Gem in general is
under-documented, and it's a big to-do for us...of course, any help
is welcome!
I would be glad to add some other examples...like the simple buffering patch sent yesterday to the list, and maybe some others I am preparing.
Also a sharing project where we could find usefull patches that handle openGL like Cyrille Henry's v33.livewavedisplay, or the sx part of Chris's "s-abstraction" might be interesting.
Ultimately, the best documentation for gem's opengl functions is
the "red book": you won't get far without knowing the basics of Open
GL, and it's really well written...
That's very good indeed, I am actually reading it and testing functions they are explaining.
the other objects in Gem can
perhaps best be viewed as "shorthand": they provide simplified,
abstracted interfaces to a whole series of typical graphics tasks,
like opening media (images, movies, models, shaders, etc.) and
setting up texturing and viewpoints...
I am trying to make a prototype of a GOP that would handle openGL parameters, it is actually used just for testing, it's attached... It's not a very elegant patching for the moment and could be made with dynamic patching and [sssad] rather, but that solution has been easier to imagine, comments welcomed, :-).
patco
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
Sorry, I forgot to attach the patch in last message...
patco
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
#N canvas 466 20 562 654 10; #N canvas 0 22 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 11 30 pd gemwin; #X msg 11 11 create; #X obj 131 531 GEMglEnd; #X floatatom 165 160 5 0 0 0 - - -; #X obj 121 189 GEMglRotatef 0 1 1 1; #X obj 247 173 loadbang; #X obj 241 195 GLdefine GL_POLYGON; #X obj 121 217 GEMglBegin; #X obj 217 528 loadbang; #X obj 131 576 GEMglShadeModel; #X obj 217 551 GLdefine GL_FLAT; #X obj 216 600 GLdefine GL_MAP2_VERTEX; #X obj 268 570 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 201 162 5 0 0 0 - - -; #X floatatom 238 163 5 0 0 0 - - -; #X obj 292 231 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 280 231 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 305 231 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 374 291 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 362 291 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 387 291 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 128 7 gemhead 50; #X obj 199 208 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 800 1; #X obj 211 208 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 900 1; #X obj 328 247 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 341 247 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 254 340 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 267 340 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 296 371 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 284 371 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 309 371 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 260 415 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 273 415 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 302 446 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 290 446 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 315 446 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 329 446 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 121 291 GEMglVertex3f -2 -1 0; #X obj 121 355 GEMglVertex3f -2 1 0; #X obj 124 428 GEMglVertex3f 0 1 0; #X obj 130 503 GEMglVertex3f 0 -1 0; #X obj 125 396 GEMglTexCoord2f 0.9 0.65; #X obj 121 322 GEMglTexCoord2f 0.02 0.65; #X floatatom 368 390 5 0 0 0 - - -; #X obj 130 471 GEMglTexCoord2f 0.9 0.02; #N canvas 315 323 659 404 image 0; #X obj 305 28 cnv 15 200 100 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 46 18 inlet; #X obj 47 306 outlet; #X obj 46 87 pix_texture; #X obj 46 65 pix_image; #X obj 127 28 openpanel; #X msg 128 51 open $1; #X obj 345 47 hradio 15 1 0 2 $0-radio-values $0-radio-values-r value -37 6 0 8 -262144 -1 -1 0; #X obj 373 31 hradio 15 1 0 5 empty $0-radio-parameter parameter -65 6 0 8 -262144 -1 -1 0; #N canvas 340 51 688 554 TEXTURE_2D 0; #X obj 111 1 inlet; #X obj 300 121 cnv 15 200 20 empty $0-cnv-parameter GL_TEXTURE_WRAP_S 2 12 0 9 -1 -262144 0; #N canvas 509 40 510 390 MAG_FILTER 0; #X obj 60 12 inlet; #X obj 77 290 t b a; #X obj 80 136 sel 0; #X obj 79 66 inlet; #X msg 140 187 GL_NEAREST; #X msg 116 208 GL_LINEAR; #X obj 144 262 list trim; #X obj 144 241 list prepend label; #X obj 64 345 outlet; #X obj 60 41 sel 2; #X obj 264 100 s $0-cnv-parameter; #X msg 264 67 label GL_TEXTURE_MAG_FILTER; #X obj 60 100 i 0; #X obj 144 284 s $0-cnv-value; #X obj 221 158 s $0-radio-values-r; #X obj 60 321 pack 10240 9728; #X msg 47 190 9728; #X msg 66 218 9729; #X connect 0 0 9 0; #X connect 1 0 15 0; #X connect 1 1 15 1; #X connect 2 0 5 0; #X connect 2 0 16 0; #X connect 2 1 4 0; #X connect 2 1 17 0; #X connect 3 0 2 0; #X connect 3 0 12 1; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 6 0 13 0; #X connect 7 0 6 0; #X connect 9 0 11 0; #X connect 9 0 12 0; #X connect 11 0 10 0; #X connect 12 0 2 0; #X connect 12 0 14 0; #X connect 15 0 8 0; #X connect 16 0 1 0; #X connect 17 0 1 0; #X restore 142 193 pd MAG_FILTER; #X obj 179 89 inlet; #N canvas 424 253 510 390 WRAP_T 0; #X obj 60 12 inlet; #X obj 66 275 t b a; #X obj 78 145 sel 0; #X obj 79 71 inlet; #X obj 132 257 list trim; #X obj 132 236 list prepend label; #X obj 53 330 outlet; #X msg 108 207 GL_CLAMP; #X msg 132 186 GL_REPEAT; #X obj 132 279 s $0-cnv-value; #X obj 60 38 sel 1; #X obj 264 100 s $0-cnv-parameter; #X msg 264 67 label GL_TEXTURE_WRAP_T; #X obj 60 103 i 0; #X obj 212 139 s $0-radio-values-r; #X obj 49 306 pack 10243 10496; #X msg 15 187 10496; #X msg 59 184 10497; #X connect 0 0 10 0; #X connect 1 0 15 0; #X connect 1 1 15 1; #X connect 2 0 7 0; #X connect 2 0 16 0; #X connect 2 1 8 0; #X connect 2 1 17 0; #X connect 3 0 2 0; #X connect 3 0 13 1; #X connect 4 0 9 0; #X connect 5 0 4 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 10 0 12 0; #X connect 10 0 13 0; #X connect 12 0 11 0; #X connect 13 0 2 0; #X connect 13 0 14 0; #X connect 15 0 6 0; #X connect 16 0 1 0; #X connect 17 0 1 0; #X restore 124 166 pd WRAP_T; #X obj 123 332 outlet; #X obj 181 110 demux 0 1 2 3 4; #N canvas 0 0 478 328 hdial 0; #X obj 64 21 inlet; #X msg 14 169 number $1; #X msg 18 139 2; #X msg 76 137 4; #X msg 47 138 6; #X obj 7 76 sel 0 1 2 3 4; #X obj 10 193 s $0-radio-values-r; #X connect 0 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 1 0; #X connect 5 0 2 0; #X connect 5 1 2 0; #X connect 5 2 2 0; #X connect 5 3 4 0; #X connect 5 4 3 0; #X restore 220 49 pd hdial value; #N canvas 162 177 534 414 WRAP_S 0; #X obj 60 12 inlet; #X obj 70 284 t b a; #X obj 82 154 sel 0; #X obj 82 89 inlet; #X obj 134 245 list trim; #X obj 134 224 list prepend label; #X obj 57 339 outlet; #X msg 106 191 GL_CLAMP; #X msg 130 170 GL_REPEAT; #X obj 134 267 s $0-cnv-value; #X obj 60 35 sel 0; #X obj 264 100 s $0-cnv-parameter; #X msg 264 67 label GL_TEXTURE_WRAP_S; #X obj 75 121 i 0; #X obj 221 158 s $0-radio-values-r; #X msg 56 253 10496; #X msg 82 227 10497; #X obj 53 315 pack 10242 10496; #X connect 0 0 10 0; #X connect 1 0 17 0; #X connect 1 1 17 1; #X connect 2 0 7 0; #X connect 2 0 15 0; #X connect 2 1 8 0; #X connect 2 1 16 0; #X connect 3 0 2 0; #X connect 3 0 13 1; #X connect 4 0 9 0; #X connect 5 0 4 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 10 0 12 0; #X connect 10 0 13 0; #X connect 12 0 11 0; #X connect 13 0 2 0; #X connect 13 0 14 0; #X connect 15 0 1 0; #X connect 16 0 1 0; #X connect 17 0 6 0; #X restore 110 137 pd WRAP_S; #N canvas 431 0 583 501 MIN_FILTER 0; #X obj 15 11 inlet; #X obj 32 352 t b a; #X obj 33 79 inlet; #X msg 333 306 GL_NEAREST; #X msg 316 325 GL_LINEAR; #X obj 337 381 list trim; #X obj 337 360 list prepend label; #X obj 19 407 outlet; #X obj 34 180 sel 0 1 2 3 4 5; #X msg 359 266 GL_LINEAR_MINMAP_LINEAR; #X obj 316 188 sel 0 1 2 3 4 5; #X obj 337 403 s $0-cnv-value; #X obj 266 75 s $0-cnv-parameter; #X obj 15 33 sel 3; #X msg 266 42 label GL_TEXTURE_MIN_FILTER; #X obj 29 125 i 0; #X obj 153 181 s $0-radio-values-r; #X obj 16 383 pack 10241 9728; #X msg 33 319 9728; #X msg 45 295 9729; #X msg 63 269 9984; #X msg 90 224 9986; #X msg 103 202 9987; #X msg 76 244 9985; #X msg 344 286 GL_NEAREST_MINMAP_NEAREST; #X msg 374 247 GL_NEAREST_MINMAP_LINEAR; #X msg 384 228 GL_LINEAR_MINMAP_LINEAR; #X connect 0 0 13 0; #X connect 1 0 17 0; #X connect 1 1 17 1; #X connect 2 0 8 0; #X connect 2 0 10 0; #X connect 2 0 15 1; #X connect 3 0 6 0; #X connect 4 0 6 0; #X connect 5 0 11 0; #X connect 6 0 5 0; #X connect 8 0 18 0; #X connect 8 1 19 0; #X connect 8 2 20 0; #X connect 8 3 23 0; #X connect 8 4 21 0; #X connect 8 5 22 0; #X connect 9 0 6 0; #X connect 10 0 4 0; #X connect 10 1 3 0; #X connect 10 2 24 0; #X connect 10 3 9 0; #X connect 10 4 25 0; #X connect 10 5 26 0; #X connect 13 0 14 0; #X connect 13 0 15 0; #X connect 14 0 12 0; #X connect 15 0 8 0; #X connect 15 0 10 0; #X connect 15 0 16 0; #X connect 17 0 7 0; #X connect 18 0 1 0; #X connect 19 0 1 0; #X connect 20 0 1 0; #X connect 21 0 1 0; #X connect 22 0 1 0; #X connect 23 0 1 0; #X connect 24 0 6 0; #X connect 25 0 6 0; #X connect 26 0 6 0; #X restore 161 219 pd MIN_FILTER; #X obj 300 100 cnv 15 200 20 empty empty GL_TEXTURE_2D 2 12 0 9 -1 -262144 0; #N canvas 212 28 610 545 BORDER_COLOR 0; #X obj 271 15 inlet; #X obj 300 118 inlet; #X obj 348 257 list trim; #X obj 348 236 list prepend label; #X obj 215 354 outlet; #X obj 348 279 s $0-cnv-value; #X obj 313 87 s $0-cnv-parameter; #X msg 311 66 label GL_TEXTURE_BORDER_COLOR; #X obj 229 181 demux 0 1 2 3; #X obj 352 169 sel 0 1 2 3; #X msg 351 202 RED; #X msg 376 200 GREEN; #X msg 414 200 BLUE; #X msg 446 201 ALPHA; #X obj 146 147 r $0-BORDER_COLOR; #X obj 253 241 t b a; #X obj 277 267 t b a; #X obj 302 291 t b a; #X obj 43 274 t b b; #X obj 271 38 sel 4; #X obj 18 252 sel 4; #X obj 18 380 i $0; #X obj 271 142 i 0; #X msg 68 300 clear; #X obj 24 461 s pd-TEXTURE_2D-value; #X obj 43 350 i $0; #X obj 89 332 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 18 300 t b b; #X msg 63 379 obj 100 100 cnv 15 200 20 empty $1-cnv-value empty 2 11 0 9 -1 0 0; #X obj 360 147 s $0-radio-values-r; #X floatatom 107 202 5 0 0 0 - - -; #X msg 16 418 obj 170 102 hsl 101 15 0 1 0 0 $1-BORDER_COLOR $1-BORDER_COLOR-r empty 50 6 2 8 0 -1 -1 0; #X obj 211 328 pack 0 0 0 0; #X connect 0 0 19 0; #X connect 0 0 20 0; #X connect 1 0 9 0; #X connect 1 0 8 1; #X connect 1 0 22 1; #X connect 2 0 5 0; #X connect 3 0 2 0; #X connect 7 0 6 0; #X connect 8 0 32 0; #X connect 8 1 15 0; #X connect 8 2 16 0; #X connect 8 3 17 0; #X connect 9 0 10 0; #X connect 9 1 11 0; #X connect 9 2 12 0; #X connect 9 3 13 0; #X connect 10 0 3 0; #X connect 11 0 3 0; #X connect 12 0 3 0; #X connect 13 0 3 0; #X connect 14 0 30 0; #X connect 14 0 8 0; #X connect 15 0 32 0; #X connect 15 1 32 1; #X connect 16 0 32 0; #X connect 16 1 32 2; #X connect 17 0 32 0; #X connect 17 1 32 3; #X connect 18 0 25 0; #X connect 18 1 23 0; #X connect 19 0 7 0; #X connect 19 0 22 0; #X connect 20 0 27 0; #X connect 20 1 18 0; #X connect 21 0 31 0; #X connect 22 0 8 1; #X connect 22 0 9 0; #X connect 22 0 29 0; #X connect 23 0 24 0; #X connect 25 0 28 0; #X connect 26 0 25 0; #X connect 27 0 21 0; #X connect 28 0 24 0; #X connect 31 0 24 0; #X connect 32 0 4 0; #X restore 184 254 pd BORDER_COLOR; #N canvas 24 313 506 356 TEXTURE_2D-value 0; #X obj 100 100 cnv 15 200 20 empty 1002-cnv-value GL_CLAMP 2 11 0 9 -1 -262144 0; #X coords 0 -1 1 1 200 20 1 100 100; #X restore 300 140 pd TEXTURE_2D-value; #X obj 111 28 t a a a a a a a; #X text 337 4 megalegoland@yahoo.fr; #X obj 184 333 outlet; #X obj 107 277 unpack f f; #X obj 207 308 pack f f f f; #X obj 184 277 t b a; #X msg 139 308 4100; #X connect 0 0 13 0; #X connect 2 0 16 0; #X connect 3 0 6 0; #X connect 4 0 16 0; #X connect 6 0 8 1; #X connect 6 1 4 1; #X connect 6 2 2 1; #X connect 6 3 9 1; #X connect 6 4 11 1; #X connect 8 0 16 0; #X connect 9 0 16 0; #X connect 11 0 18 0; #X connect 13 0 8 0; #X connect 13 1 4 0; #X connect 13 2 2 0; #X connect 13 3 9 0; #X connect 13 4 11 0; #X connect 13 5 6 1; #X connect 13 6 7 0; #X connect 16 0 5 0; #X connect 16 1 15 0; #X connect 17 0 15 0; #X connect 18 0 19 0; #X connect 18 1 17 0; #X connect 19 0 5 0; #X coords 0 -1 1 1 200 60 1 300 100; #X restore 305 64 pd TEXTURE_2D; #X obj 470 42 bng 15 250 50 0 empty empty open_jpg -20 -6 0 8 -262144 -1 -1; #X obj 46 235 GEMglTexParameteri 3553 10242 10496; #X msg 203 158 4100; #X text 366 3 border color doesn't work; #X obj 319 213 print tex_parameter; #X obj 499 199 print tex_value; #X connect 1 0 4 0; #X connect 3 0 11 0; #X connect 4 0 3 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 9 1; #X connect 8 0 9 0; #X connect 9 0 11 2; #X connect 9 0 14 0; #X connect 9 1 11 3; #X connect 9 1 15 0; #X connect 10 0 5 0; #X connect 11 0 2 0; #X connect 12 0 11 2; #X coords 0 -1 1 1 200 100 1 305 28; #X restore 128 34 pd image; #X obj 410 35 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 394 65 GLdefine GL_TEXTURE_2D; #X floatatom 398 109 5 0 0 0 - - -; #X obj 121 258 GEMglTexCoord2f -0.5 -0.5; #X text 217 11 a gop for GLdefine GL_TEXTURE_D and image browing; #X connect 0 0 1 0; #X connect 1 0 0 0; #X connect 2 0 9 0; #X connect 3 0 4 1; #X connect 4 0 7 0; #X connect 5 0 6 0; #X connect 6 0 7 1; #X connect 7 0 49 0; #X connect 8 0 10 0; #X connect 10 0 9 1; #X connect 11 0 9 1; #X connect 12 0 11 0; #X connect 13 0 4 2; #X connect 14 0 4 3; #X connect 15 0 37 2; #X connect 16 0 37 1; #X connect 17 0 37 3; #X connect 18 0 38 2; #X connect 19 0 38 1; #X connect 20 0 38 3; #X connect 21 0 45 0; #X connect 22 0 43 0; #X connect 22 0 49 1; #X connect 23 0 43 0; #X connect 23 0 49 2; #X connect 24 0 42 1; #X connect 24 0 43 0; #X connect 25 0 42 2; #X connect 25 0 43 0; #X connect 26 0 41 1; #X connect 26 0 43 0; #X connect 27 0 41 2; #X connect 27 0 43 0; #X connect 28 0 39 2; #X connect 29 0 39 1; #X connect 30 0 39 3; #X connect 31 0 44 1; #X connect 32 0 44 2; #X connect 33 0 40 2; #X connect 34 0 40 1; #X connect 35 0 40 3; #X connect 37 0 42 0; #X connect 38 0 41 0; #X connect 39 0 44 0; #X connect 40 0 2 0; #X connect 41 0 39 0; #X connect 42 0 38 0; #X connect 44 0 40 0; #X connect 45 0 4 0; #X connect 46 0 47 0; #X connect 47 0 48 0; #X connect 49 0 37 0;
I don't think it is possible to texture a bitmap using the GEMgl objects since there is no way to pass a pointer to the pixels. Why not use pix_texture instead?
On 7/11/06, patco megalegoland@yahoo.fr wrote:
I am trying to use [GEMglBindTexture] for texturing but the associated GL objects doesn't work with the last GEM version for windows:
GEMglLoadName crashes
GEMglGenTextures crashes
then I don't understand how to associate an image to texture integer in second input of glBindTexture.
Any help appreciated
Patco
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hello,
chris clepper cgc@humboldtblvd.com a écrit :>I don't think it is possible to texture a bitmap using the GEMgl
That's a bad new...
objects since there is no way to pass a pointer to the pixels. Why not use pix_texture instead?
*sinic mode on* Maybe because it was not difficult enough? *sinic mode off*
I've just tried [pix_texture] and it seems to change slightly the color of the vertexes, I will try to find the functions to add for drawing correctly the image...
I've attached the test I've made with [pix_image]
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
#N canvas 586 39 429 626 10; #N canvas 0 22 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 11 30 pd gemwin; #X msg 11 11 create; #X obj 134 447 GEMglEnd; #X floatatom 172 135 5 0 0 0 - - -; #X obj 128 178 GEMglRotatef 0 1 1 1; #X obj 208 209 loadbang; #X obj 201 230 GLdefine GL_POLYGON; #X obj 128 252 GEMglBegin; #X obj 287 430 loadbang; #X obj 134 470 GEMglShadeModel; #X obj 265 429 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 285 451 GLdefine GL_FLAT; #X obj 219 516 GLdefine GL_MAP2_VERTEX; #X obj 271 486 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 208 137 5 0 0 0 - - -; #X floatatom 245 138 5 0 0 0 - - -; #X floatatom 282 138 5 0 0 0 - - -; #X obj 128 305 GEMglVertex4f -3 -3 -3 -3; #X obj 212 255 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 200 255 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 1200 1; #X obj 225 255 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 239 255 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 128 388 GEMglVertex4f 1 0 0 1; #X obj 126 428 GEMglVertex4fv 0 1 0 2; #X obj 197 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 185 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 210 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 224 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 130 54 gemhead 50; #X msg 127 28 set $1; #X floatatom 126 6 5 0 0 0 - - -; #X obj 128 114 pix_texture; #X obj 128 92 pix_image; #X obj 211 39 openpanel; #X msg 212 62 open $1; #X obj 210 7 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X connect 0 0 1 0; #X connect 1 0 0 0; #X connect 2 0 9 0; #X connect 3 0 4 1; #X connect 4 0 7 0; #X connect 5 0 6 0; #X connect 6 0 7 1; #X connect 7 0 17 0; #X connect 8 0 11 0; #X connect 10 0 11 0; #X connect 11 0 9 1; #X connect 12 0 9 1; #X connect 13 0 12 0; #X connect 14 0 4 2; #X connect 15 0 4 3; #X connect 16 0 4 4; #X connect 17 0 22 0; #X connect 18 0 17 2; #X connect 19 0 17 1; #X connect 20 0 17 3; #X connect 21 0 17 4; #X connect 22 0 23 0; #X connect 23 0 2 0; #X connect 24 0 22 2; #X connect 25 0 22 1; #X connect 26 0 22 3; #X connect 27 0 22 4; #X connect 28 0 32 0; #X connect 29 0 28 0; #X connect 30 0 29 0; #X connect 31 0 4 0; #X connect 32 0 31 0; #X connect 33 0 34 0; #X connect 34 0 32 0; #X connect 35 0 33 0;
On 7/11/06, patco megalegoland@yahoo.fr wrote:
I've just tried [pix_texture] and it seems to change slightly the color of the vertexes, I will try to find the functions to add for drawing correctly the image...
I've attached the test I've made with [pix_image]
You need to have texture coordinates for each vertex. Try GEMglTexCoord2f or one of the many Geo objects (sphere, cube, polygon, etc).
Very good, now I can modify the coordinated of a texture on a geometric object, thing that I couldn't do on GEM's shorthands like [cuboid], [polygon],...
Thank you for the advice.
Patco.
chris clepper cgc@humboldtblvd.com a écrit :
You need to have texture coordinates for each vertex. Try GEMglTexCoord2f or one of the many Geo objects (sphere, cube, polygon, etc).
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
pix_coordinate will modify the four texture coordinates associated with the image before the image is mapped onto a Geo. Make sure it comes after pix_texture.
On 7/12/06, patco megalegoland@yahoo.fr wrote:
Very good, now I can modify the coordinated of a texture on a geometric object, thing that I couldn't do on GEM's shorthands like [cuboid], [polygon],...
Thank you for the advice.
Patco.
chris clepper cgc@humboldtblvd.com a écrit :
You need to have texture coordinates for each vertex. Try GEMglTexCoord2f or one of the many Geo objects (sphere, cube, polygon, etc).
Hi, What are the inlet value arguements for pix_coordinate? As anyone had experience loading .mtl files with their .obj ? What I really want to know is how to save my models out of Maya with their uv's unwrapped so that I can use texture maps. Also is it possible to export rigged models?
B~ www.cypod.co.nr
On 7/12/06, chris clepper cgc@humboldtblvd.com wrote:
pix_coordinate will modify the four texture coordinates associated with the image before the image is mapped onto a Geo. Make sure it comes after pix_texture.
On 7/12/06, patco megalegoland@yahoo.fr wrote:
Very good, now I can modify the coordinated of a texture on a geometric object, thing that I couldn't do on GEM's shorthands like [cuboid], [polygon],...
Thank you for the advice.
Patco.
chris clepper cgc@humboldtblvd.com a écrit :
You need to have texture coordinates for each vertex. Try GEMglTexCoord2f or one of the many Geo objects (sphere, cube, polygon, etc).
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hello,
In reply to:
Hi, What are the inlet value arguements for pix_coordinate?
in documentation of gem you have an help file for [pix_coordinate]
I guess that each pair of number is corresponding to a corner of the image texture, with observing how the image is moving when we change coordinates values,
, in openGL alternative there is a big bunch of options's choices about how applying the texture image on a vertex.
As anyone had experience loading .mtl files with their .obj ? What I really want to know is how to save my models out of Maya with their uv's unwrapped so that I can use texture maps. Also is it possible to export rigged models?
You could try to interpret values given by .mtl files with pd objects, [colorRGB] , [alpha] , [pix_texture] and [pix_coordinate]
Patco.
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. Cliquez ici.